diff options
-rw-r--r-- | sound/soc/stm/stm32_sai_sub.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c index a4060813bc74..48e629ac2d88 100644 --- a/sound/soc/stm/stm32_sai_sub.c +++ b/sound/soc/stm/stm32_sai_sub.c | |||
@@ -1218,6 +1218,16 @@ static int stm32_sai_pcm_process_spdif(struct snd_pcm_substream *substream, | |||
1218 | return 0; | 1218 | return 0; |
1219 | } | 1219 | } |
1220 | 1220 | ||
1221 | /* No support of mmap in S/PDIF mode */ | ||
1222 | static const struct snd_pcm_hardware stm32_sai_pcm_hw_spdif = { | ||
1223 | .info = SNDRV_PCM_INFO_INTERLEAVED, | ||
1224 | .buffer_bytes_max = 8 * PAGE_SIZE, | ||
1225 | .period_bytes_min = 1024, | ||
1226 | .period_bytes_max = PAGE_SIZE, | ||
1227 | .periods_min = 2, | ||
1228 | .periods_max = 8, | ||
1229 | }; | ||
1230 | |||
1221 | static const struct snd_pcm_hardware stm32_sai_pcm_hw = { | 1231 | static const struct snd_pcm_hardware stm32_sai_pcm_hw = { |
1222 | .info = SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_MMAP, | 1232 | .info = SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_MMAP, |
1223 | .buffer_bytes_max = 8 * PAGE_SIZE, | 1233 | .buffer_bytes_max = 8 * PAGE_SIZE, |
@@ -1270,7 +1280,7 @@ static const struct snd_dmaengine_pcm_config stm32_sai_pcm_config = { | |||
1270 | }; | 1280 | }; |
1271 | 1281 | ||
1272 | static const struct snd_dmaengine_pcm_config stm32_sai_pcm_config_spdif = { | 1282 | static const struct snd_dmaengine_pcm_config stm32_sai_pcm_config_spdif = { |
1273 | .pcm_hardware = &stm32_sai_pcm_hw, | 1283 | .pcm_hardware = &stm32_sai_pcm_hw_spdif, |
1274 | .prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config, | 1284 | .prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config, |
1275 | .process = stm32_sai_pcm_process_spdif, | 1285 | .process = stm32_sai_pcm_process_spdif, |
1276 | }; | 1286 | }; |