Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94a988a8 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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: default avatarAlexander E. Patrakov <patrakov@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ee3043b2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -142,11 +142,11 @@ static struct pcm_format_data pcm_formats[(INT)SNDRV_PCM_FORMAT_LAST+1] = {
	},
	[SNDRV_PCM_FORMAT_DSD_U8] = {
		.width = 8, .phys = 8, .le = 1, .signd = 0,
		.silence = {},
		.silence = { 0x69 },
	},
	[SNDRV_PCM_FORMAT_DSD_U16_LE] = {
		.width = 16, .phys = 16, .le = 1, .signd = 0,
		.silence = {},
		.silence = { 0x69, 0x69 },
	},
	/* FIXME: the following three formats are not defined properly yet */
	[SNDRV_PCM_FORMAT_MPEG] = {