Bug 64741

Summary: [pandaboard] audio codec only provides 96kHz output
Product: Drivers Reporter: Tobias Jakobi (liquid.acid)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED WILL_FIX_LATER    
Severity: normal CC: tiwai
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.12 Subsystem:
Regression: No Bisected commit-id:
Attachments: alsa-info script output
full kernel log

Description Tobias Jakobi 2013-11-10 22:00:36 UTC
Hello,

I tried the audio codec on the Pandaboard ES with 3.12 vanilla and noticed that it behaves weirs. E.g. it only provides 96kHz output.

Also mpv fails to open the device in hw mode. It only works with plughw.

According to the information from the OMAPpedia (http://www.omappedia.com/wiki/Audio_Drive_Arch), the codec should at least support 44.1kHz and 48kHz sampling rates.

Greets,
Tobias
Comment 1 Tobias Jakobi 2013-11-10 22:02:35 UTC
Created attachment 114151 [details]
alsa-info script output
Comment 2 Tobias Jakobi 2013-11-10 22:03:56 UTC
Since I already have this attached to other bugs, just the link (to the kernel config):
https://bugzilla.kernel.org/attachment.cgi?id=112351
Comment 3 Tobias Jakobi 2013-11-10 22:08:27 UTC
This is when mpv is playing back some music.

liquid@fragile /proc/asound/PandaBoardES/pcm0p/sub0 $ cat hw_params 
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 96000 (96000/1)
period_size: 1024
buffer_size: 16384
liquid@fragile /proc/asound/PandaBoardES/pcm0p/sub0 $ cat info 
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: TWL6040 twl6040-legacy-0
name: 
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 0
liquid@fragile /proc/asound/PandaBoardES/pcm0p/sub0 $ cat sw_params 
tstamp_mode: NONE
period_step: 1
avail_min: 1024
start_threshold: 1024
stop_threshold: 1073741824
silence_threshold: 0
silence_size: 1073741824
boundary: 1073741824
liquid@fragile /proc/asound/PandaBoardES/pcm0p/sub0 $ cat status 
state: RUNNING
owner_pid   : 1845
trigger_time: 2097.365231827
tstamp      : 2151.040465291
delay       : 15098
avail       : 1286
avail_max   : 11266
-----
hw_ptr      : 4756742
appl_ptr    : 4771840
Comment 4 Tobias Jakobi 2013-11-10 22:48:26 UTC
Created attachment 114181 [details]
full kernel log
Comment 5 Takashi Iwai 2013-11-14 15:10:45 UTC
It looks like a feature.  The reply from Peter Ujfalusi at alsa-devel ML:

Platforms using McPDM+twl6040 codec (OMAP4/5) supports 96KHz only at the moment.
This is hardware limitation and the only way to get 44.1/48 KHz supported is
to use AESS on these platforms. Unfortunately I only have AESS support out of
tree in my personal branch since it has dependency on Liam's out of tree
dynamic firmware set (which I'm rolling from kernel version to kernel version).
To use AESS one need to have the firmware as well which is again not upstream
currently.

I only have 3.12-rc1 based version of AESS support, but I'm planning to have
one for 3.12 and also for 3.13-rc1 when it comes out.