Re: [Alsa-user] WM8727 & AT91SAM9G45: DMA or IRQ trouble
Brought to you by:
perex
|
From: Ankur P. <con...@gm...> - 2011-08-17 06:26:42
|
Dear Friends, I found the machine driver to be working after modification in setting up the proper clock divisor. Please find the working driver at http://pastebin.com/i5PrFxC7. Now, when I try to run the aplay utility, I got into following error: aplay: set_params:1172: not enough memory After debugging I found that the function snd_pcm_hw_params_get_period_size(params, &chunk_size, 0); call under set_params() function returns the value of chunk_size to zero. Thus realloc fails and returns the above error. I came across following link http://mailman.alsa-project.org/pipermail/alsa-devel/2009-February/014976.html who faced the same problem. Can any one suggest some light on why it is happening? I am using alsa-lib & alsa-utils version 1.0.23 on AT91SAM9 processor using buildroot. Have a Good Day, Thank you, Ankur. On Tue, Aug 16, 2011 at 12:19 PM, Ankur Patel <con...@gm...> wrote: > Dear Friends, > > I am using WM8727 codec with AT91SAM9G45 processor. I have implemented > machine code as http://pastebin.com/axadqGhd . I found over the web > that the SSC driver from Atmel and WM8727 Codec driver works fine as > couple of ppl have used it successfully. I guess the issue should be > in the machine driver. > > After insterting the module I got following output: > # insmod sam9g45_wm8727.ko > atmel-pcm:preallocate_dma_buffer: area=ffadf000, addr=77c40000, size=32768 > asoc: WM8727 <-> atmel-ssc0 mapping ok > > I am getting error while running "cat /dev/urandom > /dev/audio" and found > following output : > # cat /dev/urandom > /dev/audio > atmel_ssc_startup: SSC_SR=0x204 > atmel_ssc_hw_params: RCMR=00010721 RFMR=0000008f TCMR=00010702 TFMR=0000008f > atmel_ssc_dai: Starting clock > atmel_ssc_dai,hw_params: SSC initialized > atmel-pcm: hw_params: DMA for SSC0 PCM out initialized > (dma_bytes=32768, period_size=8192) > transmit enabled SSC_SR=0x000104cf > atmel-pcm:buffer_size = 8192,dma_area = ffac1000, dma_bytes = 32768 > atmel-pcm: trigger: period_ptr=77962000, xpr=2006319104, xcr=4096, > xnpr=2006327296, xncr=4096 > sr=65731 imr=0 > ALSA sound/core/pcm_lib.c:1708: playback write error (DMA or IRQ trouble?) > ALSA sound/core/pcm_lib.c:1708: playback write error (DMA or IRQ trouble?) > cat: write error: Input/output error > ALSA sound/core/pcm_native.c:1482: playback drain error (DMA or IRQ trouble?) > atmel-pcm:buffer_size = 8192,dma_area = ffac1000, dma_bytes = 32768 > atmel_ssc_shutdown: transmit disabled SSC_SR=0x000000c0 > atmel_ssc_dau: Stopping clock > > Any suggestions/thoughts will be helpful. > > Note: I have posted the question alsa-devel but later on I found that > it is for the enhancement for the drivers so I am posting it on the > alsa-user mailing list. > > Have a Good Day, > Thank you, > Ankur. > |