[regression] sound not working on panda with lt-omap at 11.11

Bug #893402 reported by John Rigby
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro Ubuntu
Fix Released
High
Kurt Taylor
linaro-landing-team-ti
Fix Released
Undecided
Unassigned

Bug Description

on both 4430 and 4460 panda I get no sound out
I have tried both the gui speaker test and command line and all I here is a click at the beginning and ending of a sound file
this is with the 21-2 lt-x11 hwpack

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

We probably need to update the ucm config files, as the kernel is not compatible with the older ones anymore.

summary: - sound not working on panda
+ [regression] sound not working on panda with lt-omap at 11.11
tags: added: linaro-ubuntu
Changed in linaro-ubuntu:
status: New → Confirmed
importance: Undecided → High
milestone: none → 11.12
Revision history for this message
warmcat (andy-warmcat) wrote :

No the mixer settings only changed post-3.1 on tracking, the changes came in from upstream Alsa changes.

This is something different, it's pulseaudio interaction with the alsa driver making the problem somehow.

If you disable pulse and set the mixers by hand, aplay is happy and you can play WAV files, etc.

Seb and Nicolas have asked Liam Girdwood to look at it, we'll grab the results of that as soon as it's ready.

Changed in linaro-landing-team-ti:
status: New → Confirmed
Revision history for this message
Bryan Honza (honza-x) wrote :

Maybe an unnecessary comment to add, but I'll post anyway:

Same experience - only pop at start and end of play.
Was playing a .wav pcm file using the built-in movie player on 4430 panda.

I was using this image:
http://releases.linaro.org/images/11.11/oneiric/ubuntu-desktop/

which, according to the notes, is made from this :
panda-ubuntu-desktop:
  http://releases.linaro.org/11.11/ubuntu/oneiric-hwpacks/
   hwpack_linaro-lt-panda-x11-base_20111124-0_armel_supported.tar.gz: md5sum(eae0821e37d4c29122892290c16a1695)
  http://releases.linaro.org/11.11/ubuntu/oneiric-images/ubuntu-desktop
   linaro-o-ubuntu-desktop-tar-20111121-0.tar.gz: md5sum(035259e3ba23dd30a20dd3caf8e0c75a)

Revision history for this message
warmcat (andy-warmcat) wrote :

Guys the ALSA update has been integrated into tilt-3.1 and I regenerated tilt-linux-linaro-3.1 from that.

The update follows upstream changes for 3.2 which change the name of some mixers compared to what went before

'HS Left Playback' -> 'Headset Left Playback'
'HS Right Playback' -> 'Headset Right Playback'
'Aux/FM Stereo In' -> 'FM Stereo In'

I think some corresponding changes are needed in Pulseaudio and / or ucm to make things happy. At the moment almost all the junk on pulse startup is gone, you can play audio by hand OK, but you don't get any sound coming from using the pulseaudio UI to select onboard card as the output sink. I'm guessing that can be solved by changes in userland.

Changed in linaro-ubuntu:
assignee: nobody → Tom Gall (tom-gall)
Tom Gall (tom-gall)
Changed in linaro-ubuntu:
assignee: Tom Gall (tom-gall) → Bryan Honza (honza-x)
Revision history for this message
Feng Wei (b34248) wrote :

I get image from http://releases.linaro.org/images/11.11/oneiric/ubuntu-desktop, and found:
1. 'HS Left Playback' kind stuffs are still existing, didn't change to 'Headset Left Playback' stuffs
2. There are two ucm card configs at /usr/share/alsa/ucm, "Panda" and "SDP4430", and no udev rules can be found for alsa. So that alsa ucm will not be invoked
3. Even if I set alsamixer properly, I still can't hear sound from hw:0,6
    amixer cset name='DL1 Mixer Multimedia' 1
    amixer cset name='DL1 Media Playback Volume' 118
    amixer cset name='Sidetone Mixer Playback' 1
    amixer cset name='SDT DL Volume' 120
    amixer cset name='DL1 PDM Switch' 1
    amixer cset name='HS Left Playback' 'HS DAC'
    amixer cset name='HS Right Playback' 'HS DAC'
    amixer cset name='Headset Playback Volume' 13
4. When I play sound to hw:0,8, kernel abort, my command line "speaker-test -D hw:0,8 -c 2 -t sine"

My point:
1. alsa ucm configurations are not setup correctly
2. there's bug in alsa driver level

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Hi Feng Wei,

I just pushed a newer kernel, pointing at tilt-linux-linaro-3.1's head, but I believe you'll still be able to find the same issues there.

I know we currently have a bug at the kernel side once pulseaudio is started, and Liam is already looking at that with Andy, but no updates for now. Please check with Andy before spending more time on this, he should be able to tell if it's expected to work or not.

Revision history for this message
Tom Gall (tom-gall) wrote :

Using HDMI with both the libsounda2 and pulseaudio update audio was working. By working I mean the startup sound as the ubuntu desktop starts.

It's not perfect as the audio paused and then completed but it "worked."

Changed in linaro-ubuntu:
milestone: 11.12 → 12.01
Revision history for this message
warmcat (andy-warmcat) wrote :

I posted some UCM and pulse changes, and added patches to tilt-3.1 / tilt-linux-linaro-3.1 / tilt-tracking to linaro-dev

http://lists.linaro.org/pipermail/linaro-dev/2011-December/009451.html

these get Pulse UI working correctly for me for the first time, with some caveats noted in the mail

Changed in linaro-landing-team-ti:
status: Confirmed → In Progress
Revision history for this message
warmcat (andy-warmcat) wrote :

I just found the record hiss issue to be bogus, it's because it only records at 24-bit.

This script will record 5 sec of audio input to 24-bit wav correctly with current tilt-3.1 / tilt-linux-linaro-3.1 stuff

#!/bin/sh

#amixer cset name='AMIC_UL PDM Switch' 1
amixer cset name='MUX_UL00' 'AMic0'
amixer cset name='MUX_UL01' 'AMic1'
if [ -z "`cat /proc/asound/cards | grep PandaES`" ] ; then
amixer cset name='Analog Left Capture Route' 'Headset Mic'
#amixer cset name='Analog Left Capture Route' 'Off'
amixer cset name='Analog Right Capture Route' 'Headset Mic'
else
amixer cset name='Analog Left Capture Route' 'Aux/FM Left'
amixer cset name='Analog Right Capture Route' 'Aux/FM Right'
fi
amixer cset name='Capture Preamplifier Volume' 2
amixer cset name='Capture Volume' 4

arecord -D plughw:0,0 -d 5 -f S24_LE -c 2 -r 48000 record.wav

Tom Gall (tom-gall)
Changed in linaro-ubuntu:
assignee: Bryan Honza (honza-x) → Tom Gall (tom-gall)
Revision history for this message
Tom Gall (tom-gall) wrote :

The focus at this time is with alsa-lib, pulseaudio and the UCM configs. I believe the owner of this bug should now pass to Wei as he's heading up that effort.

Changed in linaro-ubuntu:
assignee: Tom Gall (tom-gall) → Wei Fang (e-wfang)
Revision history for this message
Tom Gall (tom-gall) wrote :

with hdmi hooked up for video, but attempting to use the audio jack

sound-test is unable to produce any sound.

sound-test -D hw:0,8 -t wave -f S16_LE -r 44100 -w ./CaptMoneyMarch.wav yeilds no sound on a panda.

This using the Jan 16th ubuntu-desktop build and Jan 16 lt panda-x11 hwpack.

Revision history for this message
Kurt Taylor (krtaylor) wrote :

assigned to Wei's other id

Changed in linaro-ubuntu:
assignee: Wei Fang (e-wfang) → Feng Wei (b34248)
Revision history for this message
Tom Gall (tom-gall) wrote :

With the following setup:

video : hdmi
audio : hdmi

updated alsa pkg

amixer set 'Headset' 100 unmute (since audio defaults to hdmi when using hdmi video)

aplay works on both panda and panda es.

I believe we can close this bug.

Changed in linaro-landing-team-ti:
status: In Progress → Fix Released
Changed in linaro-ubuntu:
status: Confirmed → Fix Released
Revision history for this message
Ricardo Salveti (rsalveti) wrote : Re: [Bug 893402] Re: [regression] sound not working on panda with lt-omap at 11.11

On Thu, Jan 19, 2012 at 2:12 AM, Tom Gall <email address hidden> wrote:
> With the following setup:
>
> video : hdmi
> audio : hdmi
>
> updated alsa pkg
>
> amixer set 'Headset' 100 unmute (since audio defaults to hdmi when using
> hdmi video)
>
> aplay works on both panda and panda es.
>
> I believe we can close this bug.

Does it work by selecting jack from the audio mixer interface (that
uses pulse)? If it's just a unmute issue, guess we could update the
ucm files to reflect that.

I'd prefer to only close this bug if the interface is correctly
enabling the audio device.

Changed in linaro-ubuntu:
status: Fix Released → In Progress
Revision history for this message
warmcat (andy-warmcat) wrote :

I think Ricardo's correct, even when I got pulse UI working fully here at Christmas with edits to pulse config and ucm, when switching sources it still sometimes blew bus exceptions that silenced the output and made a "something crashed" UI action.

Liam found the root cause of that and I will update when I am able to, even if that's the only remaining issue we can't call this long-lived monster bug done really until that goes too.

Revision history for this message
Kurt Taylor (krtaylor) wrote :

On a fresh image of the 021216-0 Ubuntu Desktop LEB, I was able to confirm that sound is now working with the folllowing settings:

amixer sset Headset 10
amixer sset 'Headset Left Playback' 'HS DAC'
amixer sset 'Headset Right Playback' 'HS DAC'

Tested with:
speaker-test -D hw:0,8 -c 2 -F S32_LE -r 96000 -t sine -f 440 -l 1

also with:
aplay -D plughw:0,8 /usr/share/sounds/alsa/Front_Center.wav

This coupled with the previous testing that Tom and Andy have done, I believe that this bug is closed.

Any PulseAudio or UI problems should be corrected in a different bug.

Changed in linaro-ubuntu:
assignee: Feng Wei (b34248) → Kurt Taylor (kurt-r-taylor)
Kurt Taylor (krtaylor)
Changed in linaro-ubuntu:
status: In Progress → Fix Released
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

As I said previously at comment #14, we need this to be fixed at the normal user interface, otherwise it's useless for normal users. And this bug is about audio not working by default, and not only with alsa.

Changed in linaro-ubuntu:
status: Fix Released → In Progress
tags: added: audio-jack
Revision history for this message
Tom Gall (tom-gall) wrote :

While there could be advantages to having a big zombie bug that hobbles from issue to issue in the audio stack, I'd like to suggest that's a less than productive approach.

As of the moment gnome-control-center in the leb isn't correctly interacting with the stack to set inputs, outputs and such as a for instance.

Perfect audio that "just works" is by all means the goal. This bug is but a mile stone in that journey. The closing of this bug is by no means the destination. (Tho it might help us readily identify who is consuming brains when they go missing)

I would like to suggestion this bug is the next step in that journey towards audio that "just works."
https://bugs.launchpad.net/linaro-multimedia-project/+bug/921865

So pretty please ... with brains on top, can we close this bug?

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

On Wed, Jan 25, 2012 at 8:50 PM, Tom Gall <email address hidden> wrote:
> While there could be advantages to having a big zombie bug that hobbles
> from issue to issue in the audio stack, I'd like to suggest that's a
> less than productive approach.
>
> As of the moment gnome-control-center in the leb isn't correctly
> interacting with the stack to set inputs, outputs and such as a for
> instance.
>
> Perfect audio that "just works" is by all means the goal. This bug is
> but a mile stone in that journey. The closing of this bug is by no means
> the destination. (Tho it might help us readily identify who is consuming
> brains when they go missing)
>
> I would like to suggestion this bug is the next step in that journey towards audio that "just works."
> https://bugs.launchpad.net/linaro-multimedia-project/+bug/921865
>
> So pretty please ... with brains on top, can we close this bug?

I just said that because it's not a matter of not working with the
gnome-control-center or such, but not working with any default media
application at Ubuntu.

Are you able to play any sound using pulseaudio, like totem, rhythmbox
or mplayer, by setting the mixer by hand? If so, then I believe we can
close the bug as have another one just to make it work with the sound
settings UI.

If it only works with aplay, then I'd prefer to keep this bug opened,
as it's opened against linaro-ubuntu, and not at
linaro-landing-team-ti, meaning that this is still and issue from the
user perspective.

