diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-08-22 05:18:48 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-08-22 05:24:58 -0400 |
commit | 94a988a8ab91c0cdabd2431281ec09dc52d92674 (patch) | |
tree | a8c86c0a108923a55ae788fec6887bf7bbe379ad /sound | |
parent | ee3043b2d7b1bfe03cd697b144abf25954ec5fc6 (diff) |
ALSA: pcm: Fix the silence data for DSD formats
Right now we set 0 as the silence data for DSD_U8 and DSD_U16 formats,
but this is actually wrong. 0 is rather the most negative value.
Alternatively, we may take the repeating 0x69 pattern like ffmpeg
deploys.
Reference: https://ffmpeg.org/pipermail/ffmpeg-cvslog/2014-April/076427.html
Suggested-by: Alexander E. Patrakov <patrakov@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/pcm_misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c index 4560ca0e5651..2c6fd80e0bd1 100644 --- a/sound/core/pcm_misc.c +++ b/sound/core/pcm_misc.c | |||
@@ -142,11 +142,11 @@ static struct pcm_format_data pcm_formats[(INT)SNDRV_PCM_FORMAT_LAST+1] = { | |||
142 | }, | 142 | }, |
143 | [SNDRV_PCM_FORMAT_DSD_U8] = { | 143 | [SNDRV_PCM_FORMAT_DSD_U8] = { |
144 | .width = 8, .phys = 8, .le = 1, .signd = 0, | 144 | .width = 8, .phys = 8, .le = 1, .signd = 0, |
145 | .silence = {}, | 145 | .silence = { 0x69 }, |
146 | }, | 146 | }, |
147 | [SNDRV_PCM_FORMAT_DSD_U16_LE] = { | 147 | [SNDRV_PCM_FORMAT_DSD_U16_LE] = { |
148 | .width = 16, .phys = 16, .le = 1, .signd = 0, | 148 | .width = 16, .phys = 16, .le = 1, .signd = 0, |
149 | .silence = {}, | 149 | .silence = { 0x69, 0x69 }, |
150 | }, | 150 | }, |
151 | /* FIXME: the following three formats are not defined properly yet */ | 151 | /* FIXME: the following three formats are not defined properly yet */ |
152 | [SNDRV_PCM_FORMAT_MPEG] = { | 152 | [SNDRV_PCM_FORMAT_MPEG] = { |