ASoC: Fix codec device id format used by some dai_links
Subsystems (6)
PATCH 1/1 ASoC: Fix codec device id format used by some dai_links
The id part of a I2C device name is created with the "%d-%04x" format string.
So for example for a 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.
---
This problem has been noted with the neo1993_gta02 sound board driver and has only been runtime tested for the neo1973 and neo1973_gta02 sound board drivers, but in theory the problem should be the same for all of the drivers changed by this patch.
--- sound/soc/atmel/playpaq_wm8510.c | 2 +- sound/soc/atmel/snd-soc-afeb9260.c | 2 +- sound/soc/blackfin/bf5xx-ssm2602.c | 2 +- sound/soc/imx/wm1133-ev1.c | 2 +- sound/soc/samsung/goni_wm8994.c | 4 ++-- sound/soc/samsung/jive_wm8750.c | 2 +- sound/soc/samsung/neo1973_gta02_wm8753.c | 4 ++-- sound/soc/samsung/neo1973_wm8753.c | 4 ++-- sound/soc/samsung/s3c24xx_simtec_hermes.c | 2 +- sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c | 2 +- sound/soc/samsung/smartq_wm8987.c | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-)
sound/soc/atmel/playpaq_wm8510.c +1 -1
@@ -356,7 +356,7 @@ static struct snd_soc_dai_link playpaq_wm8510_dai = { .stream_name = "WM8510 PCM", .cpu_dai_name= "atmel-ssc-dai.0", .platform_name = "atmel-pcm-audio", - .codec_name = "wm8510-codec.0-0x1a", + .codec_name = "wm8510-codec.0-001a", .codec_dai_name = "wm8510-hifi", .init = playpaq_wm8510_init, .ops = &playpaq_wm8510_ops,
sound/soc/atmel/snd-soc-afeb9260.c +1 -1
@@ -129,7 +129,7 @@ static struct snd_soc_dai_link afeb9260_dai = { .cpu_dai_name = "atmel-ssc-dai.0", .codec_dai_name = "tlv320aic23-hifi", .platform_name = "atmel_pcm-audio", - .codec_name = "tlv320aic23-codec.0-0x1a", + .codec_name = "tlv320aic23-codec.0-001a", .init = afeb9260_tlv320aic23_init, .ops = &afeb9260_ops, };
sound/soc/blackfin/bf5xx-ssm2602.c +1 -1
@@ -119,7 +119,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai = { .cpu_dai_name = "bf5xx-i2s", .codec_dai_name = "ssm2602-hifi", .platform_name = "bf5xx-pcm-audio", - .codec_name = "ssm2602-codec.0-0x1b", + .codec_name = "ssm2602-codec.0-001b", .ops = &bf5xx_ssm2602_ops, };
sound/soc/imx/wm1133-ev1.c +1 -1
@@ -246,7 +246,7 @@ static struct snd_soc_dai_link wm1133_ev1_dai = { .cpu_dai_name = "imx-ssi.0", .codec_dai_name = "wm8350-hifi", .platform_name = "imx-fiq-pcm-audio.0", - .codec_name = "wm8350-codec.0-0x1a", + .codec_name = "wm8350-codec.0-001a", .init = wm1133_ev1_init, .ops = &wm1133_ev1_ops, .symmetric_rates = 1,
sound/soc/samsung/goni_wm8994.c +2 -2
@@ -238,7 +238,7 @@ static struct snd_soc_dai_link goni_dai[] = { .cpu_dai_name = "samsung-i2s.0", .codec_dai_name = "wm8994-hifi", .platform_name = "samsung-audio", - .codec_name = "wm8994-codec.0-0x1a", + .codec_name = "wm8994-codec.0-001a", .init = goni_wm8994_init, .ops = &goni_hifi_ops, }, {
@@ -247,7 +247,7 @@ static struct snd_soc_dai_link goni_dai[] = { .cpu_dai_name = "goni-voice-dai", .codec_dai_name = "wm8994-voice", .platform_name = "samsung-audio", - .codec_name = "wm8994-codec.0-0x1a", + .codec_name = "wm8994-codec.0-001a", .ops = &goni_voice_ops, }, };
sound/soc/samsung/jive_wm8750.c +1 -1
@@ -131,7 +131,7 @@ static struct snd_soc_dai_link jive_dai = { .cpu_dai_name = "s3c2412-i2s", .codec_dai_name = "wm8750-hifi", .platform_name = "samsung-audio", - .codec_name = "wm8750-codec.0-0x1a", + .codec_name = "wm8750-codec.0-001a", .init = jive_wm8750_init, .ops = &jive_ops, };
sound/soc/samsung/neo1973_gta02_wm8753.c +2 -2
@@ -391,7 +391,7 @@ static struct snd_soc_dai_link neo1973_gta02_dai[] = { .codec_dai_name = "wm8753-hifi", .init = neo1973_gta02_wm8753_init, .platform_name = "samsung-audio", - .codec_name = "wm8753-codec.0-0x1a", + .codec_name = "wm8753-codec.0-001a", .ops = &neo1973_gta02_hifi_ops, }, {/* Voice via BT */
@@ -400,7 +400,7 @@ static struct snd_soc_dai_link neo1973_gta02_dai[] = { .cpu_dai_name = "bluetooth-dai", .codec_dai_name = "wm8753-voice", .ops = &neo1973_gta02_voice_ops, - .codec_name = "wm8753-codec.0-0x1a", + .codec_name = "wm8753-codec.0-001a", .platform_name = "samsung-audio", }, };
sound/soc/samsung/neo1973_wm8753.c +2 -2
@@ -561,7 +561,7 @@ static struct snd_soc_dai_link neo1973_dai[] = { .platform_name = "samsung-audio", .cpu_dai_name = "s3c24xx-i2s", .codec_dai_name = "wm8753-hifi", - .codec_name = "wm8753-codec.0-0x1a", + .codec_name = "wm8753-codec.0-001a", .init = neo1973_wm8753_init, .ops = &neo1973_hifi_ops, },
@@ -571,7 +571,7 @@ static struct snd_soc_dai_link neo1973_dai[] = { .platform_name = "samsung-audio", .cpu_dai_name = "bluetooth-dai", .codec_dai_name = "wm8753-voice", - .codec_name = "wm8753-codec.0-0x1a", + .codec_name = "wm8753-codec.0-001a", .ops = &neo1973_voice_ops, }, };
sound/soc/samsung/s3c24xx_simtec_hermes.c +1 -1
@@ -84,7 +84,7 @@ static int simtec_hermes_init(struct snd_soc_pcm_runtime *rtd)static struct snd_soc_dai_link simtec_dai_aic33 = { .name ="tlv320aic33" , .stream_name ="TLV320AIC33" , - .codec_name ="tlv320aic3x-codec.0-0x1a" , + .codec_name ="tlv320aic3x-codec.0-001a" , .cpu_dai_name ="s3c24xx-i2s" , .codec_dai_name ="tlv320aic3x-hifi" , .platform_name ="samsung-audio" ,
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c +1 -1
@@ -73,7 +73,7 @@ static int simtec_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd)static struct snd_soc_dai_link simtec_dai_aic23 = { .name ="tlv320aic23" , .stream_name ="TLV320AIC23" , - .codec_name ="tlv320aic3x-codec.0-0x1a" , + .codec_name ="tlv320aic3x-codec.0-001a" , .cpu_dai_name ="s3c24xx-i2s" , .codec_dai_name ="tlv320aic3x-hifi" , .platform_name ="samsung-audio" ,
sound/soc/samsung/smartq_wm8987.c +1 -1
@@ -207,7 +207,7 @@ static struct snd_soc_dai_link smartq_dai[] = { .cpu_dai_name = "samsung-i2s.0", .codec_dai_name = "wm8750-hifi", .platform_name = "samsung-audio", - .codec_name = "wm8750-codec.0-0x1a", + .codec_name = "wm8750-codec.0-001a", .init = smartq_wm8987_init, .ops = &smartq_hifi_ops, },
Signature · 1 line
1.7.2.3
PATCH 1/1 SoC: Samsung: Fix outdated cpu_dai_name for s3c24xx i2s
During the multi-component patch the s3c24xx i2s driver was renamed from "s3c24xx-i2s" to "s3c24xx-iis", while the sound board drivers were not updated to reflect this change as well.
As a result there is no match between the dai_link and the i2s driver and no sound card is instantiated.
This patch fixes the problem by updating the sound board drivers to use "s3c24xx-iis" for the cpu_dai_name.
--- sound/soc/samsung/neo1973_gta02_wm8753.c | 2 +- sound/soc/samsung/neo1973_wm8753.c | 2 +- sound/soc/samsung/s3c24xx_simtec_hermes.c | 2 +- sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c | 2 +- sound/soc/samsung/s3c24xx_uda134x.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
sound/soc/samsung/neo1973_gta02_wm8753.c +1 -1
@@ -387,7 +387,7 @@ static struct snd_soc_dai_link neo1973_gta02_dai[] = { {/* Hifi Playback - for similatious use with voice below */ .name = "WM8753", .stream_name = "WM8753 HiFi", - .cpu_dai_name = "s3c24xx-i2s", + .cpu_dai_name = "s3c24xx-iis", .codec_dai_name = "wm8753-hifi", .init = neo1973_gta02_wm8753_init, .platform_name = "samsung-audio",
sound/soc/samsung/neo1973_wm8753.c +1 -1
@@ -559,7 +559,7 @@ static struct snd_soc_dai_link neo1973_dai[] = { .name = "WM8753", .stream_name = "WM8753 HiFi", .platform_name = "samsung-audio", - .cpu_dai_name = "s3c24xx-i2s", + .cpu_dai_name = "s3c24xx-iis", .codec_dai_name = "wm8753-hifi", .codec_name = "wm8753-codec.0-001a", .init = neo1973_wm8753_init,
sound/soc/samsung/s3c24xx_simtec_hermes.c +1 -1
@@ -85,7 +85,7 @@ static struct snd_soc_dai_link simtec_dai_aic33 = { .name = "tlv320aic33", .stream_name = "TLV320AIC33", .codec_name = "tlv320aic3x-codec.0-001a", - .cpu_dai_name = "s3c24xx-i2s", + .cpu_dai_name = "s3c24xx-iis", .codec_dai_name = "tlv320aic3x-hifi", .platform_name = "samsung-audio", .init = simtec_hermes_init,
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c +1 -1
@@ -74,7 +74,7 @@ static struct snd_soc_dai_link simtec_dai_aic23 = { .name = "tlv320aic23", .stream_name = "TLV320AIC23", .codec_name = "tlv320aic3x-codec.0-001a", - .cpu_dai_name = "s3c24xx-i2s", + .cpu_dai_name = "s3c24xx-iis", .codec_dai_name = "tlv320aic3x-hifi", .platform_name = "samsung-audio", .init = simtec_tlv320aic23_init,
sound/soc/samsung/s3c24xx_uda134x.c +1 -1
@@ -221,7 +221,7 @@ static struct snd_soc_dai_link s3c24xx_uda134x_dai_link = { .stream_name = "UDA134X", .codec_name = "uda134x-hifi", .codec_dai_name = "uda134x-hifi", - .cpu_dai_name = "s3c24xx-i2s", + .cpu_dai_name = "s3c24xx-iis", .ops = &s3c24xx_uda134x_ops, .platform_name = "samsung-audio", };
Signature · 1 line
1.7.2.3
Quoted 1 line · Lars-Peter Clausen
sound/soc/imx/wm1133-ev1.c | 2 +-
This at least is definitely wrong, the WM835x CODEC here is registered as a platform device. Please also check current kernels, a bunch of these are already fixed.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
Quoted 3 lines · Mark Brown
Quoted 3 lines · Lars-Peter Clausen
Quoted 2 lines
Quoted 2 lines
sound/soc/imx/wm1133-ev1.c | 2 +-
Ok. I simply assumed that all of them were I2C devices since platform and SPI devices use a completely different naming scheme.
I just went through the whole list and the wm8994 codec is a platform driver as well. And on the jive board the wm8750 is connected through SPI.
Quoted 4 lines
Quoted 4 lines
This at least is definitely wrong, the WM835x CODEC here is registered as a platform device. Please also check current kernels, a bunch of these are already fixed.
The patch is based on your for-next branch.
- - Lars
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk07b1oACgkQBX4mSR26RiN3rQCeKvFG0eyVdxPh68vy3pasiKcv iUUAn3lSz8cvKA95QI4Y9iRnyVk/bbWg
=0HnX
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 8 lines · Mark Brown
Quoted 2 lines · Lars-Peter Clausen
I just went through the whole list and the wm8994 codec is a platform driver as well. And on the jive board the wm8750 is connected through SPI.
Yeah, Liam made up a lot of this stuff through guesswork but as you can see a mechanical run through fixing them won't work as not everything is I2C based in the first place.
On the other hand a mechanical run wont break anything that is not already broken, but potentially fixes it.
I could resend the patch with those three cases which were definitely wrong in the current patch fixed to use the correct SPI or platform id. Or I could just send the fix for the neo1973 and neo1973_gta02 boards. Which one do you prefer?
- - Lars
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk07c2EACgkQBX4mSR26RiNwkgCcCwFvSv2k4pH+2KwHeP7zHB+3 aMsAn1PYvQnTXM36+DTASMgFXfcj9hRV
=OQXL
-----END PGP SIGNATURE-----
Re: [alsa-devel] [PATCH] SoC: Samsung: Fix outdated cpu_dai_name for s3c24xx i2s
In reply to Lars-Peter ClausenQuoted 4 lines · Lars-Peter Clausen
During the multi-component patch the s3c24xx i2s driver was renamed from "s3c24xx-i2s" to "s3c24xx-iis", while the sound board drivers were not updated to reflect this change as well.
Quoted 8 lines
As a result there is no match between the
dai_linkand the i2s driver and no sound card is instantiated.This patch fixes the problem by updating the sound board drivers to use "s3c24xx-iis" for the
cpu_dai_name.Signed-off-by Lars-Peter Clausen <[email protected]>Cc [email protected] (for 2.6.37)
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk
Re: [alsa-devel] [PATCH] SoC: Samsung: Fix outdated cpu_dai_name for s3c24xx i2s
In reply to Lars-Peter ClausenQuoted 4 lines · Lars-Peter Clausen
During the multi-component patch the s3c24xx i2s driver was renamed from "s3c24xx-i2s" to "s3c24xx-iis", while the sound board drivers were not updated to reflect this change as well.
Quoted 8 lines
As a result there is no match between the
dai_linkand the i2s driver and no sound card is instantiated.This patch fixes the problem by updating the sound board drivers to use "s3c24xx-iis" for the
cpu_dai_name.Signed-off-by Lars-Peter Clausen <[email protected]>Cc [email protected] (for 2.6.37)
Quoted 3 lines · Lars-Peter Clausen
I could resend the patch with those three cases which were definitely wrong in the current patch fixed to use the correct SPI or platform id. Or I could just send the fix for the neo1973 and
neo1973_gta02boards. Which one do you prefer?
Please submit just the stuff you know is a good fix.
Re: [PATCH] SoC: Samsung: Fix outdated cpu_dai_name for s3c24xx i2s
In reply to Lars-Peter ClausenQuoted 9 lines · Lars-Peter Clausen
During the multi-component patch the s3c24xx i2s driver was renamed from "s3c24xx-i2s" to "s3c24xx-iis", while the sound board drivers were not updated to reflect this change as well.
As a result there is no match between the
dai_linkand the i2s driver and no sound card is instantiated.This patch fixes the problem by updating the sound board drivers to use "s3c24xx-iis" for the
cpu_dai_name.
This patch doesn't apply, git am says:
Applying: SoC: Samsung: Fix outdated cpu_dai_name for s3c24xx i2s
error: patch failed: sound/soc/samsung/neo1973_wm8753.c:559
error: sound/soc/samsung/neo1973_wm8753.c: patch does not apply
error: patch failed: sound/soc/samsung/s3c24xx_simtec_hermes.c:85
error: sound/soc/samsung/s3c24xx_simtec_hermes.c: patch does not apply
error: patch failed: sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c:74
error: sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c: patch does not apply Patch failed at 0001 SoC: Samsung: Fix outdated cpu_dai_name for s3c24xx i2s
Please submit fixes against the current fix branch, currently 2.6.38.