diff options
author | Jussi Laako <jussi@sonarnerd.net> | 2014-11-21 09:04:46 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-11-21 09:13:28 -0500 |
commit | d42472ecffd7c42086c6e5b1335c99a3adf58a09 (patch) | |
tree | b4d2e62d64cd8d1b269664c9fdee8083c05df574 /sound/core | |
parent | 911f632c701d9f15a54076cbaca82e7defb339e0 (diff) |
ALSA: pcm: Add big-endian DSD sample formats and fix XMOS DSD sample format
This patch fixes XMOS DSD sample format to DSD_U32_BE and also adds
DSD_U16_BE and DSD_U32_BE sample formats.
Signed-off-by: Jussi Laako <jussi@sonarnerd.net>
Acked-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/pcm.c | 2 | ||||
-rw-r--r-- | sound/core/pcm_misc.c | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 42ded997b223..c6ff94ab1ad6 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c | |||
@@ -216,6 +216,8 @@ static char *snd_pcm_format_names[] = { | |||
216 | FORMAT(DSD_U8), | 216 | FORMAT(DSD_U8), |
217 | FORMAT(DSD_U16_LE), | 217 | FORMAT(DSD_U16_LE), |
218 | FORMAT(DSD_U32_LE), | 218 | FORMAT(DSD_U32_LE), |
219 | FORMAT(DSD_U16_BE), | ||
220 | FORMAT(DSD_U32_BE), | ||
219 | }; | 221 | }; |
220 | 222 | ||
221 | const char *snd_pcm_format_name(snd_pcm_format_t format) | 223 | const 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 ae7a0feb3b76..ebe8444de6c6 100644 --- a/sound/core/pcm_misc.c +++ b/sound/core/pcm_misc.c | |||
@@ -152,6 +152,14 @@ static struct pcm_format_data pcm_formats[(INT)SNDRV_PCM_FORMAT_LAST+1] = { | |||
152 | .width = 32, .phys = 32, .le = 1, .signd = 0, | 152 | .width = 32, .phys = 32, .le = 1, .signd = 0, |
153 | .silence = { 0x69, 0x69, 0x69, 0x69 }, | 153 | .silence = { 0x69, 0x69, 0x69, 0x69 }, |
154 | }, | 154 | }, |
155 | [SNDRV_PCM_FORMAT_DSD_U16_BE] = { | ||
156 | .width = 16, .phys = 16, .le = 0, .signd = 0, | ||
157 | .silence = { 0x69, 0x69 }, | ||
158 | }, | ||
159 | [SNDRV_PCM_FORMAT_DSD_U32_BE] = { | ||
160 | .width = 32, .phys = 32, .le = 0, .signd = 0, | ||
161 | .silence = { 0x69, 0x69, 0x69, 0x69 }, | ||
162 | }, | ||
155 | /* FIXME: the following three formats are not defined properly yet */ | 163 | /* FIXME: the following three formats are not defined properly yet */ |
156 | [SNDRV_PCM_FORMAT_MPEG] = { | 164 | [SNDRV_PCM_FORMAT_MPEG] = { |
157 | .le = -1, .signd = -1, | 165 | .le = -1, .signd = -1, |