For me having another bug is just having extra paper work, as the
basic usage for the user is still broken (and can affect the whole
stack), and it's not going to change the status of our test
spreadsheet (as it's only relevant if the whole stack is working
out-of-the-box.

Revision history for this message
Tom Gall (tom-gall) wrote :

with amixer set 'Headset' 100 unmute to turn on the audio jack

then starting up rhythmbox, I'm able to play and hear a wave file. I'll have to try on the TV upstairs to validate HDMI audio.

It might be a good idea to add what is considered strategic audio / multimedia apps to our feature matrix.

Revision history for this message
Nicolas Dechesne (ndec) wrote :

On Thu, Jan 26, 2012 at 4:39 AM, Tom Gall <email address hidden> wrote:

> with amixer set 'Headset' 100 unmute to turn on the audio jack
>
> then starting up rhythmbox, I'm able to play and hear a wave file.
> I'll have to try on the TV upstairs to validate HDMI audio.
>
> It might be a good idea to add what is considered strategic audio /
> multimedia apps to our feature matrix.
>

SebJ pushed a patch in our 3.1 kernel that fixes the audio issues with
pulse for our releases. with that patch we were able to get sound working
with the vanilla pulse + UCM config scripts.

Revision history for this message
warmcat (andy-warmcat) wrote :

Yes we also added those patches to tilt-3.1 / tilt-3.2 / tilt-linux-linaro-3.1, waiting to see how Ricardo fares with testing.

Revision history for this message
Kurt Taylor (krtaylor) wrote :

Last night I tested this with 2 different builds with both HDMI and line
out. With the mixer settings that I listed above, audio works both with
aplay/speakertest and a youtube video. There may still be cases where audio
can be configured in a "correct" configuration and made to not work, but
these should be handled in new specific defects and not added on to this
one.

On 26 January 2012 03:04, warmcat <email address hidden> wrote:

> Yes we also added those patches to tilt-3.1 / tilt-3.2 / tilt-linux-
> linaro-3.1, waiting to see how Ricardo fares with testing.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/893402
>
> Title:
> [regression] sound not working on panda with lt-omap at 11.11
>
> Status in Linaro Texas Instruments Landing Team:
> Fix Released
> Status in Linaro Ubuntu Evaluation Builds:
> In Progress
>
> Bug description:
> on both 4430 and 4460 panda I get no sound out
> I have tried both the gui speaker test and command line and all I here is
> a click at the beginning and ending of a sound file
> this is with the 21-2 lt-x11 hwpack
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/linaro-landing-team-ti/+bug/893402/+subscriptions
>

--

Kurt Taylor (irc krtaylor)
Linaro Multimedia
Linaro.org <http://www.linaro.org/>* **│ *Open source software for ARM SoCs
Follow *Linaro: *Facebook <http://www.facebook.com/pages/Linaro> |
Twitter<http://twitter.com/#%21/linaroorg>|
Blog <http://www.linaro.org/linaro-blog/>

Changed in linaro-ubuntu:
milestone: 12.01 → 12.02
Revision history for this message
Dmitry Dudkin (ddv) wrote :

Hi,

Sound is absolutely broken in Linaro. I spend whole day to get working audio on 12.01/11.12 and Now I can successful run aplay or arecord with following settings:

amixer sset 'Headset Left Playback' 'HS DAC'
amixer sset 'Headset Right Playback' 'HS DAC'
amixer sset Headset 100
mixer cset name='MUX_UL10' 'AMic0'
amixer cset name='MUX_UL11' 'AMic1'
amixer cset name='Analog Left Capture Route' 'Aux/FM Left'
amixer cset name='Analog Right Capture Route' 'Aux/FM Right'
amixer cset name='Capture Preamplifier Volume' 2
amixer cset name='Capture Volume' 4

I can record:
arecord -D plughw:0,1 -r 32000 -f S16_LE -c 1 -d 5 -v test.wav

Then I can play it:
aplay -D plughw:0,8 test.wav

And it is work....BUT if you try to record and play simultaneously then it record SILENCE!

To reproduce the problem I open two SSH consoles:
1. On first one I run:
 speaker-test -D plughw:0,8 -t s -r 32000 -c 1 -l 10

2. And on second console I run another command (in 5 seconds from first command):
arecord -D plughw:0,1 -r 32000 -f S16_LE -c 1 -d 5 -v test.wav

In this case test.wav is SILENCE. If I run arecord without speaker-test then it record actual data.

Dmitry

Revision history for this message
Tom Gall (tom-gall) wrote :

Thank you for your comment Dmitry.

Be aware, when you utilize HDMI for video (which is the only working video currently on panda with the 12.01 lt hwpack) audio will be over HDMI as well, NOT over the audio jack. So the setting that you've done above is to route over the audio jack. It is also documented here : https://wiki.linaro.org/TomGall/LinaroPandaAudioFeatureIndex

When DVI is back to working, and used then the default route will be over the audio jack. While when HDMI is used the default will be over HDMI for audio.

As UCM continues to mature these things will get sorted out. Unfortunately as you've found it is frustrating to trip over.

Revision history for this message
Dmitry Dudkin (ddv) wrote :

Thanks for your answer, Tom.

I trying PandaboardES for VOIP application and I need analog audio only. Do you known the most stable analog audio kernel for PandaES? I tried TI Landing team kernel but :
- kernels before ABE implementation does not detect PandaBoardES sound
- kernels with ABE does not support simultaneous play and record.

Best Regards,
Dmitry

Revision history for this message
Dmitry Dudkin (ddv) wrote :

I just tested original MinimalFS kernel that used for testing PandaES and it have same issue (SILENCE on record if run simultaneous with playback). Is it possible that is hardware design issue? Because I have 2 weeks return PandaES and get BeagleXM.

Dmitry

Revision history for this message
warmcat (andy-warmcat) wrote :

We have a new sound tree for Panda replacing our current abe stuff in the next few days, it will be worth testing. I'm pretty sure this is just software / mixer setting issue.

Fwiw older kernels predate 4460 support so issues there are not so surprising.

Revision history for this message
Dmitry Dudkin (ddv) wrote :
Download full text (4.0 KiB)

Last night I tried to enable playback on plughw:0,0 in linaro 12.01 (3.1.1-8-linaro-lt-omap):

amixer cset name='DL1 Mixer Multimedia' 1
amixer cset name='DL1 Media Playback Volume' 118
amixer cset name='Sidetone Mixer Playback' 1
amixer cset name='SDT DL Volume' 120
amixer cset name='DL1 PDM Switch' 1
amixer sset 'Headset Left Playback' 'HS DAC'
amixer sset 'Headset Right Playback' 'HS DAC'
amixer sset Headset 100

aplay -D plughw:0,0 test1.wav -v
==========================================
and I got crash in kernel:
[ 429.237091] omap_device: omap-mcpdm.-1: new worst case activate latency 0: 1586914
[ 429.237243] omap-abe-dai omap-abe-dai: omap_abe_dai_startup: MultiMedia1
[ 429.249267] omap-abe-dai omap-abe-dai: omap_abe_dai_hw_params: MultiMedia1
[ 429.281524] omap-abe-dai omap-abe-dai: omap_abe_dai_prepare: MultiMedia1
[ 429.323211] omap-abe-dai omap-abe-dai: omap_abe_dai_bespoke_trigger: MultiMedia1 cmd 1
[ 429.323303] SDP4430 Media: playback_trigger: MultiMedia1 0
[ 429.323303] PDM-DL1: mute_be: mcpdm-dl1 0
[ 429.323394] PDM-DL1: enable_be_port: mcpdm-dl1 0
[ 429.323669] PDM-DL1: unmute_be: mcpdm-dl1 0
[ 429.323669] SDP4430 Media: enable_fe_port: MultiMedia1 0
[ 429.323822] SDP4430 Media: unmute_fe_port: MultiMedia1 0
[ 429.323852] SDP4430 Media: mute_fe_port_playback: unmute FE SDP4430 Media BE PDM-DL1
[ 429.323852] ------------[ cut here ]------------
[ 429.323974] WARNING: at /build/buildd/linux-linaro-lt-omap-3.1.1/arch/arm/mach-omap2/omap_l3_noc.c:106 l3_interrupt_handler+0xe4/0x14c()
[ 429.323974] CUSTOM SRESP error with SOURCE:ABE
[ 429.324035] Modules linked in: wl12xx_sdio wl12xx
[ 429.324127] [<c001b5f0>] (unwind_backtrace+0x0/0xec) from [<c0716ce8>] (dump_stack+0x20/0x24)
[ 429.324188] [<c0716ce8>] (dump_stack+0x20/0x24) from [<c005e224>] (warn_slowpath_common+0x5c/0x74)
[ 429.324249] [<c005e224>] (warn_slowpath_common+0x5c/0x74) from [<c005e2f8>] (warn_slowpath_fmt+0x40/0x48)
[ 429.324310] [<c005e2f8>] (warn_slowpath_fmt+0x40/0x48) from [<c003834c>] (l3_interrupt_handler+0xe4/0x14c)
[ 429.324310] [<c003834c>] (l3_interrupt_handler+0xe4/0x14c) from [<c00ad80c>] (handle_irq_event_percpu+0xc4/0x298)
[ 429.324371] [<c00ad80c>] (handle_irq_event_percpu+0xc4/0x298) from [<c00ada2c>] (handle_irq_event+0x4c/0x6c)
[ 429.324462] [<c00ada2c>] (handle_irq_event+0x4c/0x6c) from [<c00b0118>] (handle_fasteoi_irq+0xd8/0x110)
[ 429.324462] [<c00b0118>] (handle_fasteoi_irq+0xd8/0x110) from [<c00ad03c>] (generic_handle_irq+0x40/0x54)
[ 429.324554] [<c00ad03c>] (generic_handle_irq+0x40/0x54) from [<c00140f0>] (handle_IRQ+0x88/0xc8)
[ 429.324554] [<c00140f0>] (handle_IRQ+0x88/0xc8) from [<c0008640>] (asm_do_IRQ+0x18/0x1c)
[ 429.324676] [<c0008640>] (asm_do_IRQ+0x18/0x1c) from [<c073b07c>] (__irq_svc+0x3c/0x11c)
[ 429.324737] Exception stack(0xee0a5e60 to 0xee0a5ea8)
[ 429.324798] 5e60: 00000001 00000004 00000000 c0566d34 c0b67610 eeaaee8c eeaaee8c 00000000
[ 429.324798] 5e80: 00000003 ee0a4000 00000000 ee0a5ebc ee0a5e78 ee0a5ea8 c0097fc0 c073a86c
[ 429.324798] 5ea0: 200f0113 ffffffff
[ 429.324920] [<c073b07c>] (__irq_svc+0x3c/0x11c) from [<c073a86c>] (_raw_read_unlock_irq+0x38/0x64)
[ 429.324920] [<c073a86...

Read more...

Revision history for this message
Sebastien JAN (sebjan) wrote :

@Dmitry,

1) Linaro 12.01 misses 2 kernel audio driver bug fixes to work properly with pulse and record in all formats.
So be sure to run the latest tilt-linux-linaro-3.1 branch which contains these patches.
If you still want to use the 12.01 kernel (without these patches), then:
 a) make sure to disable pulseaudio:
  edit /etc/pulse/client.conf and set the following property (it will prevent pulse daemon to start):
