ALSA issue: twl4030-hifi hw params


romsom

Still Fresh
Joined
Mar 21, 2009
Messages
23
Hello everyone!


I'm using ArchLinux on my Pandora and recently tried to start a jack audio server.


It failed with any options and gave e.g. (depending on the config) the following error message:



Code:
$ jackd -r -d alsa -S -P -d hw:0,0 -r44100 -p512 -n4


[...]


configuring for 44100Hz, period = 512 frames (11.6 ms), buffer = 4 periods

ALSA: final selected sample format for playback: 16bit little-endian

ALSA: use 4 periods for playback

ALSA: cannot set hardware parameters for playback

ALSA: cannot configure playback channel

cannot load driver module alsa



The error was the same, just the info messages were of course different with other config options.



dmesg spit out that error message:





Code:
[ ] asoc: can't set codec twl4030-hifi hw params


So my assumption is this is driver related.


Has anyone (notaz?) an idea what causes this behaviour?


Regards and Thanks,


Roman
 
Last edited by a moderator:
Sorry, I forgot.


I'm using

  • kernel 3.2 (pandora 3.2.1-00065-gd348f16-dirty)
  • alsa-lib 1.0.25
  • jack 1.9.8 / jack 0.121.3
 
First, i'd say try to install the latest OP kernel.


Take it from the latest rootfs :


http://openpandora.org/firmware/pandora-rootfs.tar.bz2


Make a backup of your /boot/uImage*, and copy (and change the name) the uImage-3 from the rootfs.


Also copy /lib/modules/3.2.21 in your /lib/modules/


Boot into CLI mode, type



Code:
sudo depmod -ae

(there will probably be a harmless warning) and reboot.
 
I didn't keep on track with this: Is the Official OS using hard float now?


ArchLinuxArm does, so the binary Kernel won't work here.
 
Ah, i didn't know.


Suggested that kernel update because Notaz cleaned the alsa controls, and your current kernel is pretty old.


That said, i compiled and shipped a realtime kernel on my Slackware stable and -current ports, and jackd works.
 
Last edited by a moderator:
That sounds great!


In that case I should give it a try and get the kernel sources and mess around with wejp's kernel settings. ;)


Where did you get the sources? From briefly reading through your Slackweare thread, I didn't find anything more recent than 2.6 or early 3.2.


Have you documented how you compiled the realtime kernel? - That sounds like a nice addon. ;)


But anyway, Thanks already. ;)

no and wont since it would break blob software like the sgx driver

Sad to hear this still is and probably will remain an issue...
 
Last edited by a moderator:
I didn't keep on track with this: Is the Official OS using hard float now?


ArchLinuxArm does, so the binary Kernel won't work here.
First of all, official OS *is* using hard float, only the ABI is soft-float like (differences mostly involves argument passing between functions), which may or may not cause performance problems.


Second, armhf is userspace thing, the kernel doesn't need to be recompiled (nor does it care if you run pure soft, softfp or hardfp binaries, as long as they are all EABI).
 
Last edited by a moderator:
First of all, official OS *is* using hard float, only the ABI is soft-float like (differences mostly involves argument passing between functions), which may or may not cause performance problems.


Second, armhf is userspace thing, the kernel doesn't need to be recompiled (nor does it care if you run pure soft, softfp or hardfp binaries, as long as they are all EABI).

Interesting... Thanks for clarifying.


My arch system does indeed boot with the kernel from the pandora-rootfs and even X is working out-of-the-box.


Still the ALSA problem kepps the same...
 
It doesn't say if it's mono or stereo, the hardware can't do mono streams. Also it must be S16_LE, maybe it tries to send unsigned data or something.
 
That sounds great!


In that case I should give it a try and get the kernel sources and mess around with wejp's kernel settings. ;)


Where did you get the sources? From briefly reading through your Slackware thread, I didn't find anything more recent than 2.6 or early 3.2.


Have you documented how you compiled the realtime kernel? - That sounds like a nice addon. ;)


But anyway, Thanks already. ;)
I downloaded the OP git sources,



Code:
mkdir -p /usr/src/

cd /usr/src/

git clone git://openpandora.org/pandora-kernel.git

ln -s pandora-kernel linux

cd pandora-kernel

git checkout --track -b pandora-3.2 origin/pandora-3.2

make omap3_pandora_defconfig

and patched them with RT patches:


https://www.kernel.o...rojects/rt/3.2/


Also make menuconfig etc.
 
Last edited by a moderator:
Thanks, I'll look into that!


Concerning jack, I got a step further using the options



Code:
jackd -d alsa -i2 -o2 -S

-> 16bit, 2 input channels, 2 output channels


Now jack seems to start but crashes the moment I try to do something useful (e.g. list available ports).


I'll continue working on that once there is a new pandora kernel package for arch.


Thanks so far ;)
 
Yes, I tried the new kernel. ;)


As for now I'm waiting for a new kernel package for arch (or I'll try building one myself when I have the time) and a response from ED because my LCD cable seems to be broken again... (I used ssh for anything I tried here ;) )
 
I now have the same problem as you (when using realtime) !!!


Have:



Code:
omap_mcbsp_dai_hw_params: not enough bandwidth for desired rate and channels

asoc: interface omap_mcbsp_dai.1 hw params failed

Lowering parameters seems to do nothing.
 
Last edited by a moderator:
Got jackd working in realtime with an external UA-1G USB audio soundcard.
 
What parameters did you use when you got that error?


Yes it seems nearly every crappy old USB soundcard works without problems (I am referring to my 5€ USB sound dongle ;) )
 
Yours + the -R switch. Also -r but i don't remember exactly which one in my dmesg.
 
Did anyone get to the bottom of this problem? I'm hitting the same thing when trying to use the gstreamer alsa plugin.

The most interesting thing I can find on the 'net is: http://comments.gmane.org/gmane.linux.alsa.devel/68149 but it seems that patch was applied to the driver, and ages ago at that...

edit:

Found it, thanks notaz.
 
Last edited by a moderator:
Back
Top