aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/pcm.h2
-rw-r--r--include/uapi/sound/asound.h4
-rw-r--r--sound/core/pcm.c2
-rw-r--r--sound/core/pcm_misc.c8
4 files changed, 15 insertions, 1 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index aa7b0a8385cb..1b0c6484e71a 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -181,6 +181,8 @@ struct snd_pcm_ops {
181#define SNDRV_PCM_FMTBIT_G723_24_1B _SNDRV_PCM_FMTBIT(G723_24_1B) 181#define SNDRV_PCM_FMTBIT_G723_24_1B _SNDRV_PCM_FMTBIT(G723_24_1B)
182#define SNDRV_PCM_FMTBIT_G723_40 _SNDRV_PCM_FMTBIT(G723_40) 182#define SNDRV_PCM_FMTBIT_G723_40 _SNDRV_PCM_FMTBIT(G723_40)
183#define SNDRV_PCM_FMTBIT_G723_40_1B _SNDRV_PCM_FMTBIT(G723_40_1B) 183#define SNDRV_PCM_FMTBIT_G723_40_1B _SNDRV_PCM_FMTBIT(G723_40_1B)
184#define SNDRV_PCM_FMTBIT_DSD_U8 _SNDRV_PCM_FMTBIT(DSD_U8)
185#define SNDRV_PCM_FMTBIT_DSD_U16_LE _SNDRV_PCM_FMTBIT(DSD_U16_LE)
184 186
185#ifdef SNDRV_LITTLE_ENDIAN 187#ifdef SNDRV_LITTLE_ENDIAN
186#define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_LE 188#define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_LE
diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
index 1774a5c3ef10..e3983d508272 100644
--- a/include/uapi/sound/asound.h
+++ b/include/uapi/sound/asound.h
@@ -214,7 +214,9 @@ typedef int __bitwise snd_pcm_format_t;
214#define SNDRV_PCM_FORMAT_G723_24_1B ((__force snd_pcm_format_t) 45) /* 1 sample in 1 byte */ 214#define SNDRV_PCM_FORMAT_G723_24_1B ((__force snd_pcm_format_t) 45) /* 1 sample in 1 byte */
215#define SNDRV_PCM_FORMAT_G723_40 ((__force snd_pcm_format_t) 46) /* 8 Samples in 5 bytes */ 215#define SNDRV_PCM_FORMAT_G723_40 ((__force snd_pcm_format_t) 46) /* 8 Samples in 5 bytes */
216#define SNDRV_PCM_FORMAT_G723_40_1B ((__force snd_pcm_format_t) 47) /* 1 sample in 1 byte */ 216#define SNDRV_PCM_FORMAT_G723_40_1B ((__force snd_pcm_format_t) 47) /* 1 sample in 1 byte */
217#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_G723_40_1B 217#define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */
218#define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */
219#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U16_LE
218 220
219#ifdef SNDRV_LITTLE_ENDIAN 221#ifdef SNDRV_LITTLE_ENDIAN
220#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE 222#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 578327e2bc26..17f45e8aa89c 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -209,6 +209,8 @@ static char *snd_pcm_format_names[] = {
209 FORMAT(G723_24_1B), 209 FORMAT(G723_24_1B),
210 FORMAT(G723_40), 210 FORMAT(G723_40),
211 FORMAT(G723_40_1B), 211 FORMAT(G723_40_1B),
212 FORMAT(DSD_U8),
213 FORMAT(DSD_U16_LE),
212}; 214};
213 215
214const char *snd_pcm_format_name(snd_pcm_format_t format) 216const char *snd_pcm_format_name(snd_pcm_format_t format)
diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c
index b875b19f2d55..43f24cce3dec 100644
--- a/sound/core/pcm_misc.c
+++ b/sound/core/pcm_misc.c
@@ -140,6 +140,14 @@ static struct pcm_format_data pcm_formats[(INT)SNDRV_PCM_FORMAT_LAST+1] = {
140 .width = 5, .phys = 5, .le = -1, .signd = -1, 140 .width = 5, .phys = 5, .le = -1, .signd = -1,
141 .silence = {}, 141 .silence = {},
142 }, 142 },
143 [SNDRV_PCM_FORMAT_DSD_U8] = {
144 .width = 8, .phys = 8, .le = 1, .signd = 0,
145 .silence = {},
146 },
147 [SNDRV_PCM_FORMAT_DSD_U16_LE] = {
148 .width = 16, .phys = 16, .le = 1, .signd = 0,
149 .silence = {},
150 },
143 /* FIXME: the following three formats are not defined properly yet */ 151 /* FIXME: the following three formats are not defined properly yet */
144 [SNDRV_PCM_FORMAT_MPEG] = { 152 [SNDRV_PCM_FORMAT_MPEG] = {
145 .le = -1, .signd = -1, 153 .le = -1, .signd = -1,