日期:2014-05-16 浏览次数:23361 次
#define __play_buf_size 4096 #define __play_buf_cnt 16 #define __cap_buf_size 4096 #define __cap_buf_cnt 16 static const struct snd_pcm_hardware tcc_pcm_hardware_play = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME), .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE), .rates = SNDRV_PCM_RATE_8000_96000, .rate_min = 8000, .rate_max = 96000, .channels_min = 2, .channels_max = 2, .period_bytes_min = 1024, .period_bytes_max = __play_buf_size, .periods_min = 2, .periods_max = __play_buf_cnt , .buffer_bytes_max = __play_buf_cnt * __play_buf_size , .fifo_size = 16, //ignored }; static const struct snd_pcm_hardware tcc_pcm_hardware_capture = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME), .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE, .rates = SNDRV_PCM_RATE_8000_96000, .rate_min = 8000, .rate_max = 96000, .channels_min = 2, .channels_max = 2, .period_bytes_min = 1024, .period_bytes_max = __cap_buf_size , .periods_min = 2, .periods_max = __cap_buf_cnt, .buffer_bytes_max = __cap_buf_cnt * __cap_buf_size, .fifo_size = 16, //ignored };