ASoC: davinci-pcm: expand the .formats
Based on the data_type test in ping_pong_dma_setup, davinci-pcm is capable of handling data of width up to and including 32bits. " if ((data_type == 0) || (data_type > 4)) { printk(KERN_ERR "%s: data_type=%i\n", __func__, data_type); return -EINVAL; } " Update the .format member of the snd_pcm_hardware instances it registers to reflect this capability. Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Reviewed-by: Steven Faludi <stevenfaludi@nanometrics.ca> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Родитель
fb1e9703af
Коммит
8e56d5b834
|
@ -46,11 +46,27 @@ static void print_buf_info(int slot, char *name)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DAVINCI_PCM_FMTBITS (\
|
||||||
|
SNDRV_PCM_FMTBIT_S8 |\
|
||||||
|
SNDRV_PCM_FMTBIT_U8 |\
|
||||||
|
SNDRV_PCM_FMTBIT_S16_LE |\
|
||||||
|
SNDRV_PCM_FMTBIT_S16_BE |\
|
||||||
|
SNDRV_PCM_FMTBIT_U16_LE |\
|
||||||
|
SNDRV_PCM_FMTBIT_U16_BE |\
|
||||||
|
SNDRV_PCM_FMTBIT_S24_LE |\
|
||||||
|
SNDRV_PCM_FMTBIT_S24_BE |\
|
||||||
|
SNDRV_PCM_FMTBIT_U24_LE |\
|
||||||
|
SNDRV_PCM_FMTBIT_U24_BE |\
|
||||||
|
SNDRV_PCM_FMTBIT_S32_LE |\
|
||||||
|
SNDRV_PCM_FMTBIT_S32_BE |\
|
||||||
|
SNDRV_PCM_FMTBIT_U32_LE |\
|
||||||
|
SNDRV_PCM_FMTBIT_U32_BE)
|
||||||
|
|
||||||
static struct snd_pcm_hardware pcm_hardware_playback = {
|
static struct snd_pcm_hardware pcm_hardware_playback = {
|
||||||
.info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
|
.info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
|
||||||
SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
|
SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
|
||||||
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME),
|
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME),
|
||||||
.formats = (SNDRV_PCM_FMTBIT_S16_LE),
|
.formats = DAVINCI_PCM_FMTBITS,
|
||||||
.rates = (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |
|
.rates = (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |
|
||||||
SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 |
|
SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 |
|
||||||
SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |
|
SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |
|
||||||
|
@ -72,7 +88,7 @@ static struct snd_pcm_hardware pcm_hardware_capture = {
|
||||||
.info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
|
.info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
|
||||||
SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
|
SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
|
||||||
SNDRV_PCM_INFO_PAUSE),
|
SNDRV_PCM_INFO_PAUSE),
|
||||||
.formats = (SNDRV_PCM_FMTBIT_S16_LE),
|
.formats = DAVINCI_PCM_FMTBITS,
|
||||||
.rates = (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |
|
.rates = (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |
|
||||||
SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 |
|
SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 |
|
||||||
SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |
|
SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |
|
||||||
|
|
Загрузка…
Ссылка в новой задаче