aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNobutaka Okabe <nob77413@gmail.com>2016-12-12 12:52:58 -0500
committerTakashi Iwai <tiwai@suse.de>2016-12-12 16:43:35 -0500
commit012007309133d21a5a7eae3f552c03ac061a2b51 (patch)
treed4f50860eb63a511612b4495c2386ec149b53e27
parent7f38ca047b0cb54df7f6d9e4110e292e45dba6ad (diff)
ALSA: usb-audio: Eliminate noise at the start of DSD playback.
[Problem] In some USB DACs, a terrible pop noise comes to be heard at the start of DSD playback (in the following situations). - play first DSD track - change from PCM track to DSD track - change from DSD64 track to DSD128 track (and etc...) - seek DSD track - Fast-Forward/Rewind DSD track [Cause] At the start of playback, there is a little silence. The silence bit pattern "0x69" is required on DSD mode, but it is not like that. [Solution] This patch adds DSD silence pattern to the endpoint settings. Signed-off-by: Nobutaka Okabe <nob77413@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/usb/endpoint.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 57b0d9968ec2..a2cdf3370afe 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -638,7 +638,21 @@ static int data_ep_set_params(struct snd_usb_endpoint *ep,
638 638
639 ep->datainterval = fmt->datainterval; 639 ep->datainterval = fmt->datainterval;
640 ep->stride = frame_bits >> 3; 640 ep->stride = frame_bits >> 3;
641 ep->silence_value = pcm_format == SNDRV_PCM_FORMAT_U8 ? 0x80 : 0; 641
642 switch (pcm_format) {
643 case SNDRV_PCM_FORMAT_U8:
644 ep->silence_value = 0x80;
645 break;
646 case SNDRV_PCM_FORMAT_DSD_U8:
647 case SNDRV_PCM_FORMAT_DSD_U16_LE:
648 case SNDRV_PCM_FORMAT_DSD_U32_LE:
649 case SNDRV_PCM_FORMAT_DSD_U16_BE:
650 case SNDRV_PCM_FORMAT_DSD_U32_BE:
651 ep->silence_value = 0x69;
652 break;
653 default:
654 ep->silence_value = 0;
655 }
642 656
643 /* assume max. frequency is 50% higher than nominal */ 657 /* assume max. frequency is 50% higher than nominal */
644 ep->freqmax = ep->freqn + (ep->freqn >> 1); 658 ep->freqmax = ep->freqn + (ep->freqn >> 1);