All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] arm: dts: Fix audio card detection on peach boards
@ 2015-10-12 12:37 ` Alim Akhtar
  0 siblings, 0 replies; 15+ messages in thread
From: Alim Akhtar @ 2015-10-12 12:37 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: linux-kernel, linux-arm-kernel, k.kozlowski, kgene, devicetree,
	dianders, stable

Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
sound card detection is broken on peach boards and gives below errors:

[    3.630457] max98090 7-0010: MAX98091 REVID=0x51
[    3.634233] max98090 7-0010: use default 2.8v micbias
[    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
[    3.645307] max98090 7-0010: Invalid master clock frequency
[    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
[    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
[    3.664366] snow-audio: probe of sound failed with error -22

This patch adds missing assigned-clocks and assigned-clock-parents for
pmu_system_controller node which is used as "mclk" for audio codec.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")
Cc: <stable@vger.kernel.org>
---
Changes since v1:
Addressed Krzysztof's review comments.

 arch/arm/boot/dts/exynos5420-peach-pit.dts |    5 +++++
 arch/arm/boot/dts/exynos5800-peach-pi.dts  |    5 +++++
 2 files changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index 8f4d76c5e11c..1b95da79293c 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -915,6 +915,11 @@
 	};
 };
 
+&pmu_system_controller {
+	assigned-clocks = <&pmu_system_controller 0>;
+	assigned-clock-parents = <&clock CLK_FIN_PLL>;
+};
+
 &rtc {
 	status = "okay";
 	clocks = <&clock CLK_RTC>, <&max77802 MAX77802_CLK_32K_AP>;
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index 7d5b386b5ae6..8f40c7e549bd 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -878,6 +878,11 @@
 	};
 };
 
+&pmu_system_controller {
+	assigned-clocks = <&pmu_system_controller 0>;
+	assigned-clock-parents = <&clock CLK_FIN_PLL>;
+};
+
 &rtc {
 	status = "okay";
 	clocks = <&clock CLK_RTC>, <&max77802 MAX77802_CLK_32K_AP>;
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2] arm: dts: Fix audio card detection on peach boards
@ 2015-10-12 12:37 ` Alim Akhtar
  0 siblings, 0 replies; 15+ messages in thread
From: Alim Akhtar @ 2015-10-12 12:37 UTC (permalink / raw)
  To: linux-arm-kernel

Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
sound card detection is broken on peach boards and gives below errors:

[    3.630457] max98090 7-0010: MAX98091 REVID=0x51
[    3.634233] max98090 7-0010: use default 2.8v micbias
[    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
[    3.645307] max98090 7-0010: Invalid master clock frequency
[    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
[    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
[    3.664366] snow-audio: probe of sound failed with error -22

This patch adds missing assigned-clocks and assigned-clock-parents for
pmu_system_controller node which is used as "mclk" for audio codec.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")
Cc: <stable@vger.kernel.org>
---
Changes since v1:
Addressed Krzysztof's review comments.

 arch/arm/boot/dts/exynos5420-peach-pit.dts |    5 +++++
 arch/arm/boot/dts/exynos5800-peach-pi.dts  |    5 +++++
 2 files changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index 8f4d76c5e11c..1b95da79293c 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -915,6 +915,11 @@
 	};
 };
 
+&pmu_system_controller {
+	assigned-clocks = <&pmu_system_controller 0>;
+	assigned-clock-parents = <&clock CLK_FIN_PLL>;
+};
+
 &rtc {
 	status = "okay";
 	clocks = <&clock CLK_RTC>, <&max77802 MAX77802_CLK_32K_AP>;
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index 7d5b386b5ae6..8f40c7e549bd 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -878,6 +878,11 @@
 	};
 };
 
+&pmu_system_controller {
+	assigned-clocks = <&pmu_system_controller 0>;
+	assigned-clock-parents = <&clock CLK_FIN_PLL>;
+};
+
 &rtc {
 	status = "okay";
 	clocks = <&clock CLK_RTC>, <&max77802 MAX77802_CLK_32K_AP>;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] arm: dts: Fix audio card detection on peach boards
  2015-10-12 12:37 ` Alim Akhtar
@ 2015-10-12 13:04   ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2015-10-12 13:04 UTC (permalink / raw)
  To: Alim Akhtar, linux-samsung-soc
  Cc: k.kozlowski.k, linux-kernel, linux-arm-kernel, kgene, devicetree,
	dianders, stable

W dniu 12.10.2015 o 21:37, Alim Akhtar pisze:
> Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
> sound card detection is broken on peach boards and gives below errors:
> 
> [    3.630457] max98090 7-0010: MAX98091 REVID=0x51
> [    3.634233] max98090 7-0010: use default 2.8v micbias
> [    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
> [    3.645307] max98090 7-0010: Invalid master clock frequency
> [    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
> [    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
> [    3.664366] snow-audio: probe of sound failed with error -22
> 
> This patch adds missing assigned-clocks and assigned-clock-parents for
> pmu_system_controller node which is used as "mclk" for audio codec.
> 
> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
> Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")
> Cc: <stable@vger.kernel.org>
> ---
> Changes since v1:
> Addressed Krzysztof's review comments.

Looks good, thanks!

Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v2] arm: dts: Fix audio card detection on peach boards
@ 2015-10-12 13:04   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2015-10-12 13:04 UTC (permalink / raw)
  To: linux-arm-kernel

W dniu 12.10.2015 o 21:37, Alim Akhtar pisze:
> Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
> sound card detection is broken on peach boards and gives below errors:
> 
> [    3.630457] max98090 7-0010: MAX98091 REVID=0x51
> [    3.634233] max98090 7-0010: use default 2.8v micbias
> [    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
> [    3.645307] max98090 7-0010: Invalid master clock frequency
> [    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
> [    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
> [    3.664366] snow-audio: probe of sound failed with error -22
> 
> This patch adds missing assigned-clocks and assigned-clock-parents for
> pmu_system_controller node which is used as "mclk" for audio codec.
> 
> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
> Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")
> Cc: <stable@vger.kernel.org>
> ---
> Changes since v1:
> Addressed Krzysztof's review comments.

Looks good, thanks!

Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] arm: dts: Fix audio card detection on peach boards
  2015-10-12 13:04   ` Krzysztof Kozlowski
@ 2015-10-12 19:10     ` Kukjin Kim
  -1 siblings, 0 replies; 15+ messages in thread
From: Kukjin Kim @ 2015-10-12 19:10 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-samsung-soc, k.kozlowski.k, linux-kernel,
	linux-arm-kernel, kgene, devicetree, dianders, stable

On 10/12/15 22:04, Krzysztof Kozlowski wrote:
> W dniu 12.10.2015 o 21:37, Alim Akhtar pisze:
>> Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
>> sound card detection is broken on peach boards and gives below errors:
>>
>> [    3.630457] max98090 7-0010: MAX98091 REVID=0x51
>> [    3.634233] max98090 7-0010: use default 2.8v micbias
>> [    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
>> [    3.645307] max98090 7-0010: Invalid master clock frequency
>> [    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
>> [    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
>> [    3.664366] snow-audio: probe of sound failed with error -22
>>
>> This patch adds missing assigned-clocks and assigned-clock-parents for
>> pmu_system_controller node which is used as "mclk" for audio codec.
>>
>> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
>> Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")
>> Cc: <stable@vger.kernel.org>
>> ---
>> Changes since v1:
>> Addressed Krzysztof's review comments.
> 
> Looks good, thanks!
> 
> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> 
Applied, thanks.

- Kukjin

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v2] arm: dts: Fix audio card detection on peach boards
@ 2015-10-12 19:10     ` Kukjin Kim
  0 siblings, 0 replies; 15+ messages in thread
From: Kukjin Kim @ 2015-10-12 19:10 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/12/15 22:04, Krzysztof Kozlowski wrote:
> W dniu 12.10.2015 o 21:37, Alim Akhtar pisze:
>> Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
>> sound card detection is broken on peach boards and gives below errors:
>>
>> [    3.630457] max98090 7-0010: MAX98091 REVID=0x51
>> [    3.634233] max98090 7-0010: use default 2.8v micbias
>> [    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
>> [    3.645307] max98090 7-0010: Invalid master clock frequency
>> [    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
>> [    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
>> [    3.664366] snow-audio: probe of sound failed with error -22
>>
>> This patch adds missing assigned-clocks and assigned-clock-parents for
>> pmu_system_controller node which is used as "mclk" for audio codec.
>>
>> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
>> Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")
>> Cc: <stable@vger.kernel.org>
>> ---
>> Changes since v1:
>> Addressed Krzysztof's review comments.
> 
> Looks good, thanks!
> 
> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> 
Applied, thanks.

- Kukjin

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] arm: dts: Fix audio card detection on peach boards
  2015-10-12 19:10     ` Kukjin Kim
@ 2015-10-12 23:49       ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2015-10-12 23:49 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: Krzysztof Kozlowski, Alim Akhtar, linux-samsung-soc,
	linux-kernel, linux-arm-kernel, devicetree, dianders, stable

2015-10-13 4:10 GMT+09:00 Kukjin Kim <kgene@kernel.org>:
> On 10/12/15 22:04, Krzysztof Kozlowski wrote:
>> W dniu 12.10.2015 o 21:37, Alim Akhtar pisze:
>>> Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
>>> sound card detection is broken on peach boards and gives below errors:
>>>
>>> [    3.630457] max98090 7-0010: MAX98091 REVID=0x51
>>> [    3.634233] max98090 7-0010: use default 2.8v micbias
>>> [    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
>>> [    3.645307] max98090 7-0010: Invalid master clock frequency
>>> [    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
>>> [    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
>>> [    3.664366] snow-audio: probe of sound failed with error -22
>>>
>>> This patch adds missing assigned-clocks and assigned-clock-parents for
>>> pmu_system_controller node which is used as "mclk" for audio codec.
>>>
>>> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
>>> Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")
>>> Cc: <stable@vger.kernel.org>
>>> ---
>>> Changes since v1:
>>> Addressed Krzysztof's review comments.
>>
>> Looks good, thanks!
>>
>> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>>
> Applied, thanks.

I see you pulled that one and of_node_put() fix into fixes. Thanks!
Can you apply also Sudip's fix for thermal (acked by Lukasz)? I have
it my try but since you applied these two already it does not have
sense any more.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v2] arm: dts: Fix audio card detection on peach boards
@ 2015-10-12 23:49       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2015-10-12 23:49 UTC (permalink / raw)
  To: linux-arm-kernel

2015-10-13 4:10 GMT+09:00 Kukjin Kim <kgene@kernel.org>:
> On 10/12/15 22:04, Krzysztof Kozlowski wrote:
>> W dniu 12.10.2015 o 21:37, Alim Akhtar pisze:
>>> Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
>>> sound card detection is broken on peach boards and gives below errors:
>>>
>>> [    3.630457] max98090 7-0010: MAX98091 REVID=0x51
>>> [    3.634233] max98090 7-0010: use default 2.8v micbias
>>> [    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
>>> [    3.645307] max98090 7-0010: Invalid master clock frequency
>>> [    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
>>> [    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
>>> [    3.664366] snow-audio: probe of sound failed with error -22
>>>
>>> This patch adds missing assigned-clocks and assigned-clock-parents for
>>> pmu_system_controller node which is used as "mclk" for audio codec.
>>>
>>> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
>>> Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")
>>> Cc: <stable@vger.kernel.org>
>>> ---
>>> Changes since v1:
>>> Addressed Krzysztof's review comments.
>>
>> Looks good, thanks!
>>
>> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>>
> Applied, thanks.

I see you pulled that one and of_node_put() fix into fixes. Thanks!
Can you apply also Sudip's fix for thermal (acked by Lukasz)? I have
it my try but since you applied these two already it does not have
sense any more.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] arm: dts: Fix audio card detection on peach boards
@ 2015-11-30 14:01   ` Javier Martinez Canillas
  0 siblings, 0 replies; 15+ messages in thread
From: Javier Martinez Canillas @ 2015-11-30 14:01 UTC (permalink / raw)
  To: Alim Akhtar, linux-samsung-soc
  Cc: linux-kernel, linux-arm-kernel, k.kozlowski, kgene, devicetree,
	dianders, stable

Hello Alim,

On 10/12/2015 09:37 AM, Alim Akhtar wrote:
> Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
> sound card detection is broken on peach boards and gives below errors:
> 
> [    3.630457] max98090 7-0010: MAX98091 REVID=0x51
> [    3.634233] max98090 7-0010: use default 2.8v micbias
> [    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
> [    3.645307] max98090 7-0010: Invalid master clock frequency
> [    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
> [    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
> [    3.664366] snow-audio: probe of sound failed with error -22
> 
> This patch adds missing assigned-clocks and assigned-clock-parents for
> pmu_system_controller node which is used as "mclk" for audio codec.
> 
> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
> Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")

I found that this patch is not enough to have proper audio working
on an Exynos5800 Peach Pi. Even playing a simple wav does not work:

$ time aplay -D sysdefault /usr/share/sounds/alsa/Front_Center.wav 
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

real	0m1.138s
user	0m0.005s
sys	0m0.005s

This should be ~1.5 seconds so audio is processed faster than expected.

So something else besides making the CLKOUT to provide a valid frequency
for the codec's master clock is needed.

Do you know what's missing in mainline? For instance, I see that the
sound/soc/samsung/snow.c ASoC machine driver doesn't have a hw_params
but I'm not that familiar with ALSA to know if that makes sense or not.

Also, do you know if the "simple-audio-card" can be used instead for
snow and peachs as it is used for other Exynos5 boards or a specific
ASoC machine driver is really needed for these Chromebooks?

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] arm: dts: Fix audio card detection on peach boards
@ 2015-11-30 14:01   ` Javier Martinez Canillas
  0 siblings, 0 replies; 15+ messages in thread
From: Javier Martinez Canillas @ 2015-11-30 14:01 UTC (permalink / raw)
  To: Alim Akhtar, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ, kgene-DgEjT+Ai2ygdnm+yROfE0A,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	dianders-F7+t8E8rja9g9hUCZPvPmw, stable-u79uwXL29TY76Z2rM5mHXA

Hello Alim,

On 10/12/2015 09:37 AM, Alim Akhtar wrote:
> Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
> sound card detection is broken on peach boards and gives below errors:
> 
> [    3.630457] max98090 7-0010: MAX98091 REVID=0x51
> [    3.634233] max98090 7-0010: use default 2.8v micbias
> [    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
> [    3.645307] max98090 7-0010: Invalid master clock frequency
> [    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
> [    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
> [    3.664366] snow-audio: probe of sound failed with error -22
> 
> This patch adds missing assigned-clocks and assigned-clock-parents for
> pmu_system_controller node which is used as "mclk" for audio codec.
> 
> Signed-off-by: Alim Akhtar <alim.akhtar-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")

I found that this patch is not enough to have proper audio working
on an Exynos5800 Peach Pi. Even playing a simple wav does not work:

$ time aplay -D sysdefault /usr/share/sounds/alsa/Front_Center.wav 
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

real	0m1.138s
user	0m0.005s
sys	0m0.005s

This should be ~1.5 seconds so audio is processed faster than expected.

So something else besides making the CLKOUT to provide a valid frequency
for the codec's master clock is needed.

Do you know what's missing in mainline? For instance, I see that the
sound/soc/samsung/snow.c ASoC machine driver doesn't have a hw_params
but I'm not that familiar with ALSA to know if that makes sense or not.

Also, do you know if the "simple-audio-card" can be used instead for
snow and peachs as it is used for other Exynos5 boards or a specific
ASoC machine driver is really needed for these Chromebooks?

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v2] arm: dts: Fix audio card detection on peach boards
@ 2015-11-30 14:01   ` Javier Martinez Canillas
  0 siblings, 0 replies; 15+ messages in thread
From: Javier Martinez Canillas @ 2015-11-30 14:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Alim,

On 10/12/2015 09:37 AM, Alim Akhtar wrote:
> Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
> sound card detection is broken on peach boards and gives below errors:
> 
> [    3.630457] max98090 7-0010: MAX98091 REVID=0x51
> [    3.634233] max98090 7-0010: use default 2.8v micbias
> [    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
> [    3.645307] max98090 7-0010: Invalid master clock frequency
> [    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
> [    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
> [    3.664366] snow-audio: probe of sound failed with error -22
> 
> This patch adds missing assigned-clocks and assigned-clock-parents for
> pmu_system_controller node which is used as "mclk" for audio codec.
> 
> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
> Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")

I found that this patch is not enough to have proper audio working
on an Exynos5800 Peach Pi. Even playing a simple wav does not work:

$ time aplay -D sysdefault /usr/share/sounds/alsa/Front_Center.wav 
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

real	0m1.138s
user	0m0.005s
sys	0m0.005s

This should be ~1.5 seconds so audio is processed faster than expected.

So something else besides making the CLKOUT to provide a valid frequency
for the codec's master clock is needed.

Do you know what's missing in mainline? For instance, I see that the
sound/soc/samsung/snow.c ASoC machine driver doesn't have a hw_params
but I'm not that familiar with ALSA to know if that makes sense or not.

Also, do you know if the "simple-audio-card" can be used instead for
snow and peachs as it is used for other Exynos5 boards or a specific
ASoC machine driver is really needed for these Chromebooks?

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] arm: dts: Fix audio card detection on peach boards
  2015-11-30 14:01   ` Javier Martinez Canillas
@ 2015-11-30 16:59     ` Alim Akhtar
  -1 siblings, 0 replies; 15+ messages in thread
From: Alim Akhtar @ 2015-11-30 16:59 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Alim Akhtar, linux-samsung-soc, linux-kernel, linux-arm-kernel,
	Krzysztof Kozłowski, kgene, devicetree, Douglas Anderson,
	stable

Hi Javier,

On Mon, Nov 30, 2015 at 7:31 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Hello Alim,
>
> On 10/12/2015 09:37 AM, Alim Akhtar wrote:
>> Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
>> sound card detection is broken on peach boards and gives below errors:
>>
>> [    3.630457] max98090 7-0010: MAX98091 REVID=0x51
>> [    3.634233] max98090 7-0010: use default 2.8v micbias
>> [    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
>> [    3.645307] max98090 7-0010: Invalid master clock frequency
>> [    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
>> [    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
>> [    3.664366] snow-audio: probe of sound failed with error -22
>>
>> This patch adds missing assigned-clocks and assigned-clock-parents for
>> pmu_system_controller node which is used as "mclk" for audio codec.
>>
>> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
>> Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")
>
> I found that this patch is not enough to have proper audio working
> on an Exynos5800 Peach Pi. Even playing a simple wav does not work:
>
> $ time aplay -D sysdefault /usr/share/sounds/alsa/Front_Center.wav
> Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
>
> real    0m1.138s
> user    0m0.005s
> sys     0m0.005s
>
> This should be ~1.5 seconds so audio is processed faster than expected.
>
Did you tried playing any other file, like 128 KHz rate files etc..?
> So something else besides making the CLKOUT to provide a valid frequency
> for the codec's master clock is needed.
>
The $SUBJECT patch actually  fix the audio card detection issue, which
was failing because of the missing master clock.

> Do you know what's missing in mainline? For instance, I see that the
> sound/soc/samsung/snow.c ASoC machine driver doesn't have a hw_params
> but I'm not that familiar with ALSA to know if that makes sense or not.
>
I need to check this, currently I am out on a business travel, so
won't be able to check.
Probably we can go back to before "2fad972d45c4" and check that.

> Also, do you know if the "simple-audio-card" can be used instead for
> snow and peachs as it is used for other Exynos5 boards or a specific
> ASoC machine driver is really needed for these Chromebooks?
>
Not sure, AFAIR, I used machine driver on chromebooks (snow and peach).

> Best regards,
> --
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Regards,
Alim

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v2] arm: dts: Fix audio card detection on peach boards
@ 2015-11-30 16:59     ` Alim Akhtar
  0 siblings, 0 replies; 15+ messages in thread
From: Alim Akhtar @ 2015-11-30 16:59 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Javier,

On Mon, Nov 30, 2015 at 7:31 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Hello Alim,
>
> On 10/12/2015 09:37 AM, Alim Akhtar wrote:
>> Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
>> sound card detection is broken on peach boards and gives below errors:
>>
>> [    3.630457] max98090 7-0010: MAX98091 REVID=0x51
>> [    3.634233] max98090 7-0010: use default 2.8v micbias
>> [    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
>> [    3.645307] max98090 7-0010: Invalid master clock frequency
>> [    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
>> [    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
>> [    3.664366] snow-audio: probe of sound failed with error -22
>>
>> This patch adds missing assigned-clocks and assigned-clock-parents for
>> pmu_system_controller node which is used as "mclk" for audio codec.
>>
>> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
>> Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")
>
> I found that this patch is not enough to have proper audio working
> on an Exynos5800 Peach Pi. Even playing a simple wav does not work:
>
> $ time aplay -D sysdefault /usr/share/sounds/alsa/Front_Center.wav
> Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
>
> real    0m1.138s
> user    0m0.005s
> sys     0m0.005s
>
> This should be ~1.5 seconds so audio is processed faster than expected.
>
Did you tried playing any other file, like 128 KHz rate files etc..?
> So something else besides making the CLKOUT to provide a valid frequency
> for the codec's master clock is needed.
>
The $SUBJECT patch actually  fix the audio card detection issue, which
was failing because of the missing master clock.

> Do you know what's missing in mainline? For instance, I see that the
> sound/soc/samsung/snow.c ASoC machine driver doesn't have a hw_params
> but I'm not that familiar with ALSA to know if that makes sense or not.
>
I need to check this, currently I am out on a business travel, so
won't be able to check.
Probably we can go back to before "2fad972d45c4" and check that.

> Also, do you know if the "simple-audio-card" can be used instead for
> snow and peachs as it is used for other Exynos5 boards or a specific
> ASoC machine driver is really needed for these Chromebooks?
>
Not sure, AFAIR, I used machine driver on chromebooks (snow and peach).

> Best regards,
> --
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Regards,
Alim

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] arm: dts: Fix audio card detection on peach boards
  2015-11-30 16:59     ` Alim Akhtar
@ 2015-11-30 18:24       ` Javier Martinez Canillas
  -1 siblings, 0 replies; 15+ messages in thread
From: Javier Martinez Canillas @ 2015-11-30 18:24 UTC (permalink / raw)
  To: Alim Akhtar
  Cc: Alim Akhtar, linux-samsung-soc, linux-kernel, linux-arm-kernel,
	Krzysztof Kozłowski, kgene, devicetree, Douglas Anderson,
	stable

Hi Alim,

On 11/30/2015 01:59 PM, Alim Akhtar wrote:
> Hi Javier,
> 
> On Mon, Nov 30, 2015 at 7:31 PM, Javier Martinez Canillas
> <javier@osg.samsung.com> wrote:
>> Hello Alim,
>>
>> On 10/12/2015 09:37 AM, Alim Akhtar wrote:
>>> Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
>>> sound card detection is broken on peach boards and gives below errors:
>>>
>>> [    3.630457] max98090 7-0010: MAX98091 REVID=0x51
>>> [    3.634233] max98090 7-0010: use default 2.8v micbias
>>> [    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
>>> [    3.645307] max98090 7-0010: Invalid master clock frequency
>>> [    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
>>> [    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
>>> [    3.664366] snow-audio: probe of sound failed with error -22
>>>
>>> This patch adds missing assigned-clocks and assigned-clock-parents for
>>> pmu_system_controller node which is used as "mclk" for audio codec.
>>>
>>> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
>>> Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")
>>
>> I found that this patch is not enough to have proper audio working
>> on an Exynos5800 Peach Pi. Even playing a simple wav does not work:
>>
>> $ time aplay -D sysdefault /usr/share/sounds/alsa/Front_Center.wav
>> Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
>>
>> real    0m1.138s
>> user    0m0.005s
>> sys     0m0.005s
>>
>> This should be ~1.5 seconds so audio is processed faster than expected.
>>
> Did you tried playing any other file, like 128 KHz rate files etc..?

Yes, I see the same problem with all the files I tested.

>> So something else besides making the CLKOUT to provide a valid frequency
>> for the codec's master clock is needed.
>>
> The $SUBJECT patch actually  fix the audio card detection issue, which
> was failing because of the missing master clock.
>

I thought the problem was not a missing master clock, but an invalid clock
frequency. Since the error message in the patch change log was:

"max98090 7-0010: Invalid master clock frequency"

But what I tried to ask was what else was missing to have playback working.

>> Do you know what's missing in mainline? For instance, I see that the
>> sound/soc/samsung/snow.c ASoC machine driver doesn't have a hw_params
>> but I'm not that familiar with ALSA to know if that makes sense or not.
>>
> I need to check this, currently I am out on a business travel, so
> won't be able to check.

No worries, I was asked in case you had more information. Audio is the
only thing that is missing to have all peripherals working correctly with
mainline.

> Probably we can go back to before "2fad972d45c4" and check that.
>

Do you mean to revert $SUBJECT and "2fad972d45c4" to see if the bootloader
sets this correctly? If I revert both patches then I have no audio at all.
 
>> Also, do you know if the "simple-audio-card" can be used instead for
>> snow and peachs as it is used for other Exynos5 boards or a specific
>> ASoC machine driver is really needed for these Chromebooks?
>>
> Not sure, AFAIR, I used machine driver on chromebooks (snow and peach).
>

Yes, the downstream 3.8 ChromiumOS tree has also a machine driver but I
don't see a simple-audio-card in that tree so it seems that predates it.

-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v2] arm: dts: Fix audio card detection on peach boards
@ 2015-11-30 18:24       ` Javier Martinez Canillas
  0 siblings, 0 replies; 15+ messages in thread
From: Javier Martinez Canillas @ 2015-11-30 18:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Alim,

On 11/30/2015 01:59 PM, Alim Akhtar wrote:
> Hi Javier,
> 
> On Mon, Nov 30, 2015 at 7:31 PM, Javier Martinez Canillas
> <javier@osg.samsung.com> wrote:
>> Hello Alim,
>>
>> On 10/12/2015 09:37 AM, Alim Akhtar wrote:
>>> Since commit 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards"),
>>> sound card detection is broken on peach boards and gives below errors:
>>>
>>> [    3.630457] max98090 7-0010: MAX98091 REVID=0x51
>>> [    3.634233] max98090 7-0010: use default 2.8v micbias
>>> [    3.640985] snow-audio sound: HiFi <-> 3830000.i2s mapping ok
>>> [    3.645307] max98090 7-0010: Invalid master clock frequency
>>> [    3.650824] snow-audio sound: ASoC: Peach-Pi-I2S-MAX98091 late_probe() failed: -22
>>> [    3.658914] snow-audio sound: snd_soc_register_card failed (-22)
>>> [    3.664366] snow-audio: probe of sound failed with error -22
>>>
>>> This patch adds missing assigned-clocks and assigned-clock-parents for
>>> pmu_system_controller node which is used as "mclk" for audio codec.
>>>
>>> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
>>> Fixes: 2fad972d45c4 ("ARM: dts: Add mclk entry for Peach boards")
>>
>> I found that this patch is not enough to have proper audio working
>> on an Exynos5800 Peach Pi. Even playing a simple wav does not work:
>>
>> $ time aplay -D sysdefault /usr/share/sounds/alsa/Front_Center.wav
>> Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
>>
>> real    0m1.138s
>> user    0m0.005s
>> sys     0m0.005s
>>
>> This should be ~1.5 seconds so audio is processed faster than expected.
>>
> Did you tried playing any other file, like 128 KHz rate files etc..?

Yes, I see the same problem with all the files I tested.

>> So something else besides making the CLKOUT to provide a valid frequency
>> for the codec's master clock is needed.
>>
> The $SUBJECT patch actually  fix the audio card detection issue, which
> was failing because of the missing master clock.
>

I thought the problem was not a missing master clock, but an invalid clock
frequency. Since the error message in the patch change log was:

"max98090 7-0010: Invalid master clock frequency"

But what I tried to ask was what else was missing to have playback working.

>> Do you know what's missing in mainline? For instance, I see that the
>> sound/soc/samsung/snow.c ASoC machine driver doesn't have a hw_params
>> but I'm not that familiar with ALSA to know if that makes sense or not.
>>
> I need to check this, currently I am out on a business travel, so
> won't be able to check.

No worries, I was asked in case you had more information. Audio is the
only thing that is missing to have all peripherals working correctly with
mainline.

> Probably we can go back to before "2fad972d45c4" and check that.
>

Do you mean to revert $SUBJECT and "2fad972d45c4" to see if the bootloader
sets this correctly? If I revert both patches then I have no audio at all.
 
>> Also, do you know if the "simple-audio-card" can be used instead for
>> snow and peachs as it is used for other Exynos5 boards or a specific
>> ASoC machine driver is really needed for these Chromebooks?
>>
> Not sure, AFAIR, I used machine driver on chromebooks (snow and peach).
>

Yes, the downstream 3.8 ChromiumOS tree has also a machine driver but I
don't see a simple-audio-card in that tree so it seems that predates it.

-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-11-30 18:24 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12 12:37 [PATCH v2] arm: dts: Fix audio card detection on peach boards Alim Akhtar
2015-10-12 12:37 ` Alim Akhtar
2015-10-12 13:04 ` Krzysztof Kozlowski
2015-10-12 13:04   ` Krzysztof Kozlowski
2015-10-12 19:10   ` Kukjin Kim
2015-10-12 19:10     ` Kukjin Kim
2015-10-12 23:49     ` Krzysztof Kozlowski
2015-10-12 23:49       ` Krzysztof Kozlowski
2015-11-30 14:01 ` Javier Martinez Canillas
2015-11-30 14:01   ` Javier Martinez Canillas
2015-11-30 14:01   ` Javier Martinez Canillas
2015-11-30 16:59   ` Alim Akhtar
2015-11-30 16:59     ` Alim Akhtar
2015-11-30 18:24     ` Javier Martinez Canillas
2015-11-30 18:24       ` Javier Martinez Canillas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.