linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM/sound: fix audio on kirkwood-openrd-client
@ 2016-01-23 22:36 Aaro Koskinen
  2016-01-23 22:36 ` [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio Aaro Koskinen
  2016-01-23 22:36 ` [PATCH 2/2] ASoC: simple-card: don't fail if sysclk setting is not supported Aaro Koskinen
  0 siblings, 2 replies; 12+ messages in thread
From: Aaro Koskinen @ 2016-01-23 22:36 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Audio playback has been broken some time on OpenRD client. With the
following patches I got the audio file playback working with mplayer.

Aaro Koskinen (2):
  ARM: DTS: kirkwood-openrd-client: fix audio
  ASoC: simple-card: don't fail if sysclk setting is not supported

 arch/arm/boot/dts/kirkwood-openrd-client.dts | 6 +++++-
 arch/arm/boot/dts/kirkwood.dtsi              | 2 +-
 sound/soc/generic/simple-card.c              | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

-- 
2.4.0

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

* [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio
  2016-01-23 22:36 [PATCH 0/2] ARM/sound: fix audio on kirkwood-openrd-client Aaro Koskinen
@ 2016-01-23 22:36 ` Aaro Koskinen
  2016-01-24 17:37   ` Andrew Lunn
  2016-01-26  8:58   ` Gregory CLEMENT
  2016-01-23 22:36 ` [PATCH 2/2] ASoC: simple-card: don't fail if sysclk setting is not supported Aaro Koskinen
  1 sibling, 2 replies; 12+ messages in thread
From: Aaro Koskinen @ 2016-01-23 22:36 UTC (permalink / raw)
  To: linux-arm-kernel

Fix audio on kirkwood-openrd-client:

1) The audio-controller was left disabled.

2) The probe fails because cs42l51 is missing #sound-dai-cells.

	/sound/simple-audio-card,codec: could not get #sound-dai-cells for /ocp at f1000000/i2c at 11000/cs42l51 at 4a
	asoc-simple-card sound: parse error -22
	asoc-simple-card: probe of sound failed with error -22

3) The mapping is incorrect:

	asoc-simple-card sound: cs42l51-hifi <-> spdif mapping ok

   should be:

	asoc-simple-card sound: cs42l51-hifi <-> i2s mapping ok

Reported-by: Rick Thomas <rbthomas@pobox.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 arch/arm/boot/dts/kirkwood-openrd-client.dts | 6 +++++-
 arch/arm/boot/dts/kirkwood.dtsi              | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-openrd-client.dts b/arch/arm/boot/dts/kirkwood-openrd-client.dts
index 887b9c1..96ff59d 100644
--- a/arch/arm/boot/dts/kirkwood-openrd-client.dts
+++ b/arch/arm/boot/dts/kirkwood-openrd-client.dts
@@ -20,6 +20,9 @@
 	compatible = "marvell,openrd-client", "marvell,openrd", "marvell,kirkwood-88f6281", "marvell,kirkwood";
 
 	ocp at f1000000 {
+		audio-controller at a0000 {
+			status = "okay";
+		};
 		i2c at 11000 {
 			status = "okay";
 			clock-frequency = <400000>;
@@ -27,6 +30,7 @@
 			cs42l51: cs42l51 at 4a {
 				compatible = "cirrus,cs42l51";
 				reg = <0x4a>;
+				#sound-dai-cells = <0>;
 			};
 		};
 	};
@@ -37,7 +41,7 @@
 		simple-audio-card,mclk-fs = <256>;
 
 		simple-audio-card,cpu {
-			sound-dai = <&audio0>;
+			sound-dai = <&audio0 0>;
 		};
 
 		simple-audio-card,codec {
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index 7b5a4a1..7445a15 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -381,7 +381,7 @@
 
 		audio0: audio-controller at a0000 {
 			compatible = "marvell,kirkwood-audio";
-			#sound-dai-cells = <0>;
+			#sound-dai-cells = <1>;
 			reg = <0xa0000 0x2210>;
 			interrupts = <24>;
 			clocks = <&gate_clk 9>;
-- 
2.4.0

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

* [PATCH 2/2] ASoC: simple-card: don't fail if sysclk setting is not supported
  2016-01-23 22:36 [PATCH 0/2] ARM/sound: fix audio on kirkwood-openrd-client Aaro Koskinen
  2016-01-23 22:36 ` [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio Aaro Koskinen
@ 2016-01-23 22:36 ` Aaro Koskinen
  2016-01-24 17:39   ` Andrew Lunn
  1 sibling, 1 reply; 12+ messages in thread
From: Aaro Koskinen @ 2016-01-23 22:36 UTC (permalink / raw)
  To: linux-arm-kernel

Commit e22579713ae1 ("ASoC: simple card: set cpu-dai sysclk
with mclk-fs") added sysclk / SND_SOC_CLOCK_OUT setting, that makes
asoc_simple_card_hw_params fail if the operation is not supported,
although the intention clearly was to ignore ENOTSUPP. Fix it.

The patch fixes audio playback on Kirkwood / OpenRD client,
where the following errors are seen:

	asoc-simple-card sound: ASoC: machine hw_params failed: -524
	alsa-lib: /alsa-lib-1.0.28/src/pcm/pcm_hw.c:327:(snd_pcm_hw_hw_params) SNDRV_PCM_IOCTL_HW_PARAMS failed (-524): Unknown error 524

Fixes: e22579713ae1 ("ASoC: simple card: set cpu-dai sysclk with mclk-fs")
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 sound/soc/generic/simple-card.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 54c3320..ff6fcd9 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -100,7 +100,7 @@ static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
 		if (ret && ret != -ENOTSUPP)
 			goto err;
 	}
-
+	return 0;
 err:
 	return ret;
 }
-- 
2.4.0

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

* [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio
  2016-01-23 22:36 ` [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio Aaro Koskinen
@ 2016-01-24 17:37   ` Andrew Lunn
  2016-01-24 20:56     ` Rick Thomas
  2016-01-26  8:58   ` Gregory CLEMENT
  1 sibling, 1 reply; 12+ messages in thread
From: Andrew Lunn @ 2016-01-24 17:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jan 24, 2016 at 12:36:39AM +0200, Aaro Koskinen wrote:
> Fix audio on kirkwood-openrd-client:
> 
> 1) The audio-controller was left disabled.
> 
> 2) The probe fails because cs42l51 is missing #sound-dai-cells.
> 
> 	/sound/simple-audio-card,codec: could not get #sound-dai-cells for /ocp at f1000000/i2c at 11000/cs42l51 at 4a
> 	asoc-simple-card sound: parse error -22
> 	asoc-simple-card: probe of sound failed with error -22
> 
> 3) The mapping is incorrect:
> 
> 	asoc-simple-card sound: cs42l51-hifi <-> spdif mapping ok
> 
>    should be:
> 
> 	asoc-simple-card sound: cs42l51-hifi <-> i2s mapping ok
> 
> Reported-by: Rick Thomas <rbthomas@pobox.com>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>

It would be good to have a Tested-by: from Rick.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

	     Andrew

> ---
>  arch/arm/boot/dts/kirkwood-openrd-client.dts | 6 +++++-
>  arch/arm/boot/dts/kirkwood.dtsi              | 2 +-
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/kirkwood-openrd-client.dts b/arch/arm/boot/dts/kirkwood-openrd-client.dts
> index 887b9c1..96ff59d 100644
> --- a/arch/arm/boot/dts/kirkwood-openrd-client.dts
> +++ b/arch/arm/boot/dts/kirkwood-openrd-client.dts
> @@ -20,6 +20,9 @@
>  	compatible = "marvell,openrd-client", "marvell,openrd", "marvell,kirkwood-88f6281", "marvell,kirkwood";
>  
>  	ocp at f1000000 {
> +		audio-controller at a0000 {
> +			status = "okay";
> +		};
>  		i2c at 11000 {
>  			status = "okay";
>  			clock-frequency = <400000>;
> @@ -27,6 +30,7 @@
>  			cs42l51: cs42l51 at 4a {
>  				compatible = "cirrus,cs42l51";
>  				reg = <0x4a>;
> +				#sound-dai-cells = <0>;
>  			};
>  		};
>  	};
> @@ -37,7 +41,7 @@
>  		simple-audio-card,mclk-fs = <256>;
>  
>  		simple-audio-card,cpu {
> -			sound-dai = <&audio0>;
> +			sound-dai = <&audio0 0>;
>  		};
>  
>  		simple-audio-card,codec {
> diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
> index 7b5a4a1..7445a15 100644
> --- a/arch/arm/boot/dts/kirkwood.dtsi
> +++ b/arch/arm/boot/dts/kirkwood.dtsi
> @@ -381,7 +381,7 @@
>  
>  		audio0: audio-controller at a0000 {
>  			compatible = "marvell,kirkwood-audio";
> -			#sound-dai-cells = <0>;
> +			#sound-dai-cells = <1>;
>  			reg = <0xa0000 0x2210>;
>  			interrupts = <24>;
>  			clocks = <&gate_clk 9>;
> -- 
> 2.4.0
> 

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

* [PATCH 2/2] ASoC: simple-card: don't fail if sysclk setting is not supported
  2016-01-23 22:36 ` [PATCH 2/2] ASoC: simple-card: don't fail if sysclk setting is not supported Aaro Koskinen
@ 2016-01-24 17:39   ` Andrew Lunn
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew Lunn @ 2016-01-24 17:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jan 24, 2016 at 12:36:40AM +0200, Aaro Koskinen wrote:
> Commit e22579713ae1 ("ASoC: simple card: set cpu-dai sysclk
> with mclk-fs") added sysclk / SND_SOC_CLOCK_OUT setting, that makes
> asoc_simple_card_hw_params fail if the operation is not supported,
> although the intention clearly was to ignore ENOTSUPP. Fix it.
> 
> The patch fixes audio playback on Kirkwood / OpenRD client,
> where the following errors are seen:
> 
> 	asoc-simple-card sound: ASoC: machine hw_params failed: -524
> 	alsa-lib: /alsa-lib-1.0.28/src/pcm/pcm_hw.c:327:(snd_pcm_hw_hw_params) SNDRV_PCM_IOCTL_HW_PARAMS failed (-524): Unknown error 524
> 
> Fixes: e22579713ae1 ("ASoC: simple card: set cpu-dai sysclk with mclk-fs")
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

	     Andrew

> ---
>  sound/soc/generic/simple-card.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
> index 54c3320..ff6fcd9 100644
> --- a/sound/soc/generic/simple-card.c
> +++ b/sound/soc/generic/simple-card.c
> @@ -100,7 +100,7 @@ static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
>  		if (ret && ret != -ENOTSUPP)
>  			goto err;
>  	}
> -
> +	return 0;
>  err:
>  	return ret;
>  }
> -- 
> 2.4.0
> 

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

* [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio
  2016-01-24 17:37   ` Andrew Lunn
@ 2016-01-24 20:56     ` Rick Thomas
  2016-01-24 21:40       ` Martin Michlmayr
  0 siblings, 1 reply; 12+ messages in thread
From: Rick Thomas @ 2016-01-24 20:56 UTC (permalink / raw)
  To: linux-arm-kernel


On Jan 24, 2016, at 9:37 AM, Andrew Lunn <andrew@lunn.ch> wrote:

> On Sun, Jan 24, 2016 at 12:36:39AM +0200, Aaro Koskinen wrote:
>> Fix audio on kirkwood-openrd-client:
>> 
>> 1) The audio-controller was left disabled.
>> 
>> 2) The probe fails because cs42l51 is missing #sound-dai-cells.
>> 
>> 	/sound/simple-audio-card,codec: could not get #sound-dai-cells for /ocp at f1000000/i2c at 11000/cs42l51 at 4a
>> 	asoc-simple-card sound: parse error -22
>> 	asoc-simple-card: probe of sound failed with error -22
>> 
>> 3) The mapping is incorrect:
>> 
>> 	asoc-simple-card sound: cs42l51-hifi <-> spdif mapping ok
>> 
>>   should be:
>> 
>> 	asoc-simple-card sound: cs42l51-hifi <-> i2s mapping ok
>> 
>> Reported-by: Rick Thomas <rbthomas@pobox.com>
>> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> 
> It would be good to have a Tested-by: from Rick.
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> 
> 	     Andrew


If someone will make a .deb I can download, I'll be happy to install it and test it.  Please be explicit in describing what and how you want tested.


Rick

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

* [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio
  2016-01-24 20:56     ` Rick Thomas
@ 2016-01-24 21:40       ` Martin Michlmayr
  2016-01-25  3:26         ` Rick Thomas
  0 siblings, 1 reply; 12+ messages in thread
From: Martin Michlmayr @ 2016-01-24 21:40 UTC (permalink / raw)
  To: linux-arm-kernel

* Rick Thomas <rbthomas@pobox.com> [2016-01-24 12:56]:
> > It would be good to have a Tested-by: from Rick.
> > 
> If someone will make a .deb I can download, I'll be happy to install
> it and test it.  Please be explicit in describing what and how you
> want tested.

Check your email. :)

-- 
Martin Michlmayr
http://www.cyrius.com/

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

* [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio
  2016-01-24 21:40       ` Martin Michlmayr
@ 2016-01-25  3:26         ` Rick Thomas
  2016-01-25 18:24           ` Aaro Koskinen
  0 siblings, 1 reply; 12+ messages in thread
From: Rick Thomas @ 2016-01-25  3:26 UTC (permalink / raw)
  To: linux-arm-kernel


On Jan 24, 2016, at 1:40 PM, Martin Michlmayr <tbm@cyrius.com> wrote:

> * Rick Thomas <rbthomas@pobox.com> [2016-01-24 12:56]:
>>> It would be good to have a Tested-by: from Rick.
>>> 
>> If someone will make a .deb I can download, I'll be happy to install
>> it and test it.  Please be explicit in describing what and how you
>> want tested.
> 
> Check your email. :)
> 
> -- 
> Martin Michlmayr
> http://www.cyrius.com/
> 


Got it.

Looks like mmc works with that kernel.  I was able to mount /dev/mmcblk0p1 and read files from it.

Sound we have some progress:

> root at base:~# ls -l /dev/snd
> total 0
> drwxr-xr-x 2 root root       60 Jan 24 18:23 by-path
> crw-rw---- 1 root audio 116,  2 Jan 24 18:23 controlC0
> crw-rw---- 1 root audio 116,  4 Jan 24 18:23 pcmC0D0c
> crw-rw---- 1 root audio 116,  3 Jan 24 18:23 pcmC0D0p
> crw-rw---- 1 root audio 116,  1 Jan 24 18:23 seq
> crw-rw---- 1 root audio 116, 33 Jan 24 18:23 timer
> root at base:~# cat /proc/asound/devices 
>   2: [ 0]   : control
>   3: [ 0- 0]: digital audio playback
>   4: [ 0- 0]: digital audio capture
>  33:        : timer
> root at base:~# cat /proc/asound/cards   
>  0 [i2scs42l51hifi ]: i2s-cs42l51-hif - i2s-cs42l51-hifi
>                       i2s-cs42l51-hifi

Full of hope, I did "aptitude install mp321" which went without any visible problems.

Then hooked up a pair of earphones to the "speaker" plug on the Client and ran

> root at base:~# mpg321 -v /tmp/Jersey.mp3 
> High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
> Version 0.3.2-1 (2012/03/25). Written and copyrights by Joe Drew,
> now maintained by Nanakos Chrysostomos and others.
> Uses code from various people. See 'README' for more!
> THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
> Title	: The Jersey Bounce              Artist : Zazuzaz                       
> Album	: An Evening with ZaZuZaz        Year	 : 2000
> Comment : Amazon.com Song ID: 201809221  Genre : Jazz                          
> 
> Directory: /tmp
> Playing MPEG stream from Jersey.mp3 ...
> MPEG 1.0, Layer: III, Freq: 44100, mode: Joint-Stereo, modext: 0, BPF : 2560
> Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0.
> Bitrate: 128 Kbits/s, Extension value: 0
> Audio: 1:1 conversion, rate: 44100, encoding: signed 16 bit, channels: 2
> ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
> ^C                                                                            
> [0:20] Decoding of Jersey.mp3 finished.

So it seemed to be running OK...  But there was no sound in the earphones.  I also tried adding option "-g 50" to set the gain explicitly.  Still no sound.

Is there a hardware jumper I need to set to activate sound on the OpenRD Client board?

Do I need to install another package? For example, "aptitude search '~i alsa'" gives no output, indicating, I believe, that there are no installed packages with "alsa" in their name.

The message:
> ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
seems suspicious.

Any thoughts?
Rick

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

* [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio
  2016-01-25  3:26         ` Rick Thomas
@ 2016-01-25 18:24           ` Aaro Koskinen
  2016-01-26  1:55             ` Rick Thomas
  2016-01-26  3:50             ` Rick Thomas
  0 siblings, 2 replies; 12+ messages in thread
From: Aaro Koskinen @ 2016-01-25 18:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Sun, Jan 24, 2016 at 07:26:43PM -0800, Rick Thomas wrote:
> > root at base:~# cat /proc/asound/devices 
> >   2: [ 0]   : control
> >   3: [ 0- 0]: digital audio playback
> >   4: [ 0- 0]: digital audio capture
> >  33:        : timer
> > root at base:~# cat /proc/asound/cards   
> >  0 [i2scs42l51hifi ]: i2s-cs42l51-hif - i2s-cs42l51-hifi
> >                       i2s-cs42l51-hifi
> 
> Full of hope, I did "aptitude install mp321" which went without any visible problems.
> 
> Then hooked up a pair of earphones to the "speaker" plug on the Client and ran
> 
> > root at base:~# mpg321 -v /tmp/Jersey.mp3 
> > High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
> > Version 0.3.2-1 (2012/03/25). Written and copyrights by Joe Drew,
> > now maintained by Nanakos Chrysostomos and others.
> > Uses code from various people. See 'README' for more!
> > THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
> > Title	: The Jersey Bounce              Artist : Zazuzaz                       
> > Album	: An Evening with ZaZuZaz        Year	 : 2000
> > Comment : Amazon.com Song ID: 201809221  Genre : Jazz                          
> > 
> > Directory: /tmp
> > Playing MPEG stream from Jersey.mp3 ...
> > MPEG 1.0, Layer: III, Freq: 44100, mode: Joint-Stereo, modext: 0, BPF : 2560
> > Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0.
> > Bitrate: 128 Kbits/s, Extension value: 0
> > Audio: 1:1 conversion, rate: 44100, encoding: signed 16 bit, channels: 2
> > ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
> > ^C                                                                            
> > [0:20] Decoding of Jersey.mp3 finished.
> 
> So it seemed to be running OK...  But there was no sound in the
> earphones. I also tried adding option "-g 50" to set the gain explicitly.
> Still no sound.
> 
> Is there a hardware jumper I need to set to activate sound on the
> OpenRD Client board?

On my board I need to say "amixer set PCM on". Can you post the full
output from "amixer" without any parameters?

Also check if you have this line in dmesg:

	asoc-simple-card sound: cs42l51-hifi <-> i2s mapping ok

If it says "spdif" the player runs but is silent.

A.

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

* [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio
  2016-01-25 18:24           ` Aaro Koskinen
@ 2016-01-26  1:55             ` Rick Thomas
  2016-01-26  3:50             ` Rick Thomas
  1 sibling, 0 replies; 12+ messages in thread
From: Rick Thomas @ 2016-01-26  1:55 UTC (permalink / raw)
  To: linux-arm-kernel


On Jan 25, 2016, at 10:24 AM, Aaro Koskinen <aaro.koskinen@iki.fi> wrote:

> Hi,
> 
> On Sun, Jan 24, 2016 at 07:26:43PM -0800, Rick Thomas wrote:
>>> root at base:~# cat /proc/asound/devices 
>>>  2: [ 0]   : control
>>>  3: [ 0- 0]: digital audio playback
>>>  4: [ 0- 0]: digital audio capture
>>> 33:        : timer
>>> root at base:~# cat /proc/asound/cards   
>>> 0 [i2scs42l51hifi ]: i2s-cs42l51-hif - i2s-cs42l51-hifi
>>>                      i2s-cs42l51-hifi
>> 
>> Full of hope, I did "aptitude install mp321" which went without any visible problems.
>> 
>> Then hooked up a pair of earphones to the "speaker" plug on the Client and ran
>> 
>>> root at base:~# mpg321 -v /tmp/Jersey.mp3 
>>> High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
>>> Version 0.3.2-1 (2012/03/25). Written and copyrights by Joe Drew,
>>> now maintained by Nanakos Chrysostomos and others.
>>> Uses code from various people. See 'README' for more!
>>> THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
>>> Title	: The Jersey Bounce              Artist : Zazuzaz                       
>>> Album	: An Evening with ZaZuZaz        Year	 : 2000
>>> Comment : Amazon.com Song ID: 201809221  Genre : Jazz                          
>>> 
>>> Directory: /tmp
>>> Playing MPEG stream from Jersey.mp3 ...
>>> MPEG 1.0, Layer: III, Freq: 44100, mode: Joint-Stereo, modext: 0, BPF : 2560
>>> Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0.
>>> Bitrate: 128 Kbits/s, Extension value: 0
>>> Audio: 1:1 conversion, rate: 44100, encoding: signed 16 bit, channels: 2
>>> ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
>>> ^C                                                                            
>>> [0:20] Decoding of Jersey.mp3 finished.
>> 
>> So it seemed to be running OK...  But there was no sound in the
>> earphones. I also tried adding option "-g 50" to set the gain explicitly.
>> Still no sound.
>> 
>> Is there a hardware jumper I need to set to activate sound on the
>> OpenRD Client board?
> 
> On my board I need to say "amixer set PCM on". Can you post the full
> output from "amixer" without any parameters?
> 
> Also check if you have this line in dmesg:
> 
> 	asoc-simple-card sound: cs42l51-hifi <-> i2s mapping ok
> 
> If it says "spdif" the player runs but is silent.
> 
> A.

Martin suggested that I install alsa-utils and run alsamixer in order to remove any extraneous "mute" setting.  I did that (I didn't realize alsamixer was runnable from the command line -- good to know!)

I did that and it worked!  "The Jersey Bounce" never sounded so good!

I'll do the tests that Aaro suggest, just for completeness, but it will have to wait til later tonight.

So we can add -- 

Tested-by: Rick Thomas <rbthomas@pobox.com>

Enjoy!
Rick

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

* [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio
  2016-01-25 18:24           ` Aaro Koskinen
  2016-01-26  1:55             ` Rick Thomas
@ 2016-01-26  3:50             ` Rick Thomas
  1 sibling, 0 replies; 12+ messages in thread
From: Rick Thomas @ 2016-01-26  3:50 UTC (permalink / raw)
  To: linux-arm-kernel


On Jan 25, 2016, at 10:24 AM, Aaro Koskinen <aaro.koskinen@iki.fi> wrote:

> 
> On my board I need to say "amixer set PCM on". Can you post the full
> output from "amixer" without any parameters?
> 
> Also check if you have this line in dmesg:
> 
> 	asoc-simple-card sound: cs42l51-hifi <-> i2s mapping ok
> 
> If it says "spdif" the player runs but is silent.
> 
> A.
> 

Here's the output of "amixer"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: amixer.out
Type: application/octet-stream
Size: 2059 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160125/825c4c7d/attachment.obj>
-------------- next part --------------


This is after having run alsamixer (per Martin's suggestion) and un-mute-ing everything I could find.

And here's the output of "dmesg"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmesg.out
Type: application/octet-stream
Size: 18738 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160125/825c4c7d/attachment-0001.obj>
-------------- next part --------------


In particular

> rbthomas at base:~$ dmesg | grep sound    
> [   11.777850] asoc-simple-card sound: cs42l51-hifi <-> i2s mapping ok

Everything is working fine now.

Thanks for all the help!
Rick

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

* [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio
  2016-01-23 22:36 ` [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio Aaro Koskinen
  2016-01-24 17:37   ` Andrew Lunn
@ 2016-01-26  8:58   ` Gregory CLEMENT
  1 sibling, 0 replies; 12+ messages in thread
From: Gregory CLEMENT @ 2016-01-26  8:58 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Aaro,
 
 On sam., janv. 23 2016, Aaro Koskinen <aaro.koskinen@iki.fi> wrote:

> Fix audio on kirkwood-openrd-client:
>
> 1) The audio-controller was left disabled.
>
> 2) The probe fails because cs42l51 is missing #sound-dai-cells.
>
> 	/sound/simple-audio-card,codec: could not get #sound-dai-cells for /ocp at f1000000/i2c at 11000/cs42l51 at 4a
> 	asoc-simple-card sound: parse error -22
> 	asoc-simple-card: probe of sound failed with error -22
>
> 3) The mapping is incorrect:
>
> 	asoc-simple-card sound: cs42l51-hifi <-> spdif mapping ok
>
>    should be:
>
> 	asoc-simple-card sound: cs42l51-hifi <-> i2s mapping ok
>
> Reported-by: Rick Thomas <rbthomas@pobox.com>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>

Applied on mvebu/dt with Reviewed-by tag from Andrew Lunn and Tested-by
tag from Rick Thomas.

Thanks,

Gregory

> ---
>  arch/arm/boot/dts/kirkwood-openrd-client.dts | 6 +++++-
>  arch/arm/boot/dts/kirkwood.dtsi              | 2 +-
>  2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/kirkwood-openrd-client.dts b/arch/arm/boot/dts/kirkwood-openrd-client.dts
> index 887b9c1..96ff59d 100644
> --- a/arch/arm/boot/dts/kirkwood-openrd-client.dts
> +++ b/arch/arm/boot/dts/kirkwood-openrd-client.dts
> @@ -20,6 +20,9 @@
>  	compatible = "marvell,openrd-client", "marvell,openrd", "marvell,kirkwood-88f6281", "marvell,kirkwood";
>  
>  	ocp at f1000000 {
> +		audio-controller at a0000 {
> +			status = "okay";
> +		};
>  		i2c at 11000 {
>  			status = "okay";
>  			clock-frequency = <400000>;
> @@ -27,6 +30,7 @@
>  			cs42l51: cs42l51 at 4a {
>  				compatible = "cirrus,cs42l51";
>  				reg = <0x4a>;
> +				#sound-dai-cells = <0>;
>  			};
>  		};
>  	};
> @@ -37,7 +41,7 @@
>  		simple-audio-card,mclk-fs = <256>;
>  
>  		simple-audio-card,cpu {
> -			sound-dai = <&audio0>;
> +			sound-dai = <&audio0 0>;
>  		};
>  
>  		simple-audio-card,codec {
> diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
> index 7b5a4a1..7445a15 100644
> --- a/arch/arm/boot/dts/kirkwood.dtsi
> +++ b/arch/arm/boot/dts/kirkwood.dtsi
> @@ -381,7 +381,7 @@
>  
>  		audio0: audio-controller at a0000 {
>  			compatible = "marvell,kirkwood-audio";
> -			#sound-dai-cells = <0>;
> +			#sound-dai-cells = <1>;
>  			reg = <0xa0000 0x2210>;
>  			interrupts = <24>;
>  			clocks = <&gate_clk 9>;
> -- 
> 2.4.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

end of thread, other threads:[~2016-01-26  8:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-23 22:36 [PATCH 0/2] ARM/sound: fix audio on kirkwood-openrd-client Aaro Koskinen
2016-01-23 22:36 ` [PATCH 1/2] ARM: DTS: kirkwood-openrd-client: fix audio Aaro Koskinen
2016-01-24 17:37   ` Andrew Lunn
2016-01-24 20:56     ` Rick Thomas
2016-01-24 21:40       ` Martin Michlmayr
2016-01-25  3:26         ` Rick Thomas
2016-01-25 18:24           ` Aaro Koskinen
2016-01-26  1:55             ` Rick Thomas
2016-01-26  3:50             ` Rick Thomas
2016-01-26  8:58   ` Gregory CLEMENT
2016-01-23 22:36 ` [PATCH 2/2] ASoC: simple-card: don't fail if sysclk setting is not supported Aaro Koskinen
2016-01-24 17:39   ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).