Hi Lee, Thanks a lot for the explanation! Now I understand what's wrong with the module, I must remove the buffer allocation from the trigger and put it somewhere else... You said I should move it in the prepare function, this page http://www.alsa-project.org/~iwai/writing-an-alsa-driver/x639.htm says it should go in the hw_params. What's the best place where to put it? I did not write the module, so I really don't know why all the sample format conversion code is in the module... How could I fix/improve it and use the sample conversion already available in alsa-lib? Thanks Bye Andrea --- Lee Revell <rlrevell@xxxxxxxxxxx> wrote: > On 4/10/07, Ciaccia <ciacciax@xxxxxxxxx> wrote: > > Hi Lee, > > Your guess is correct. The buffers are allocated > in > > the trigger callback, I attached the module source > to > > the my email but it got lost...?!? > > > > Sorry for that, maybe this time it's better: > > http://www.pecore.ch/test/ep93xx-i2s.c.txt > > OK so allocate them in the prepare callback instead, > problem solved. > See "Writing an ALSA driver" doc for details. > > BTW why does your driver do all that sample format > conversion, rather > than just exposing the HW supported format and > letting alsa-lib do the > conversion for you? > > Lee > ____________________________________________________________________________________ It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/ _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel