summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorJussi Laako <jussi@sonarnerd.net>2014-11-21 16:04:46 +0200
committerTakashi Iwai <tiwai@suse.de>2014-11-21 15:13:28 +0100
commitd42472ecffd7c42086c6e5b1335c99a3adf58a09 (patch)
treeb4d2e62d64cd8d1b269664c9fdee8083c05df574 /sound/core
parent911f632c701d9f15a54076cbaca82e7defb339e0 (diff)
downloadop-kernel-dev-d42472ecffd7c42086c6e5b1335c99a3adf58a09.zip
op-kernel-dev-d42472ecffd7c42086c6e5b1335c99a3adf58a09.tar.gz
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.c2
-rw-r--r--sound/core/pcm_misc.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 42ded99..c6ff94a 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -216,6 +216,8 @@ static char *snd_pcm_format_names[] = {
FORMAT(DSD_U8),
FORMAT(DSD_U16_LE),
FORMAT(DSD_U32_LE),
+ FORMAT(DSD_U16_BE),
+ FORMAT(DSD_U32_BE),
};
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 ae7a0fe..ebe8444 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] = {
.width = 32, .phys = 32, .le = 1, .signd = 0,
.silence = { 0x69, 0x69, 0x69, 0x69 },
},
+ [SNDRV_PCM_FORMAT_DSD_U16_BE] = {
+ .width = 16, .phys = 16, .le = 0, .signd = 0,
+ .silence = { 0x69, 0x69 },
+ },
+ [SNDRV_PCM_FORMAT_DSD_U32_BE] = {
+ .width = 32, .phys = 32, .le = 0, .signd = 0,
+ .silence = { 0x69, 0x69, 0x69, 0x69 },
+ },
/* FIXME: the following three formats are not defined properly yet */
[SNDRV_PCM_FORMAT_MPEG] = {
.le = -1, .signd = -1,
OpenPOWER on IntegriCloud