Snowball: Audio functionality broken, audio playback and audio record doesn't work

Bug #988268 reported by Abhishek Paliwal
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IglooCommunity
In Progress
Wishlist
Unassigned
Linaro Ubuntu
Won't Fix
Undecided
Unassigned

Bug Description

Description:
-------------
Audio functionality - audio playback and audio record both does not work.

On snowball build:
HWPack URL : http://snapshots.linaro.org/precise/hwpacks/lt-snowball-x11-base/15/
Image URL : http://snapshots.linaro.org/precise/images/ubuntu-desktop/114/
eMMC image

For audio playback:
-----------
1.Open Rhythembox application
2. Select Radio tab
3. Play any station
Issue: No audio output

Or
Open Settings->Sound->Output tab->Test Sound(Stereo output)->Front Left->test (or Front Right ->test)
Issue: No audio heard on headset connected to audio out jack on snowball.

Or
Play any audio file
Issue: No audio heard.

For Audio record:
-----------
1. Open Audio recorder application (From dashboard search for "recorder")
2. Record an audio
3. Save it to sd card
4. Move file from sd card to Host PC and play it on host PC
Issue: No audio heard when playing recorded clip on host PC.

Reproducible:
------------------
yes, 5/5 times

Logs:
------------------
dmesg snippet(For rhythembox playback):

[ 2038.374847] cw1200_event_handler: STUB at line 1018.
[ 2042.409088] av8100_codec_set_dai_fmt: Setting audio_input_format (if_format = 2, if_mode = 1).
[ 2042.410888] av8100_codec_send_audio_infoframe: Preparing audio info-frame.
[ 2042.410919] av8100_codec_send_audio_infoframe: Sending audio info-frame.
[ 2042.450897] av8100_codec_set_dai_fmt: Setting audio_input_format (if_format = 2, if_mode = 1).
[ 2042.452728] av8100_codec_send_audio_infoframe: Preparing audio info-frame.
[ 2042.452728] av8100_codec_send_audio_infoframe: Sending audio info-frame.
[ 2042.478057] av8100_codec_set_dai_fmt: Setting audio_input_format (if_format = 2, if_mode = 1).
[ 2042.479858] av8100_codec_send_audio_infoframe: Preparing audio info-frame.
[ 2042.479858] av8100_codec_send_audio_infoframe: Sending audio info-frame.
[ 2093.814880] cw1200_event_handler: STUB at line 1021.

Hardware:
------------------
snowball V11
emmc image

Software:
------------------
HWPack URL : http://snapshots.linaro.org/precise/hwpacks/lt-snowball-x11-base/15/
Image URL : http://snapshots.linaro.org/precise/images/ubuntu-desktop/114/
Used riff tool to flash emmc image on snowball hardware.

Revision history for this message
Anmar Oueja (anmar) wrote :

Hmm... can you play an audio file?

summary: - Snowball: No audio output when playing radio channel using rhythembox
+ Snowball: Audio functionality broken, audio playback and audio record
+ doesn't work
description: updated
Anmar Oueja (anmar)
Changed in igloocommunity:
status: New → Confirmed
Anmar Oueja (anmar)
Changed in igloocommunity:
assignee: nobody → Ramesh Chandrasekaran (ramesh-chandrasekaran)
Revision history for this message
Mathieu Poirier (mathieu.poirier-deactivatedaccount) wrote :
Revision history for this message
Mathieu Poirier (mathieu.poirier-deactivatedaccount) wrote :
Revision history for this message
Mathieu Poirier (mathieu.poirier-deactivatedaccount) wrote :

I have attached two files, 'alsa-notworking.txt' and 'alsa-working.txt' - both were generated by the commant 'amixer contents'. 'alsa-working.txt' was produced by Ramesh when sound was working and I generated 'alsa-notworking.txt' with the images referenced in the Bug Description.

White space shifts won't permit to do a proper 'diff' between the files so here are the lines where the configs differ: 404, 417, 1173, 1189, 1194, 1208 and 1246.

Changed in igloocommunity:
milestone: none → 2012.05
Revision history for this message
Abhishek Paliwal (abhishek-paliwal) wrote :

Observation on the 12.04 Ubuntu release image:
http://snapshots.linaro.org/precise/hwpacks/lt-snowball-x11-base/15/hwpack_linaro-lt-snowball-x11-base_20120424-15_armhf_supported.tar.gz
http://snapshots.linaro.org/precise/images/ubuntu-desktop/119/linaro-precise-ubuntu-desktop-20120426-119.tar.gz

1. HDMI Audio can be heard - for some of the radio channels using rhythembox,
2. Default audio is routed to HDMI out - no option from UI to redirect audio to Audio-out jack on snowball board.
3. installed Mplayer and then able to play mp3/flac format file using command "mplayer <path/filename>" - this audio can be heard on HDMI out
4. Recorded audio using Sound recorder flac format. - (i.e - deafult app present in ubuntu image) - playback using mplayer for same file does not gives any audio out - So audio recorder does not work as well.

Changed in igloocommunity:
importance: Undecided → Low
importance: Low → Medium
Revision history for this message
Ramesh Chandrasekaran (ramesh-chandrasekaran) wrote :

Status:

I just erased & re burnt the 2012.04 Ubuntu release on snowball. After console booted, just executed, aplay -Dhw:0,1 xyz.wav. This worked perfectly giving audio output via AUDIO OUT jack. This shows, that, the audio driver and kernel works fine. And this is not a regression, as this basic command was not working earlier, due to some improper configurations.

From the user space, as mentioned by Abhishek, if test sound is invoked via sound settings, the audio output is not heard & any audio from ubuntu userspace is not heard. This may be because, of pulseaudio. Userspace directly uses pulseaudio & pulseaudio uses alsa. Since we have many unfixed issues with pulse-audio, like choppy playback, i think the pulse-audio should never be enabled/included in our releases by default, until it is fixed properly(Also, the pulse-audio's choppy playback, is faced by many in other platforms too, apart from snowball). Since in latest ubuntu distribution there are some applications and applets which directly uses pulse-audio by default (like volume indicator, & gstreamer), these should be replaced, with alsa volume control, gnome-alsa mixer from older ubuntu distributions and the userspace should try to use direct ALSA instead of pulse-audio by default. The below, link, gives some info on what packages/user space libraries need to updated to have direct ALSA working.. instead of using pulse-audio.
http://www.jeffsplace.net/node/12 (Not yet tested in snowball)

May be we need to customize our ubuntu distribution for snowball, which uses Direct ALSA by default to fix this issue.

Revision history for this message
Anmar Oueja (anmar) wrote :

Thanks for the investigation Ramesh. I have some comments below:

1. The bug seems to be related to pulseaudio configuration and not the kernel. This comment shows the proper configuration (https://bugs.launchpad.net/igloocommunity/+bug/932076/comments/2)

2. We will not customize or remove PulseAudio. This is a major surgery. We need to fix audio in Pulse itself. This is all captured in this bug: https://bugs.launchpad.net/linaro-ubuntu/+bug/939593 which is targeted for 2012.06 cycle.

I will move this bug to 2012.06 cycle since fixing it in 2012.05 doesn't make sense.

Changed in igloocommunity:
milestone: 2012.05 → 2012.06
Revision history for this message
Ramesh Chandrasekaran (ramesh-chandrasekaran) wrote :

@Anmar,

1. If pulse audio configs are fine, then i guess we should be able to hear atleast choppy sound during the speaker test. But, we could not hear this in our case. Since Pulse audio sits on top of alsa, and if alsa is proved to work fine, i suspected there must be some issue with the configs on pulse audio side. Even last time, if i could remember to reproduce the pulse audio choppy playback, i did some config changes in pulse related config files.
   The comment you have mentioned shows, explicitly you are mentioning to the pulse audio some configs (incase of gstreamer)??i.e, [ audiosink="alsasink device=hw:0,1" ]. Does the gstreamer stuff works without this parameter ?? becoz i remember adding this stuff in one of pulse config file, to get choppy playback work...
    https://wiki.ubuntu.com/PulseAudio [I guess the asound.conf should look something like this ??]

2. So, now, to make audio work on ubuntu
      a) First, need to get choppy sounds, when sounds played from ubuntu userspace (speaker test etc), instead of being complete silence.
      b) Fix the pulse audio's choppy playback.

Revision history for this message
Paul Larson (pwlars) wrote :

Confirmed still non-working in 12.05-rc

Revision history for this message
Anmar Oueja (anmar) wrote :

Hello Ramesh:

Please forgive me but I am confused.

1. In [1] we need to confirm that Choppy PlayBack is working.
   * Did you repeat your steps to get the choppy playback as you outlined here (https://bugs.launchpad.net/linaro-ubuntu/+bug/939593/comments/11)
   * Comments 12 and 13 may also provide valuable input on how to test this issue

2. Once we confirm Choppy Playback is possible, we need to investigate the audio choppiness. I am no developer so you many need to solicit feedback from people on #ubuntu or #linaro on irc.freenode.net

I hope this explains things clearly.

[1] - https://bugs.launchpad.net/linaro-ubuntu/+bug/939593/comments/11 (and newer)

Revision history for this message
Ramesh Chandrasekaran (ramesh-chandrasekaran) wrote :

@Anmar

1. By default, the choppy playback is not working. Reason, is by default the gnome sound applet(sound settings) takes Pulse HDMI audio sink as the default output and it doesn't even, detect another output sink(Headphone out) which is created by pulse audio. I can see from the pulse audio logs, that the pulse audio is creating two audio sink outs (Headphones out & HDMI out)properly, but still the gnome sound applet doesn't detect the Headphones out sink.

Error given by gnome-sound-applet:
#gnome-control-centre sound-nua -v

Sync_devices: Failed to match
stream id: 2
desrciption: headset connected to 3.5mm jack
origin: U8500-card Headset connected to 3.5mm jack.

 For me, this seems to be some problem with the ubuntu sound applet issue. Because, pulseaudio is creating two audio out sinks properly and using paplay, we can play and get the choppy playback,

paplay --device=alsa_output.platform-soc-audio.HiFi__hw_0_1__sink Testwav/Side_L
eft.wav

 However, i have created a workaround, where, i add a setting, which forcibly creates one more duplicate output pulseaudio sink for Headphones out, which is detected by sound applet perfectly.

Adding following line In /etc/pulse/default.pa,

load-module module-alsa-sink device=hw:0,1 sink_properties=device.description=Headset_Ouput

Either this workaround can be used or it has to be fixed in the ubuntu sound applet.

2. By the above workaround method i could get the choppy playback, and sound applet detecting both HDMI audio as well as Headset_output. And regarding audio choppiness, irrespective of timer based scheduling (tsched=0 or 1), whenever the buffer size is huge around 1000ms as fragment size, we get this issue. Still analysing on this. Will update soon...

Revision history for this message
Ramesh Chandrasekaran (ramesh-chandrasekaran) wrote :

1) Choppy playback is fixed. [https://bugs.launchpad.net/igloocommunity/+bug/939593]
2) Audio playback doesn't work
     Rootcause : As mentioned in above comment,
     Fix: The workaround mentioned in the above comment is sent for review.
3) Audio record doesn't work
     Will analyse, check and update on this.

Changed in igloocommunity:
status: Confirmed → In Progress
Changed in igloocommunity:
milestone: 2012.06 → 2012.07
Revision history for this message
Paul Larson (pwlars) wrote :

with http://snapshots.linaro.org/precise/hwpacks/lt-snowball-x11-base/156/hwpack_linaro-lt-snowball-x11-base_20120626-156_armhf_supported.tar.gz I can get output on the audio jack, but it doesn't automatically detect it getting plugged in and switch to it. Also, plugging in a mic to the input jack, I still am not able to record sound.

Revision history for this message
Amit Khare (amit-khare) wrote :

observation on snowball hardware pack

http://snapshots.linaro.org/precise/hwpacks/lt-snowball-x11-base/188/hwpack_linaro-lt-snowball-x11-base_20120712-188_armhf_supported.tar.gz

with ubuntu rootfs

http://snapshots.linaro.org/precise/images/ubuntu-desktop/280/linaro-precise-ubuntu-desktop-20120711-280.tar.gz

I can hear just a little sound (sounds like scratch) while testing audio jack but no sound from hdmi output. Not able to record too.

Changed in igloocommunity:
importance: Medium → Low
tags: added: linaro-ubuntu
Revision history for this message
Amit Khare (amit-khare) wrote :

observation on snowball hardware pack

http://snapshots.linaro.org/precise/pre-built/lt-snowball-x11-base/226/hwpack_linaro-lt-snowball-x11-base_20120730-226_armhf_supported.tar.gz

with ubuntu rootfs
http://snapshots.linaro.org/precise/images/ubuntu-desktop/323//linaro-precise-ubuntu-desktop-20120730-323.tar.gz

while playing audio from rhythmbox i can hear sound from both audio jack and hdmi audio out but the sound is not smooth, its faster at times and breaks too

Revision history for this message
Amit Khare (amit-khare) wrote :

and sound recording does not play the audio either from hdmi or audio jack

Changed in igloocommunity:
importance: Low → Wishlist
milestone: 2012.07 → none
assignee: Ramesh Chandrasekaran (ramesh-chandrasekaran) → nobody
Revision history for this message
Amit Khare (amit-khare) wrote :
Revision history for this message
Amit Khare (amit-khare) wrote :
Revision history for this message
Amit Khare (amit-khare) wrote :
Revision history for this message
Milosz Wasilewski (mwasilew) wrote :

Snowball isn't supported any more.

Changed in linaro-ubuntu:
status: New → Won't Fix
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.