autospawn = no
 b) record in 32bits format only (S32_LE)
=> then make your tests using aplay / arecord (be careful that if you did not disable pulse, aplay and arecord will try to start it and mess your setup).

If you use the latest kernel in tilt-linux-linaro-3.1, you don't have to care about that: pulse and any record format will be supported.

2) With this kernel supporting the ABE, you shall use ports going through the ABE for both play and record if you want to make both simultaneously. So for record, use either 0,0 or 0,1, and for playback either 0,0 or 0,6 (all these go through the ABE).
I tested many configurations with 0,0 and all worked fine (including simultaneous play / record).

3) when going through the ABE, you need some extra mixers and volume. The following mixers settings are good for PandaES and port 0,0 for play and record:

                # ABE playback path through DL1
                cset "name='DL1 Mixer Multimedia' 1"
                cset "name='Sidetone Mixer Playback' 1"
                cset "name='DL1 PDM Switch' 1"
                cset "name='DL1 Media Playback Volume' 90,90"
                cset "name='SDT DL Volume' 120"

                # ABE PDM-UL capture path
                cset "name='MUX_UL00' 11"
                cset "name='MUX_UL01' 12"

                # TWL6040 playback path
                cset "name='Headset Left Playback' 1"
                cset "name='Headset Right Playback' 1"
                cset "name='Headset Playback Volume' 13"

                # TWL6040 capture path
                cset "name='Analog Left Capture Route' 2"
                cset "name='Analog Right Capture Route' 2"
                cset "name='Capture Preamplifier Volume' 2"
                cset "name='Capture Volume' 4"

Revision history for this message
Dmitry Dudkin (ddv) wrote :
Download full text (6.6 KiB)

@Sebastien,

Did you try it on Linaro 12.01? I can't get it work at all with plughw:0,0 & plughw:0,6.

On 0,0 it never end the playback and crash in kernel. And speaker-test does not work with error:
root@linaro-developer:/proc/asound# speaker-test -D plughw:0,0 -t s -c 2 -l 1 -F S32_LE

speaker-test 1.0.24.2

Playback device is plughw:0,0
Stream parameters are 48000Hz, S32_LE, 2 channels
Sine wave rate is 440.0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 24 to 16384
Period size range from 12 to 8184
Using max buffer size 16384
Periods = 4
Unable to set nperiods 4 for playback: Invalid argument
Setting of hwparams failed: Invalid argument

On 0,6 it try to play but I don't hear anything. And it crash in kernel too:
[99422.147979] omap-abe-dai omap-abe-dai: omap_abe_dai_startup: MultiMedia1 LP
[99422.158508] omap-abe-dai omap-abe-dai: omap_abe_dai_hw_params: MultiMedia1 LP
[99422.185394] omap-abe-dai omap-abe-dai: omap_abe_dai_prepare: MultiMedia1 LP
[99422.197052] omap-abe-dai omap-abe-dai: omap_abe_dai_bespoke_trigger: MultiMedia1 LP cmd 1
[99422.197052] SDP4430 Media LP: playback_trigger: MultiMedia1 LP 0
[99422.197784] PDM-DL1: mute_be: mcpdm-dl1 0
[99422.197784] PDM-DL1: enable_be_port: mcpdm-dl1 0
[99422.198089] PDM-DL1: unmute_be: mcpdm-dl1 0
[99422.198089] SDP4430 Media LP: enable_fe_port: MultiMedia1 LP 0
[99422.198242] SDP4430 Media LP: unmute_fe_port: MultiMedia1 LP 0
[99422.198242] SDP4430 Media LP: mute_fe_port_playback: unmute FE SDP4430 Media LP BE PDM-DL1
[99428.265991] omap-abe-dai omap-abe-dai: omap_abe_dai_bespoke_trigger: MultiMedia1 LP cmd 0
[99428.265991] SDP4430 Media LP: playback_trigger: MultiMedia1 LP 0
[99428.266143] SDP4430 Media LP: mute_fe_port: MultiMedia1 LP 0
[99428.266143] SDP4430 Media LP: mute_fe_port_playback: mute FE SDP4430 Media LP BE PDM-DL1
[99428.266143] SDP4430 Media LP: disable_fe_port: MultiMedia1 LP 0
[99428.266357] PDM-DL1: mute_be: mcpdm-dl1 0
[99428.266357] PDM-DL1: disable_be_port: mcpdm-dl1 0
[99428.266723] omap-abe-dai omap-abe-dai: omap_abe_dai_hw_free: MultiMedia1 LP
[99428.267059] omap-abe-dai omap-abe-dai: omap_abe_dai_hw_free: MultiMedia1 LP
[99428.292083] ------------[ cut here ]------------
[99428.292083] WARNING: at /build/buildd/linux-linaro-lt-omap-3.1.1/sound/soc/omap/abe/port_mgr.c:192 omap_abe_port_disable+0x64/0xc4()
[99428.292083] port pdmdl1 phy port 11 is already disabled
[99428.292236] Modules linked in: wl12xx_sdio wl12xx
[99428.292236] [<c001b5f0>] (unwind_backtrace+0x0/0xec) from [<c0716ce8>] (dump_stack+0x20/0x24)
[99428.292388] [<c0716ce8>] (dump_stack+0x20/0x24) from [<c005e224>] (warn_slowpath_common+0x5c/0x74)
[99428.292388] [<c005e224>] (warn_slowpath_common+0x5c/0x74) from [<c005e2f8>] (warn_slowpath_fmt+0x40/0x48)
[99428.292388] [<c005e2f8>] (warn_slowpath_fmt+0x40/0x48) from [<c0591e84>] (omap_abe_port_disable+0x64/0xc4)
[99428.292510] [<c0591e84>] (omap_abe_port_disable+0x64/0xc4) from [<c05865fc>] (omap_mcpdm_dai_shutdown+0xc8/0x158)
[99428.292510] [<c05865fc>] (omap_mcpdm_dai_shutdown+0xc8/0x158) from [<c057df10>] (soc_pcm_close+0x100/0x1dc)
[99428.292694] [<c057df10>] (soc_pcm_close+0x100/0x1dc) from [<c057e09c>] (soc_ds...

Read more...

Revision history for this message
Sebastien JAN (sebjan) wrote :

No, I did not test with Linaro kernel. I tested a lot using Ubunbut 11.10 + TI add-ons (contains a 3.1 based kernel), which kernel shall be very close to latest linaro kernel regarding audio driver.

Revision history for this message
Dmitry Dudkin (ddv) wrote :

Could you test it on your system and confirm that it work(you hear sound from analog output and simultaneous recording is not silence)? If it work then could you send your kernel to me for test?

Dmitry

Revision history for this message
Dmitry Dudkin (ddv) wrote :

PS. Could you also send /var/lib/asound.state (after alsactl store) to make sure that I will have same alsa configuration?

Revision history for this message
warmcat (andy-warmcat) wrote :

If those two patches Seb mentioned are missing from the Ubuntu release, then you'll get these L3 ABE exceptions and other issues.

They are in our tree that Ricardo packages for some time, even if it missed the release date.

Ricardo should be able to point to a later kernel package for you to try.

Revision history for this message
Dmitry Dudkin (ddv) wrote :

Both these patches fix another problems and does not matter for silence recording problem. Kernel from Panda validation image can play to plughw:0,0 but even this kernel has the silence recording problem. I tried 10-15 different images (2.6 - 3.3) and ALL of them has silence recording problem.

Revision history for this message
Sebastien JAN (sebjan) wrote :

I am not sure what you call 'Panda validation image'. I know there have been some recent kernel changes around these issues, and that the related patches have not yet reached kernel packages or releases everywhere.

Also, the mixers config are important and are not up to date in all versions yet either. I can certify you that Ubuntu 11.10 install + TI add-ons works for this use-case. It brings both the kernel patches, and the user-space side mixers configs.

Could you try installing this image + upgrade with TI ppa? At least it shall permit to define a reference working setup.

Revision history for this message
Dmitry Dudkin (ddv) wrote :

>I am not sure what you call 'Panda validation image'.

I mean validation environment image from http://pandaboard.org/node/13531/

>Also, the mixers config are important and are not up to date in all versions yet either.
It can be easy transferred or shared via /var/lib/asound.state

>Could you try installing this image + upgrade with TI ppa?
Could you provide exact download links? Because there are soo many different kernels, images and etc.
I used Linaro Developer 12.01 and then install alsa (apt-get install alsa). To check another kernels I just download it via git, compile on my system and then load via tftp.

Revision history for this message
Sebastien JAN (sebjan) wrote :

>>Could you try installing this image + upgrade with TI ppa?
>Could you provide exact download links? Because there are soo many different kernels, images and etc.
Ubuntu official image: https://wiki.ubuntu.com/ARM/OMAP => http://cdimage.ubuntu.com/releases/11.10/release/ubuntu-11.10-preinstalled-desktop-armel+omap4.img.gz
Then to install TI public update: http://omappedia.org/wiki/Ubuntu_PPA

> I used Linaro Developer 12.01 and then install alsa (apt-get install alsa). To check another kernels I just download it via git, compile on my system and then load via tftp.
These images are perfectly fine, it's just that there have been very recent changes in this area, and the Linaro 12.01 image does not include the latest fixes for audio to work properly in all configurations.

Revision history for this message
Dmitry Dudkin (ddv) wrote :

Thanks Seb. I will try this image today.

Revision history for this message
Dmitry Dudkin (ddv) wrote :

Seb,

May I ask you another aquestion? What kind of board you have (Panda, PandaES and rev)?

Revision history for this message
Sebastien JAN (sebjan) wrote :

I tested the TI ppa updates on Panda(4430v2.2) and PandaES. The mixers configs are slightly different for record, and these are reflected into the UCM configurations updates from the ppa.

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

On Tue, Feb 7, 2012 at 4:31 AM, warmcat <email address hidden> wrote:
> If those two patches Seb mentioned are missing from the Ubuntu release,
> then you'll get these L3 ABE exceptions and other issues.
>
> They are in our tree that Ricardo packages for some time, even if it
> missed the release date.
>
> Ricardo should be able to point to a later kernel package for you to
> try.

We had a few problems with the kernel builder, but we should have a
newer kernel at the PPA later today, reflecting your current
tilt-linux-linaro-3.1 branch.

Revision history for this message
Dmitry Dudkin (ddv) wrote :

Seb,

I just tested Ubuntu PPA and .... it work with some changes:
amixer cset name='DL1 Media Playback Volume' 149

and Now I hear speaker test on plughw:0,6 . It have some issue with mono signal:
root@panda:/var/lib/alsa# speaker-test -D plughw:0,6 -l 2 -c 1 -F S16_LE -r 48000 -t s

speaker-test 1.0.24.2

Playback device is plughw:0,6
Stream parameters are 48000Hz, S16_LE, 1 channels
Sine wave rate is 440.0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 4608 to 12288
Period size range from 1152 to 3072
Using max buffer size 12288
Periods = 4
was set period_size = 3072
was set buffer_size = 12288
 0 - Front Left
Bus error
===============
but I can fix it in my software.

Thanks a lot.

PS. I test it before TI public update and it work too even on plughw:0,8. But after update it does not work on plughw:0,8.

Revision history for this message
Dmitry Dudkin (ddv) wrote :

after
amixer cset name='DL1 Media Playback Volume' 149

it work on Linaro 12.01 through plughw:0,6 .

But I found another one small issue: with software sample rate 32Khz it switch hardware to 44.1Khz and as result you can't get requested period.

Revision history for this message
Dmitry Dudkin (ddv) wrote :

I made atch that fix above issues with frequencies other than 44.1Khz/48Khz. Also it adding support for 32Khz sampling rate.

Revision history for this message
Sebastien Guiriec (s-guiriec) wrote :

This patch is NOT OK for ABE standpoint. Multimedia port is working only at 48 or 44.1 kHz. If you try to set it at different rate some Sample rate converter will be missing on the path.
On this kernel release ABE internal is running at 48 or 44.1 kHz. When making you patch to enable 32 kHz you are doing the assumption that ABE will do the sample rate conversion between 32 to 48. This block is not part of the Firmware.

So here you have no choice for 32 kHz you need to have SW SRC at ALSA or PulseAudio level.

Also for Volume setting you should always be around 120 (0 dB). Here setting the volume to 149 means +29 dB. So your input signal should be very low.

Revision history for this message
Dmitry Dudkin (ddv) wrote :

>On this kernel release ABE internal is running at 48 or 44.1 kHz. When making you patch to enable 32 kHz you are doing the
>assumption that ABE will do the sample rate conversion between 32 to 48. This block is not part of the Firmware.

I known that internal ABE clock is 44.1/48 but Are you sure that no sample rate conversion in the path? Because it is work for me. I check hw_params for device and it really 32Khz and no software resample in ALSA. And I hear clear sound at provided 32Khz/16/8. I guess that twl6040 work on native 32Khz and may be some thing do that conversion between twl6040 and ABE..

>Also for Volume setting you should always be around 120 (0 dB). Here setting the volume to 149 means +29 dB. So your input
>signal should be very low.
You are right. My signal work fine on 120 but speaker-test volume is too low (it is why I am not hear it at 90).

Revision history for this message
Dmitry Dudkin (ddv) wrote :

Based on http://www.ti.com/pdfs/wtbu/OMAP4430_4460_4470_PUBLIC_TRM_Addendum_ABE_HAL_vF.pdf each ABE port have "asynchronous sample-rate converters."
====================================
The ports are exchanging 8 to 32bits data MSB aligned on a 32bits container. MM_DL allows
receiving two concatenated 16bits Left/Right samples per 32bits accesses.
The sampling rate is 48kHz. Voice paths use 8 or 16kHz. MM_DL use 44.1kHz or 48kHz.

The sampling rate of MM_DL and voice ports can be adjusted with 1ppm accuracy using the
asynchronous sample-rate converters.
====================================

Revision history for this message
Dmitry Dudkin (ddv) wrote :

...the Audio Engine processing consists in resampling the input samples to 48 kHz stereo format, doing the mixing and filtering operation, and saving the samples to a sink port

Revision history for this message
Tom Gall (tom-gall) wrote :

Given the positive results we have seen with 12.02 RC including the working mixer, rhythymbox , working output via AJ and HDMI. I am closing this bug.

Changed in linaro-ubuntu:
status: In Progress → Fix Released
Revision history for this message
Dmitry Dudkin (ddv) wrote :

>Given the positive results .... I am closing this bug.
Why? It still has a some issues with sound:
- error on mono playback
- wrong hardware sample rate (44.1Hkz) on software 32Khz

Why you don't check mine patch? I proved that I am right about my patch and ABE HAS a resampler. My patch work good on my system and it FIXED all issues above.

Revision history for this message
Dmitry Dudkin (ddv) wrote :

I opened new bug report (941180) for this issues.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.