ALSA queries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm working on ALSA driver for PCIe card. My ALSA driver and it's
initializing struct snd_pcm_hardware with below parameter.

/************************ code  start
************************************************/
static struct snd_pcm_hardware audio_pcm_hardware = {
.info = (SNDRV_PCM_INFO_INTERLEAVED  | SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_RESUME ),
.formats  =       (SNDRV_PCM_FORMAT_S16_LE | SNDRV_PCM_FORMAT_S24_LE),
.rates  = (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |
SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000),
.rate_min  = 44100,
.rate_max  = 192000,
.channels_min  = 2,
.channels_max  = 8,
.buffer_bytes_max  = 76800, /*75 kbytes */
.period_bytes_min  = 512,//4410, /* (channel (2) * sample_rate (44100)
* bit width (24)) / (60 * 8)  */
.period_bytes_max  = 16*1024,
.periods_min  = 10,
.periods_max  = 255,

};
/************************ code  end
************************************************/

1) I did not understand what is significance of periods_min ,
period_bytes_min ,  period_bytes_max and periods_max. Can you please
tell me what is importance of these parameter and what value should be
mentioned according into ALSA.

2) snd_pcm_ops trigger callback is getting called in the driver when
application sends "start" command. But ALSA driver is stopping by
itself after one frame is copied to ALSA framework, without waiting
for "stop" command.

For instance:
In trigger callback , I'm getting these logs after one frame is copied.
Trigger:Start (When Play button is selected/clicked in application,
Start command is sent to ALSA driver)
Dma transfer is completed.
Trigger:Stop. (When Stop button is selected/clicked in application,
Stop command is sent to ALSA driver. But stop button is not clicked in
this case)

Thanks in advance.

-- 
Thanks and Regards
Chakravarthi Pradeep.K
Ph: 91 9980434900
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux