Skip to contentSkip to conversation

ASoC: samsung: Fix non-DT use of I2S controller

PATCH In review Mark Brown 2 participants 7 messages Dec 5, 2014 – Dec 12, 2014

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 ASoC: samsung: Fix non-DT use of I2S controller

The changes in commit a5a56871f804e (ASoC: samsung: add support for exynos7 I2S controller) introduce a new variant_regs structure in the driver data which is now mandatory for accessing registers. Unfortunately this is only hooked up for DT platforms so non-DT platforms like my primary development platform for audio are broken by this change and crash on boot.

Since the only non-DT user of these device is s3c64xx fix this by making the standard samsung-i2s device be of type I2Sv3 and add a new I2Sv4 name to the platform data section, currently using the I2Sv5 information which should be about right.

---
 sound/soc/samsung/i2s.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
sound/soc/samsung/i2s.c +4 -1
index e1ace5270a8b..25919e090983 100644
@@ -1418,10 +1418,13 @@ static const struct samsung_i2s_dai_data samsung_dai_type_sec = {
 static struct platform_device_id samsung_i2s_driver_ids[] = {
 	{
 		.name           = "samsung-i2s",
-		.driver_data    = (kernel_ulong_t)&samsung_dai_type_pri,
+		.driver_data	= (kernel_ulong_t)&i2sv3_dai_type,
 	}, {
 		.name           = "samsung-i2s-sec",
 		.driver_data    = (kernel_ulong_t)&samsung_dai_type_sec,
+	}, {
+		.name		= "samsung-i2sv4",
+		.driver_data	= (kernel_ulong_t)&i2sv5_dai_type_i2s1,
 	},
 	{},
 };
Signature · 1 line
2.1.3
#1 lore raw

Hi Mark,

Quoted 23 lines · Mark Brown

The changes in commit a5a56871f804e (ASoC: samsung: add support for exynos7 I2S controller) introduce a new variant_regs structure in the driver data which is now mandatory for accessing registers. Unfortunately this is only hooked up for DT platforms so non-DT platforms like my primary development platform for audio are broken by this change and crash on boot.

Since the only non-DT user of these device is s3c64xx fix this by making the standard samsung-i2s device be of type I2Sv3 and add a new I2Sv4 name to the platform data section, currently using the I2Sv5 information which should be about right.

---
 sound/soc/samsung/i2s.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
sound/soc/samsung/i2s.c +0 -0
index e1ace5270a8b..25919e090983 100644
@@ -1418,10 +1418,13 @@ static const struct samsung_i2s_dai_data
 samsung_dai_type_sec = {
 static struct platform_device_id samsung_i2s_driver_ids[] = {

sound/soc/samsung/i2s.c static const struct samsung_i2s_dai_data · line 1428

Quoted 10 lines
sound/soc/samsung/i2s.c +4 -1
 	{
 		.name           = "samsung-i2s",
-		.driver_data    = (kernel_ulong_t)&samsung_dai_type_pri,
+		.driver_data	= (kernel_ulong_t)&i2sv3_dai_type,
 	}, {
 		.name           = "samsung-i2s-sec",
 		.driver_data    = (kernel_ulong_t)&samsung_dai_type_sec,
+	}, {
+		.name		= "samsung-i2sv4",
+		.driver_data	= (kernel_ulong_t)&i2sv5_dai_type_i2s1,

I think here you need to use i2sv5_dai_type because i2sv5_dai_type_i2s1 is introduced for exynos7 on which the i2s1 is of type v5 but with slightly modified bit offsets.

Thanks
Padma

Quoted 11 lines
sound/soc/samsung/i2s.c +0 -0
 	},
 	{},

};
--
2.1.3

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

author maintainer
#2 lore raw
Quoted 9 lines · Padma Venkat

sound/soc/samsung/i2s.c static const struct samsung_i2s_dai_data samsung_dai_type_sec = { · line 1427

Quoted 3 lines · Mark Brown
sound/soc/samsung/i2s.c +3 -0
+	}, {
+		.name		= "samsung-i2sv4",
+		.driver_data	= (kernel_ulong_t)&i2sv5_dai_type_i2s1,

I think here you need to use i2sv5_dai_type because i2sv5_dai_type_i2s1 is introduced for exynos7 on which the i2s1 is of type v5 but with slightly modified bit offsets.

OK, though I presume that's wrong too (otherwise it should be v4).

#3 lore raw

Hi Mark,

Quoted 11 lines · Mark Brown
Quoted 9 lines · Padma Venkat

sound/soc/samsung/i2s.c static const struct samsung_i2s_dai_data samsung_dai_type_sec = { · line 1427

Quoted 3 lines · Mark Brown
sound/soc/samsung/i2s.c +3 -0
+	}, {
+		.name		= "samsung-i2sv4",
+		.driver_data	= (kernel_ulong_t)&i2sv5_dai_type_i2s1,

I think here you need to use i2sv5_dai_type because i2sv5_dai_type_i2s1 is introduced for exynos7 on which the i2s1 is of type v5 but with slightly modified bit offsets.

Quoted 2 lines

OK, though I presume that's wrong too (otherwise it should be v4).

Yes. It does not have secondary dai, internal DMA, reset control. It has only 5.1ch support. Register offsets are similar to i2sv3_regs. So I think one V4 dai type with name "samsung,s3c64xx-i2s" is required.

Thanks
Padma

author maintainer
#4 lore raw
Quoted 7 lines · Padma Venkat
Quoted 1 line · Mark Brown

OK, though I presume that's wrong too (otherwise it should be v4).

Yes. It does not have secondary dai, internal DMA, reset control. It has only 5.1ch support. Register offsets are similar to i2sv3_regs. So I think one V4 dai type with name "samsung,s3c64xx-i2s" is required.

OK, then can you or someone else with access to the documentation please provide that?

#5 lore raw
Quoted 11 lines · Mark Brown
Quoted 7 lines · Padma Venkat
Quoted 1 line · Mark Brown

OK, though I presume that's wrong too (otherwise it should be v4).

Yes. It does not have secondary dai, internal DMA, reset control. It has only 5.1ch support. Register offsets are similar to i2sv3_regs. So I think one V4 dai type with name "samsung,s3c64xx-i2s" is required.

OK, then can you or someone else with access to the documentation please provide that?

OK. I will post a patch next week.

Quoted 1 line

Thanks
Padma

author maintainer
#6 lore raw
Quoted 10 lines · Padma Venkat
Quoted 6 lines · Mark Brown
Quoted 3 lines

Yes. It does not have secondary dai, internal DMA, reset control. It has only 5.1ch support. Register offsets are similar to i2sv3_regs. So I think one V4 dai type with name "samsung,s3c64xx-i2s" is required.

OK, then can you or someone else with access to the documentation please provide that?

OK. I will post a patch next week.

Great, thanks.