diff options
author | Timo Wischer <twischer@de.adit-jv.com> | 2019-03-25 11:14:14 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-03-25 11:39:18 -0400 |
commit | 50e0908412e6937ebf38b1edae35035a550a6f09 (patch) | |
tree | ed1d2eebd6a1f6a09da0c65b771aad5015940ddd | |
parent | cc4f8e91c4ed04a9a972c6e10c158d4b71be3f2f (diff) |
ALSA: aloop: Support S24 sample formats
Currently snd_aloop supports only S16 and S32 audio sample formats. With
this patch the S24 formats are also supported.
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/drivers/aloop.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c index 8c3fbe1276be..c14e57b2a135 100644 --- a/sound/drivers/aloop.c +++ b/sound/drivers/aloop.c | |||
@@ -337,7 +337,7 @@ static int loopback_prepare(struct snd_pcm_substream *substream) | |||
337 | 337 | ||
338 | loopback_timer_stop_sync(dpcm); | 338 | loopback_timer_stop_sync(dpcm); |
339 | 339 | ||
340 | salign = (snd_pcm_format_width(runtime->format) * | 340 | salign = (snd_pcm_format_physical_width(runtime->format) * |
341 | runtime->channels) / 8; | 341 | runtime->channels) / 8; |
342 | bps = salign * runtime->rate; | 342 | bps = salign * runtime->rate; |
343 | if (bps <= 0 || salign <= 0) | 343 | if (bps <= 0 || salign <= 0) |
@@ -562,6 +562,8 @@ static const struct snd_pcm_hardware loopback_pcm_hardware = | |||
562 | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE | | 562 | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE | |
563 | SNDRV_PCM_INFO_RESUME), | 563 | SNDRV_PCM_INFO_RESUME), |
564 | .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE | | 564 | .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE | |
565 | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S24_BE | | ||
566 | SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_3BE | | ||
565 | SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S32_BE | | 567 | SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S32_BE | |
566 | SNDRV_PCM_FMTBIT_FLOAT_LE | SNDRV_PCM_FMTBIT_FLOAT_BE), | 568 | SNDRV_PCM_FMTBIT_FLOAT_LE | SNDRV_PCM_FMTBIT_FLOAT_BE), |
567 | .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_192000, | 569 | .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_192000, |