summaryrefslogtreecommitdiff
path: root/src/pcm
diff options
context:
space:
mode:
authorJurgen Kramer <gtmkramer@xs4all.nl>2014-08-09 12:09:21 +0200
committerTakashi Iwai <tiwai@suse.de>2014-08-11 11:51:04 +0200
commit87df9f3b7a650418b9aef943ac246549c132672a (patch)
treeb27650ff078edad7a60dfd1986c03386bf7b5695 /src/pcm
parentf6b879e7cc87d83343f5004369146881d1d1e335 (diff)
pcm: Fix DSD formats userland usability
Support for DSD sample formats has been added a while ago. This patch makes those sample formats beter usable from userland (e.g. aplay). [These implementation details have been forgotten in the previous DSD support patch -- tiwai] Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'src/pcm')
-rw-r--r--src/pcm/pcm_misc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pcm/pcm_misc.c b/src/pcm/pcm_misc.c
index d52160ce..44bb89cb 100644
--- a/src/pcm/pcm_misc.c
+++ b/src/pcm/pcm_misc.c
@@ -195,11 +195,13 @@ int snd_pcm_format_width(snd_pcm_format_t format)
switch (format) {
case SNDRV_PCM_FORMAT_S8:
case SNDRV_PCM_FORMAT_U8:
+ case SNDRV_PCM_FORMAT_DSD_U8:
return 8;
case SNDRV_PCM_FORMAT_S16_LE:
case SNDRV_PCM_FORMAT_S16_BE:
case SNDRV_PCM_FORMAT_U16_LE:
case SNDRV_PCM_FORMAT_U16_BE:
+ case SNDRV_PCM_FORMAT_DSD_U16_LE:
return 16;
case SNDRV_PCM_FORMAT_S18_3LE:
case SNDRV_PCM_FORMAT_S18_3BE:
@@ -253,11 +255,13 @@ int snd_pcm_format_physical_width(snd_pcm_format_t format)
switch (format) {
case SNDRV_PCM_FORMAT_S8:
case SNDRV_PCM_FORMAT_U8:
+ case SNDRV_PCM_FORMAT_DSD_U8:
return 8;
case SNDRV_PCM_FORMAT_S16_LE:
case SNDRV_PCM_FORMAT_S16_BE:
case SNDRV_PCM_FORMAT_U16_LE:
case SNDRV_PCM_FORMAT_U16_BE:
+ case SNDRV_PCM_FORMAT_DSD_U16_LE:
return 16;
case SNDRV_PCM_FORMAT_S18_3LE:
case SNDRV_PCM_FORMAT_S18_3BE: