Commit 81d7da54 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: Fix codec device id format used by some dai_links

The id part of an I2C device name is created with the "%d-%04x" format string.

So for example for an I2C device which is connected to the adapter with the id 0
and has its address set to 0x1a the id part of the devices name would be
"0-001a".

Currently some sound board drivers have the id part the codec_name field of
their dai_link structures set as if it had been created by a "%d-0x%x" format
string. For example "0-0x1a" instead of "0-001a".

As a result there is no match between the codec device and the dai_link and no
sound card is instantiated.

This patch fixes it.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
parent 20a4e7fc
...@@ -129,7 +129,7 @@ static struct snd_soc_dai_link afeb9260_dai = { ...@@ -129,7 +129,7 @@ static struct snd_soc_dai_link afeb9260_dai = {
.cpu_dai_name = "atmel-ssc-dai.0", .cpu_dai_name = "atmel-ssc-dai.0",
.codec_dai_name = "tlv320aic23-hifi", .codec_dai_name = "tlv320aic23-hifi",
.platform_name = "atmel_pcm-audio", .platform_name = "atmel_pcm-audio",
.codec_name = "tlv320aic23-codec.0-0x1a", .codec_name = "tlv320aic23-codec.0-001a",
.init = afeb9260_tlv320aic23_init, .init = afeb9260_tlv320aic23_init,
.ops = &afeb9260_ops, .ops = &afeb9260_ops,
}; };
......
...@@ -119,7 +119,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai = { ...@@ -119,7 +119,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai = {
.cpu_dai_name = "bf5xx-i2s", .cpu_dai_name = "bf5xx-i2s",
.codec_dai_name = "ssm2602-hifi", .codec_dai_name = "ssm2602-hifi",
.platform_name = "bf5xx-pcm-audio", .platform_name = "bf5xx-pcm-audio",
.codec_name = "ssm2602-codec.0-0x1b", .codec_name = "ssm2602-codec.0-001b",
.ops = &bf5xx_ssm2602_ops, .ops = &bf5xx_ssm2602_ops,
}; };
......
...@@ -401,7 +401,7 @@ static struct snd_soc_dai_link neo1973_gta02_dai[] = { ...@@ -401,7 +401,7 @@ static struct snd_soc_dai_link neo1973_gta02_dai[] = {
.codec_dai_name = "wm8753-hifi", .codec_dai_name = "wm8753-hifi",
.init = neo1973_gta02_wm8753_init, .init = neo1973_gta02_wm8753_init,
.platform_name = "samsung-audio", .platform_name = "samsung-audio",
.codec_name = "wm8753-codec.0-0x1a", .codec_name = "wm8753-codec.0-001a",
.ops = &neo1973_gta02_hifi_ops, .ops = &neo1973_gta02_hifi_ops,
}, },
{ /* Voice via BT */ { /* Voice via BT */
...@@ -410,7 +410,7 @@ static struct snd_soc_dai_link neo1973_gta02_dai[] = { ...@@ -410,7 +410,7 @@ static struct snd_soc_dai_link neo1973_gta02_dai[] = {
.cpu_dai_name = "bluetooth-dai", .cpu_dai_name = "bluetooth-dai",
.codec_dai_name = "wm8753-voice", .codec_dai_name = "wm8753-voice",
.ops = &neo1973_gta02_voice_ops, .ops = &neo1973_gta02_voice_ops,
.codec_name = "wm8753-codec.0-0x1a", .codec_name = "wm8753-codec.0-001a",
.platform_name = "samsung-audio", .platform_name = "samsung-audio",
}, },
}; };
......
...@@ -561,7 +561,7 @@ static struct snd_soc_dai_link neo1973_dai[] = { ...@@ -561,7 +561,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
.platform_name = "samsung-audio", .platform_name = "samsung-audio",
.cpu_dai_name = "s3c24xx-i2s", .cpu_dai_name = "s3c24xx-i2s",
.codec_dai_name = "wm8753-hifi", .codec_dai_name = "wm8753-hifi",
.codec_name = "wm8753-codec.0-0x1a", .codec_name = "wm8753-codec.0-001a",
.init = neo1973_wm8753_init, .init = neo1973_wm8753_init,
.ops = &neo1973_hifi_ops, .ops = &neo1973_hifi_ops,
}, },
...@@ -571,7 +571,7 @@ static struct snd_soc_dai_link neo1973_dai[] = { ...@@ -571,7 +571,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
.platform_name = "samsung-audio", .platform_name = "samsung-audio",
.cpu_dai_name = "bluetooth-dai", .cpu_dai_name = "bluetooth-dai",
.codec_dai_name = "wm8753-voice", .codec_dai_name = "wm8753-voice",
.codec_name = "wm8753-codec.0-0x1a", .codec_name = "wm8753-codec.0-001a",
.ops = &neo1973_voice_ops, .ops = &neo1973_voice_ops,
}, },
}; };
......
...@@ -94,7 +94,7 @@ static int simtec_hermes_init(struct snd_soc_pcm_runtime *rtd) ...@@ -94,7 +94,7 @@ static int simtec_hermes_init(struct snd_soc_pcm_runtime *rtd)
static struct snd_soc_dai_link simtec_dai_aic33 = { static struct snd_soc_dai_link simtec_dai_aic33 = {
.name = "tlv320aic33", .name = "tlv320aic33",
.stream_name = "TLV320AIC33", .stream_name = "TLV320AIC33",
.codec_name = "tlv320aic3x-codec.0-0x1a", .codec_name = "tlv320aic3x-codec.0-001a",
.cpu_dai_name = "s3c24xx-i2s", .cpu_dai_name = "s3c24xx-i2s",
.codec_dai_name = "tlv320aic3x-hifi", .codec_dai_name = "tlv320aic3x-hifi",
.platform_name = "samsung-audio", .platform_name = "samsung-audio",
......
...@@ -85,7 +85,7 @@ static int simtec_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd) ...@@ -85,7 +85,7 @@ static int simtec_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd)
static struct snd_soc_dai_link simtec_dai_aic23 = { static struct snd_soc_dai_link simtec_dai_aic23 = {
.name = "tlv320aic23", .name = "tlv320aic23",
.stream_name = "TLV320AIC23", .stream_name = "TLV320AIC23",
.codec_name = "tlv320aic3x-codec.0-0x1a", .codec_name = "tlv320aic3x-codec.0-001a",
.cpu_dai_name = "s3c24xx-i2s", .cpu_dai_name = "s3c24xx-i2s",
.codec_dai_name = "tlv320aic3x-hifi", .codec_dai_name = "tlv320aic3x-hifi",
.platform_name = "samsung-audio", .platform_name = "samsung-audio",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment