Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-16 Thread Peter Ujfalusi
Hi,

On 03/16/11 12:52, ext Bob Liu wrote:
> Yeah, it works!!  Thank you very much.

You welcome!

> So in order to make aplay work I need to set all of these?
> 
> amixer sset 'HeadsetL Mixer AudioL2' on
> amixer sset 'HeadsetR Mixer AudioR2' on
> amixer sset 'Headset' 2
> amixer cset name="DAC2 Analog Playback Switch" 1
> amixer cset name="DAC2 Analog Playback Volume" 12
> amixer cset name="DAC2 Digital Coarse Playback Volume" 2
> amixer cset name="DAC2 Digital Fine Playback Volume" 50
> 
> 
> And what should I set making arecord also work?

Beagle has the AUXL/R connected to audio in jack.
So you need a line-in type of input, not a mic.

In theory:
amixer sset 'Analog' 1 # 6dB amplification
amixer sset 'Analog Left AUXL' cap
amixer sset 'Analog Right AUXR' cap
amixer sset 'TX1' 'Analog'
amixer sset 'TX1 Digital' 5 # 5db amplification

arecord -Dhw:0 -fdat -twav recording.wav

You can play with the gains, if they are not correct.

-- 
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-16 Thread Bob Liu
On Wed, Mar 16, 2011 at 6:42 PM, Peter Ujfalusi
 wrote:
> Hi,
>
> On 03/16/11 11:27, ext Bob Liu wrote:
>> On Wed, Mar 16, 2011 at 3:40 PM, Peter Ujfalusi
>>  wrote:
>>> On 03/16/11 07:45, ext Bob Liu wrote:
> amixer cset name="HandsfreeR Switch" 1
> amixer cset name="HandsfreeR Mux" 2
> amixer cset name="HandsfreeL Switch" 1
> amixer cset name="HandsfreeL Mux" 2
> amixer cset name="DAC1 Analog Playback Switch" 1
> amixer cset name="DAC1 Analog Playback Volume" 12
> amixer cset name="DAC1 Digital Coarse Playback Volume" 2
> amixer cset name="DAC1 Digital Fine Playback Volume" 50
> amixer cset name="DAC2 Analog Playback Switch" 1
> amixer cset name="DAC2 Analog Playback Volume" 12
> amixer cset name="DAC2 Digital Coarse Playback Volume" 2
> amixer cset name="DAC2 Digital Fine Playback Volume" 50
>
> aplay -D plughw:0,0 -d 5 /mnt/mmc/beethoven.wav
>>>
>>> AFAIK the Beagle has the the Headset lines routed to the stereo jack, so
>>> you might want to try:
>>>
>>> amixer sset 'HeadsetL Mixer AudioL2' on
>>> amixer sset 'HeadsetR Mixer AudioR2' on
>>>
>>> Do apply the gain settings related to DAC2 path. This is the path for
>>> the stereo (2ch mode).
>>>
>>
>> Below is my log, I have reboot the system, still no sound.
>> Did I missed something?
>> Thanks
>>
>> ---
>> # amixer sset 'HeadsetL Mixer AudioL2' on
>> Simple mixer control 'HeadsetL Mixer AudioL2',0
>>   Capabilities: pswitch pswitch-joined penum
>>   Playback channels: Mono
>>   Mono: Playback [on]
>> # amixer sset 'HeadsetR Mixer AudioR2' on
>> Simple mixer control 'HeadsetR Mixer AudioR2',0
>>   Capabilities: pswitch pswitch-joined penum
>>   Playback channels: Mono
>>   Mono: Playback [on]
>> #
>> # amixer cset name="DAC2 Analog Playback Switch" 1
>> name="DAC2 Digital Coarse Playback Volume" 2
>> amixer cset name="DAC2 Digital Fine Playback Volume" 50
>> numid=9,iface=MIXER,name='DAC2 Analog Playback Switch'
>>   ; type=BOOLEAN,access=rw--,values=2
>>   : values=on,on
>> # amixer cset name="DAC2 Analog Playback Volume" 12
>> numid=7,iface=MIXER,name='DAC2 Analog Playback Volume'
>>   ; type=INTEGER,access=rw---R--,values=2,min=0,max=18,step=0
>>   : values=12,12
>>   | dBscale-min=-24.00dB,step=2.00dB,mute=0
>> # amixer cset name="DAC2 Digital Coarse Playback Volume" 2
>> numid=5,iface=MIXER,name='DAC2 Digital Coarse Playback Volume'
>>   ; type=INTEGER,access=rw---R--,values=2,min=0,max=2,step=0
>>   : values=2,2
>>   | dBscale-min=0.00dB,step=6.00dB,mute=0
>> # amixer cset name="DAC2 Digital Fine Playback Volume" 50
>> numid=3,iface=MIXER,name='DAC2 Digital Fine Playback Volume'
>>   ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
>>   : values=50,50
>>   | dBscale-min=-63.00dB,step=1.00dB,mute=1
>> #
>> # aplay ~/alsa/ap.wav
>> Playing WAVE '/home/bob/alsa/ap.wav' : Signed 16 bit Little Endian,
>> Rate 22050 Hz, Stereo
>>
>> 
>
> I have downloaded the documentation for the BeagleBoard xM.
> The stereo audio out jack is connected to the HSOL/R (Headset L/R) of
> the codec.
> The commands you execute should be correct, but one thing might be missing:
>
> amixer sset 'Headset' 2
>
> Does this helps?
>

Yeah, it works!!  Thank you very much.

So in order to make aplay work I need to set all of these?

amixer sset 'HeadsetL Mixer AudioL2' on
amixer sset 'HeadsetR Mixer AudioR2' on
amixer sset 'Headset' 2
amixer cset name="DAC2 Analog Playback Switch" 1
amixer cset name="DAC2 Analog Playback Volume" 12
amixer cset name="DAC2 Digital Coarse Playback Volume" 2
amixer cset name="DAC2 Digital Fine Playback Volume" 50


And what should I set making arecord also work?
Sorry for that because I didn't have any alsa experiences.

Thanks.

>
> The Beagle doc has this to say about the audio output:
>
> 8.16.3 Audio Output Jack
> A single 3.5mm jack is provided on BeagleBoard to support external
> stereo audio output
> devices such as headphones and powered speakers. This interface is not
> amplified and
> may require the use of amplified speakers in certain instances.
>

-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-16 Thread Peter Ujfalusi
Hi,

On 03/16/11 11:27, ext Bob Liu wrote:
> On Wed, Mar 16, 2011 at 3:40 PM, Peter Ujfalusi
>  wrote:
>> On 03/16/11 07:45, ext Bob Liu wrote:
 amixer cset name="HandsfreeR Switch" 1
 amixer cset name="HandsfreeR Mux" 2
 amixer cset name="HandsfreeL Switch" 1
 amixer cset name="HandsfreeL Mux" 2
 amixer cset name="DAC1 Analog Playback Switch" 1
 amixer cset name="DAC1 Analog Playback Volume" 12
 amixer cset name="DAC1 Digital Coarse Playback Volume" 2
 amixer cset name="DAC1 Digital Fine Playback Volume" 50
 amixer cset name="DAC2 Analog Playback Switch" 1
 amixer cset name="DAC2 Analog Playback Volume" 12
 amixer cset name="DAC2 Digital Coarse Playback Volume" 2
 amixer cset name="DAC2 Digital Fine Playback Volume" 50

 aplay -D plughw:0,0 -d 5 /mnt/mmc/beethoven.wav
>>
>> AFAIK the Beagle has the the Headset lines routed to the stereo jack, so
>> you might want to try:
>>
>> amixer sset 'HeadsetL Mixer AudioL2' on
>> amixer sset 'HeadsetR Mixer AudioR2' on
>>
>> Do apply the gain settings related to DAC2 path. This is the path for
>> the stereo (2ch mode).
>>
> 
> Below is my log, I have reboot the system, still no sound.
> Did I missed something?
> Thanks
> 
> ---
> # amixer sset 'HeadsetL Mixer AudioL2' on
> Simple mixer control 'HeadsetL Mixer AudioL2',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [on]
> # amixer sset 'HeadsetR Mixer AudioR2' on
> Simple mixer control 'HeadsetR Mixer AudioR2',0
>   Capabilities: pswitch pswitch-joined penum
>   Playback channels: Mono
>   Mono: Playback [on]
> #
> # amixer cset name="DAC2 Analog Playback Switch" 1
> name="DAC2 Digital Coarse Playback Volume" 2
> amixer cset name="DAC2 Digital Fine Playback Volume" 50
> numid=9,iface=MIXER,name='DAC2 Analog Playback Switch'
>   ; type=BOOLEAN,access=rw--,values=2
>   : values=on,on
> # amixer cset name="DAC2 Analog Playback Volume" 12
> numid=7,iface=MIXER,name='DAC2 Analog Playback Volume'
>   ; type=INTEGER,access=rw---R--,values=2,min=0,max=18,step=0
>   : values=12,12
>   | dBscale-min=-24.00dB,step=2.00dB,mute=0
> # amixer cset name="DAC2 Digital Coarse Playback Volume" 2
> numid=5,iface=MIXER,name='DAC2 Digital Coarse Playback Volume'
>   ; type=INTEGER,access=rw---R--,values=2,min=0,max=2,step=0
>   : values=2,2
>   | dBscale-min=0.00dB,step=6.00dB,mute=0
> # amixer cset name="DAC2 Digital Fine Playback Volume" 50
> numid=3,iface=MIXER,name='DAC2 Digital Fine Playback Volume'
>   ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
>   : values=50,50
>   | dBscale-min=-63.00dB,step=1.00dB,mute=1
> #
> # aplay ~/alsa/ap.wav
> Playing WAVE '/home/bob/alsa/ap.wav' : Signed 16 bit Little Endian,
> Rate 22050 Hz, Stereo
> 
> 

I have downloaded the documentation for the BeagleBoard xM.
The stereo audio out jack is connected to the HSOL/R (Headset L/R) of
the codec.
The commands you execute should be correct, but one thing might be missing:

amixer sset 'Headset' 2

Does this helps?

The Beagle doc has this to say about the audio output:

8.16.3 Audio Output Jack
A single 3.5mm jack is provided on BeagleBoard to support external
stereo audio output
devices such as headphones and powered speakers. This interface is not
amplified and
may require the use of amplified speakers in certain instances.

-- 
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-16 Thread Bob Liu
On Wed, Mar 16, 2011 at 3:40 PM, Peter Ujfalusi
 wrote:
> On 03/16/11 07:45, ext Bob Liu wrote:
>>> amixer cset name="HandsfreeR Switch" 1
>>> amixer cset name="HandsfreeR Mux" 2
>>> amixer cset name="HandsfreeL Switch" 1
>>> amixer cset name="HandsfreeL Mux" 2
>>> amixer cset name="DAC1 Analog Playback Switch" 1
>>> amixer cset name="DAC1 Analog Playback Volume" 12
>>> amixer cset name="DAC1 Digital Coarse Playback Volume" 2
>>> amixer cset name="DAC1 Digital Fine Playback Volume" 50
>>> amixer cset name="DAC2 Analog Playback Switch" 1
>>> amixer cset name="DAC2 Analog Playback Volume" 12
>>> amixer cset name="DAC2 Digital Coarse Playback Volume" 2
>>> amixer cset name="DAC2 Digital Fine Playback Volume" 50
>>>
>>> aplay -D plughw:0,0 -d 5 /mnt/mmc/beethoven.wav
>
> AFAIK the Beagle has the the Headset lines routed to the stereo jack, so
> you might want to try:
>
> amixer sset 'HeadsetL Mixer AudioL2' on
> amixer sset 'HeadsetR Mixer AudioR2' on
>
> Do apply the gain settings related to DAC2 path. This is the path for
> the stereo (2ch mode).
>

Below is my log, I have reboot the system, still no sound.
Did I missed something?
Thanks

---
# amixer sset 'HeadsetL Mixer AudioL2' on
Simple mixer control 'HeadsetL Mixer AudioL2',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
# amixer sset 'HeadsetR Mixer AudioR2' on
Simple mixer control 'HeadsetR Mixer AudioR2',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
#
# amixer cset name="DAC2 Analog Playback Switch" 1
name="DAC2 Digital Coarse Playback Volume" 2
amixer cset name="DAC2 Digital Fine Playback Volume" 50
numid=9,iface=MIXER,name='DAC2 Analog Playback Switch'
  ; type=BOOLEAN,access=rw--,values=2
  : values=on,on
# amixer cset name="DAC2 Analog Playback Volume" 12
numid=7,iface=MIXER,name='DAC2 Analog Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=18,step=0
  : values=12,12
  | dBscale-min=-24.00dB,step=2.00dB,mute=0
# amixer cset name="DAC2 Digital Coarse Playback Volume" 2
numid=5,iface=MIXER,name='DAC2 Digital Coarse Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=2,step=0
  : values=2,2
  | dBscale-min=0.00dB,step=6.00dB,mute=0
# amixer cset name="DAC2 Digital Fine Playback Volume" 50
numid=3,iface=MIXER,name='DAC2 Digital Fine Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
  : values=50,50
  | dBscale-min=-63.00dB,step=1.00dB,mute=1
#
# aplay ~/alsa/ap.wav
Playing WAVE '/home/bob/alsa/ap.wav' : Signed 16 bit Little Endian,
Rate 22050 Hz, Stereo


-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-16 Thread Peter Ujfalusi
On 03/16/11 07:45, ext Bob Liu wrote:
>> amixer cset name="HandsfreeR Switch" 1
>> amixer cset name="HandsfreeR Mux" 2
>> amixer cset name="HandsfreeL Switch" 1
>> amixer cset name="HandsfreeL Mux" 2
>> amixer cset name="DAC1 Analog Playback Switch" 1
>> amixer cset name="DAC1 Analog Playback Volume" 12
>> amixer cset name="DAC1 Digital Coarse Playback Volume" 2
>> amixer cset name="DAC1 Digital Fine Playback Volume" 50
>> amixer cset name="DAC2 Analog Playback Switch" 1
>> amixer cset name="DAC2 Analog Playback Volume" 12
>> amixer cset name="DAC2 Digital Coarse Playback Volume" 2
>> amixer cset name="DAC2 Digital Fine Playback Volume" 50
>>
>> aplay -D plughw:0,0 -d 5 /mnt/mmc/beethoven.wav

AFAIK the Beagle has the the Headset lines routed to the stereo jack, so
you might want to try:

amixer sset 'HeadsetL Mixer AudioL2' on
amixer sset 'HeadsetR Mixer AudioR2' on

Do apply the gain settings related to DAC2 path. This is the path for
the stereo (2ch mode).

Let me know, if it works.

-- 
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [HELP] Audio on BeagleBoard xM can't work

2011-03-16 Thread Premi, Sanjeev
> -Original Message-
> From: Bob Liu [mailto:lliu...@gmail.com] 
> Sent: Wednesday, March 16, 2011 9:09 AM
> To: Premi, Sanjeev
> Cc: Jarkko Nikula; linux-omap@vger.kernel.org; 
> broo...@opensource.wolfsonmicro.com; l...@slimlogic.co.uk; 
> l...@metafoo.de; p...@pwsan.com; peter.ujfal...@nokia.com; 
> Koyamangalath, Abhilash
> Subject: Re: [HELP] Audio on BeagleBoard xM can't work
> 
> On Wed, Mar 16, 2011 at 12:21 AM, Premi, Sanjeev  wrote:
> >> -Original Message-
> >> From: linux-omap-ow...@vger.kernel.org
> >> [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Bob Liu
> >> Sent: Tuesday, March 15, 2011 3:27 PM
> >> To: Jarkko Nikula
> >> Cc: linux-omap@vger.kernel.org;
> >> broo...@opensource.wolfsonmicro.com; l...@slimlogic.co.uk;
> >> l...@metafoo.de; p...@pwsan.com; peter.ujfal...@nokia.com
> >> Subject: Re: [HELP] Audio on BeagleBoard xM can't work
> >>
> >> On Tue, Mar 15, 2011 at 5:53 PM, Jarkko Nikula
> >>  wrote:
> >> > On Tue, 15 Mar 2011 11:12:17 +0800
> >> > Bob Liu  wrote:
> >> >
> >> >> It seems that the code in sound/soc/omap/omap-mcbsp.c uses
> >> the function
> >> >> "cpu-is-omap343x()" which fails and returns ENODEV.
> >> >>
> >> >> But I have enabled "OMAP3430 support" in "System Type" /
> >> "TI OMAP2/3/4
> >> >> Specific Features",
> >> >> why it still return ENODEV? (Attached my kernel config).
> >> >>
> >> >> And after I changed that check to "cpu-is-omap34xx()", 
> there was no
> >> >> error message but neither any audio output,
> >> >> I can't hear any sound.
> >> >> 
> >> >
> >> > Is the DMA running after you change the cpu_is_omap34xx and
> >> try to play
> >> > e.g. "aplay /dev/urandom"? If audio is running you should see DMA
> >> > interrupt count increasing with "grep DMA /proc/interrupts".
> >> >
> >>
> >> Yes, DMA interrupt count increased after aplay /dev/urandom or some
> >> other audio file.
> >> Thanks
> >>
> >> > If that is working then issue could be in codec side. I 
> don't have a
> >> > beagle at the moment to verify but IRCC something like ~10
> >> TWL4030 ALSA
> >> > controls must be adjusted in order to route audio from DAC
> >> to outputs
> >> > at proper volume.
> >
> > I don't have HW with me right now, can you try the following?
> > (Got the steps over phone from Abhilash)
> >
> > 1) run command "alsamixer"
> > 2) Un-mute by pressing the key "m"
> > 3) Play the audio using aplay
> >
> > If it doesn't work, you may want to check the options used by
> > alsamixer. I will be able to try it myself tomorrow morning.
> >
> 
> Thanks for your reply.
> It seems pressing the key "m" has no effect during alsamixer and there
> are so many options I don't know how to adjust it.

I haven't yet come to running this test myself. "m" (or as the wiki here
mentions "M") is meant to toggle mute.
See : http://alsa.opensrc.org/Alsamixer for more details on alsamixer.

~sanjeev

> 
> -- 
> Regards,
> --Bob
> --
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-15 Thread Bob Liu
On Wed, Mar 16, 2011 at 1:31 PM, ABRAHAM, KISHON VIJAY  wrote:
> On Wed, Mar 16, 2011 at 9:09 AM, Bob Liu  wrote:
>> On Wed, Mar 16, 2011 at 12:21 AM, Premi, Sanjeev  wrote:
>>>> -Original Message-
>>>> From: linux-omap-ow...@vger.kernel.org
>>>> [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Bob Liu
>>>> Sent: Tuesday, March 15, 2011 3:27 PM
>>>> To: Jarkko Nikula
>>>> Cc: linux-omap@vger.kernel.org;
>>>> broo...@opensource.wolfsonmicro.com; l...@slimlogic.co.uk;
>>>> l...@metafoo.de; p...@pwsan.com; peter.ujfal...@nokia.com
>>>> Subject: Re: [HELP] Audio on BeagleBoard xM can't work
>>>>
>>>> On Tue, Mar 15, 2011 at 5:53 PM, Jarkko Nikula
>>>>  wrote:
>>>> > On Tue, 15 Mar 2011 11:12:17 +0800
>>>> > Bob Liu  wrote:
>>>> >
>>>> >> It seems that the code in sound/soc/omap/omap-mcbsp.c uses
>>>> the function
>>>> >> "cpu-is-omap343x()" which fails and returns ENODEV.
>>>> >>
>>>> >> But I have enabled "OMAP3430 support" in "System Type" /
>>>> "TI OMAP2/3/4
>>>> >> Specific Features",
>>>> >> why it still return ENODEV? (Attached my kernel config).
>>>> >>
>>>> >> And after I changed that check to "cpu-is-omap34xx()", there was no
>>>> >> error message but neither any audio output,
>>>> >> I can't hear any sound.
>>>> >> 
>>>> >
>>>> > Is the DMA running after you change the cpu_is_omap34xx and
>>>> try to play
>>>> > e.g. "aplay /dev/urandom"? If audio is running you should see DMA
>>>> > interrupt count increasing with "grep DMA /proc/interrupts".
>>>> >
>>>>
>>>> Yes, DMA interrupt count increased after aplay /dev/urandom or some
>>>> other audio file.
>>>> Thanks
>>>>
>>>> > If that is working then issue could be in codec side. I don't have a
>>>> > beagle at the moment to verify but IRCC something like ~10
>>>> TWL4030 ALSA
>>>> > controls must be adjusted in order to route audio from DAC
>>>> to outputs
>>>> > at proper volume.
>>>
>>> I don't have HW with me right now, can you try the following?
>>> (Got the steps over phone from Abhilash)
>>>
>>> 1) run command "alsamixer"
>>> 2) Un-mute by pressing the key "m"
>>> 3) Play the audio using aplay
>>>
>>> If it doesn't work, you may want to check the options used by
>>> alsamixer. I will be able to try it myself tomorrow morning.
>>>
>>
>> Thanks for your reply.
>> It seems pressing the key "m" has no effect during alsamixer and there
>> are so many options I don't know how to adjust it.
>
>   I've never tried playing audio in beagleboardxm but I've tried
> using 3430 SDP.
>   You can try with the following settings.
>
> amixer cset name="HandsfreeR Switch" 1
> amixer cset name="HandsfreeR Mux" 2
> amixer cset name="HandsfreeL Switch" 1
> amixer cset name="HandsfreeL Mux" 2
> amixer cset name="DAC1 Analog Playback Switch" 1
> amixer cset name="DAC1 Analog Playback Volume" 12
> amixer cset name="DAC1 Digital Coarse Playback Volume" 2
> amixer cset name="DAC1 Digital Fine Playback Volume" 50
> amixer cset name="DAC2 Analog Playback Switch" 1
> amixer cset name="DAC2 Analog Playback Volume" 12
> amixer cset name="DAC2 Digital Coarse Playback Volume" 2
> amixer cset name="DAC2 Digital Fine Playback Volume" 50
>
> aplay -D plughw:0,0 -d 5 /mnt/mmc/beethoven.wav
>

Hi, Kishon

Thanks for your help.
After these amixer commands, there is still no sound.
Below is amixer result.
(I am sure the hardware has no problem because I used kernel-2.6.32
the audio works fine).

---
# amixer cget name="HandsfreeR Switch"
numid=35,iface=MIXER,name='HandsfreeR Switch'
  ; type=BOOLEAN,access=rw--,values=1
  : values=on
# amixer cget name="HandsfreeR Mux"
numid=36,iface=MIXER,name='HandsfreeR Mux'
  ; type=ENUMERATED,access=rw--,values=1,items=4
  ; Item #0 'Voice'
  ; Item #1 'AudioR1'
  ; Item #2 '

Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-15 Thread ABRAHAM, KISHON VIJAY
On Wed, Mar 16, 2011 at 9:09 AM, Bob Liu  wrote:
> On Wed, Mar 16, 2011 at 12:21 AM, Premi, Sanjeev  wrote:
>>> -Original Message-
>>> From: linux-omap-ow...@vger.kernel.org
>>> [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Bob Liu
>>> Sent: Tuesday, March 15, 2011 3:27 PM
>>> To: Jarkko Nikula
>>> Cc: linux-omap@vger.kernel.org;
>>> broo...@opensource.wolfsonmicro.com; l...@slimlogic.co.uk;
>>> l...@metafoo.de; p...@pwsan.com; peter.ujfal...@nokia.com
>>> Subject: Re: [HELP] Audio on BeagleBoard xM can't work
>>>
>>> On Tue, Mar 15, 2011 at 5:53 PM, Jarkko Nikula
>>>  wrote:
>>> > On Tue, 15 Mar 2011 11:12:17 +0800
>>> > Bob Liu  wrote:
>>> >
>>> >> It seems that the code in sound/soc/omap/omap-mcbsp.c uses
>>> the function
>>> >> "cpu-is-omap343x()" which fails and returns ENODEV.
>>> >>
>>> >> But I have enabled "OMAP3430 support" in "System Type" /
>>> "TI OMAP2/3/4
>>> >> Specific Features",
>>> >> why it still return ENODEV? (Attached my kernel config).
>>> >>
>>> >> And after I changed that check to "cpu-is-omap34xx()", there was no
>>> >> error message but neither any audio output,
>>> >> I can't hear any sound.
>>> >> 
>>> >
>>> > Is the DMA running after you change the cpu_is_omap34xx and
>>> try to play
>>> > e.g. "aplay /dev/urandom"? If audio is running you should see DMA
>>> > interrupt count increasing with "grep DMA /proc/interrupts".
>>> >
>>>
>>> Yes, DMA interrupt count increased after aplay /dev/urandom or some
>>> other audio file.
>>> Thanks
>>>
>>> > If that is working then issue could be in codec side. I don't have a
>>> > beagle at the moment to verify but IRCC something like ~10
>>> TWL4030 ALSA
>>> > controls must be adjusted in order to route audio from DAC
>>> to outputs
>>> > at proper volume.
>>
>> I don't have HW with me right now, can you try the following?
>> (Got the steps over phone from Abhilash)
>>
>> 1) run command "alsamixer"
>> 2) Un-mute by pressing the key "m"
>> 3) Play the audio using aplay
>>
>> If it doesn't work, you may want to check the options used by
>> alsamixer. I will be able to try it myself tomorrow morning.
>>
>
> Thanks for your reply.
> It seems pressing the key "m" has no effect during alsamixer and there
> are so many options I don't know how to adjust it.

   I've never tried playing audio in beagleboardxm but I've tried
using 3430 SDP.
   You can try with the following settings.

amixer cset name="HandsfreeR Switch" 1
amixer cset name="HandsfreeR Mux" 2
amixer cset name="HandsfreeL Switch" 1
amixer cset name="HandsfreeL Mux" 2
amixer cset name="DAC1 Analog Playback Switch" 1
amixer cset name="DAC1 Analog Playback Volume" 12
amixer cset name="DAC1 Digital Coarse Playback Volume" 2
amixer cset name="DAC1 Digital Fine Playback Volume" 50
amixer cset name="DAC2 Analog Playback Switch" 1
amixer cset name="DAC2 Analog Playback Volume" 12
amixer cset name="DAC2 Digital Coarse Playback Volume" 2
amixer cset name="DAC2 Digital Fine Playback Volume" 50

aplay -D plughw:0,0 -d 5 /mnt/mmc/beethoven.wav

-Kishon

>
> --
> Regards,
> --Bob
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-15 Thread Bob Liu
On Wed, Mar 16, 2011 at 12:21 AM, Premi, Sanjeev  wrote:
>> -Original Message-
>> From: linux-omap-ow...@vger.kernel.org
>> [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Bob Liu
>> Sent: Tuesday, March 15, 2011 3:27 PM
>> To: Jarkko Nikula
>> Cc: linux-omap@vger.kernel.org;
>> broo...@opensource.wolfsonmicro.com; l...@slimlogic.co.uk;
>> l...@metafoo.de; p...@pwsan.com; peter.ujfal...@nokia.com
>> Subject: Re: [HELP] Audio on BeagleBoard xM can't work
>>
>> On Tue, Mar 15, 2011 at 5:53 PM, Jarkko Nikula
>>  wrote:
>> > On Tue, 15 Mar 2011 11:12:17 +0800
>> > Bob Liu  wrote:
>> >
>> >> It seems that the code in sound/soc/omap/omap-mcbsp.c uses
>> the function
>> >> "cpu-is-omap343x()" which fails and returns ENODEV.
>> >>
>> >> But I have enabled "OMAP3430 support" in "System Type" /
>> "TI OMAP2/3/4
>> >> Specific Features",
>> >> why it still return ENODEV? (Attached my kernel config).
>> >>
>> >> And after I changed that check to "cpu-is-omap34xx()", there was no
>> >> error message but neither any audio output,
>> >> I can't hear any sound.
>> >> 
>> >
>> > Is the DMA running after you change the cpu_is_omap34xx and
>> try to play
>> > e.g. "aplay /dev/urandom"? If audio is running you should see DMA
>> > interrupt count increasing with "grep DMA /proc/interrupts".
>> >
>>
>> Yes, DMA interrupt count increased after aplay /dev/urandom or some
>> other audio file.
>> Thanks
>>
>> > If that is working then issue could be in codec side. I don't have a
>> > beagle at the moment to verify but IRCC something like ~10
>> TWL4030 ALSA
>> > controls must be adjusted in order to route audio from DAC
>> to outputs
>> > at proper volume.
>
> I don't have HW with me right now, can you try the following?
> (Got the steps over phone from Abhilash)
>
> 1) run command "alsamixer"
> 2) Un-mute by pressing the key "m"
> 3) Play the audio using aplay
>
> If it doesn't work, you may want to check the options used by
> alsamixer. I will be able to try it myself tomorrow morning.
>

Thanks for your reply.
It seems pressing the key "m" has no effect during alsamixer and there
are so many options I don't know how to adjust it.

-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [HELP] Audio on BeagleBoard xM can't work

2011-03-15 Thread Premi, Sanjeev
> -Original Message-
> From: linux-omap-ow...@vger.kernel.org 
> [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Bob Liu
> Sent: Tuesday, March 15, 2011 3:27 PM
> To: Jarkko Nikula
> Cc: linux-omap@vger.kernel.org; 
> broo...@opensource.wolfsonmicro.com; l...@slimlogic.co.uk; 
> l...@metafoo.de; p...@pwsan.com; peter.ujfal...@nokia.com
> Subject: Re: [HELP] Audio on BeagleBoard xM can't work
> 
> On Tue, Mar 15, 2011 at 5:53 PM, Jarkko Nikula 
>  wrote:
> > On Tue, 15 Mar 2011 11:12:17 +0800
> > Bob Liu  wrote:
> >
> >> It seems that the code in sound/soc/omap/omap-mcbsp.c uses 
> the function
> >> "cpu-is-omap343x()" which fails and returns ENODEV.
> >>
> >> But I have enabled "OMAP3430 support" in "System Type" / 
> "TI OMAP2/3/4
> >> Specific Features",
> >> why it still return ENODEV? (Attached my kernel config).
> >>
> >> And after I changed that check to "cpu-is-omap34xx()", there was no
> >> error message but neither any audio output,
> >> I can't hear any sound.
> >> 
> >
> > Is the DMA running after you change the cpu_is_omap34xx and 
> try to play
> > e.g. "aplay /dev/urandom"? If audio is running you should see DMA
> > interrupt count increasing with "grep DMA /proc/interrupts".
> >
> 
> Yes, DMA interrupt count increased after aplay /dev/urandom or some
> other audio file.
> Thanks
> 
> > If that is working then issue could be in codec side. I don't have a
> > beagle at the moment to verify but IRCC something like ~10 
> TWL4030 ALSA
> > controls must be adjusted in order to route audio from DAC 
> to outputs
> > at proper volume.

I don't have HW with me right now, can you try the following?
(Got the steps over phone from Abhilash)

1) run command "alsamixer"
2) Un-mute by pressing the key "m"
3) Play the audio using aplay

If it doesn't work, you may want to check the options used by
alsamixer. I will be able to try it myself tomorrow morning.

~sanjeev

> >
> 
> -- 
> Regards,
> --Bob
> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-omap" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-15 Thread Bob Liu
On Tue, Mar 15, 2011 at 5:53 PM, Jarkko Nikula  wrote:
> On Tue, 15 Mar 2011 11:12:17 +0800
> Bob Liu  wrote:
>
>> It seems that the code in sound/soc/omap/omap-mcbsp.c uses the function
>> "cpu-is-omap343x()" which fails and returns ENODEV.
>>
>> But I have enabled "OMAP3430 support" in "System Type" / "TI OMAP2/3/4
>> Specific Features",
>> why it still return ENODEV? (Attached my kernel config).
>>
>> And after I changed that check to "cpu-is-omap34xx()", there was no
>> error message but neither any audio output,
>> I can't hear any sound.
>> 
>
> Is the DMA running after you change the cpu_is_omap34xx and try to play
> e.g. "aplay /dev/urandom"? If audio is running you should see DMA
> interrupt count increasing with "grep DMA /proc/interrupts".
>

Yes, DMA interrupt count increased after aplay /dev/urandom or some
other audio file.
Thanks

> If that is working then issue could be in codec side. I don't have a
> beagle at the moment to verify but IRCC something like ~10 TWL4030 ALSA
> controls must be adjusted in order to route audio from DAC to outputs
> at proper volume.
>

-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-15 Thread Jarkko Nikula
On Tue, 15 Mar 2011 11:12:17 +0800
Bob Liu  wrote:

> It seems that the code in sound/soc/omap/omap-mcbsp.c uses the function
> "cpu-is-omap343x()" which fails and returns ENODEV.
> 
> But I have enabled "OMAP3430 support" in "System Type" / "TI OMAP2/3/4
> Specific Features",
> why it still return ENODEV? (Attached my kernel config).
> 
> And after I changed that check to "cpu-is-omap34xx()", there was no
> error message but neither any audio output,
> I can't hear any sound.
> 

Is the DMA running after you change the cpu_is_omap34xx and try to play
e.g. "aplay /dev/urandom"? If audio is running you should see DMA
interrupt count increasing with "grep DMA /proc/interrupts".

If that is working then issue could be in codec side. I don't have a
beagle at the moment to verify but IRCC something like ~10 TWL4030 ALSA
controls must be adjusted in order to route audio from DAC to outputs
at proper volume.

-- 
Jarkko
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[HELP] Audio on BeagleBoard xM can't work

2011-03-14 Thread Bob Liu
Hi, folks,

I am using 2.6.37-rc3(from linux-2.6.git not linux-omap.git) and I am
not able to play any audio on my beagleboard-xM.

The log is like this:
-
# aplay a.wav
Playing WAVE 'a.wav' : Signed 16 bit Little Endasoc: interface
omap-mcbsp-dai.1 hw params failed
ian, Rate 8000 Hz, Mono
aplay: set_params:1053: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 8000
PERIOD_TIME: 125000
PERIOD_SIZE: 1000
PERIOD_BYTES: 2000
PERIODS: 4
BUFFER_TIME: 50
BUFFER_SIZE: 4000
BUFFER_BYTES: 8000
TICK_TIME: 0
#
-

It seems that the code in sound/soc/omap/omap-mcbsp.c uses the function
"cpu-is-omap343x()" which fails and returns ENODEV.

But I have enabled "OMAP3430 support" in "System Type" / "TI OMAP2/3/4
Specific Features",
why it still return ENODEV? (Attached my kernel config).

And after I changed that check to "cpu-is-omap34xx()", there was no
error message but neither any audio output,
I can't hear any sound.

# aplay a.wav
Playing WAVE 'a.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono

-

And suggestion is welcome, Thanks!

-- 
Regards,
--Bob


beagle-audio.config
Description: Binary data