From 21bb5aafce4350e243f9be3d981c0beb2e2c5ab4 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Wed, 10 Apr 2013 00:56:03 +0800 Subject: ALSA: snd-usb: Playback Design: use usb_set_inferface quirk from more locations It turns out the devices from Playback Design need the delay quirk after usb_set_interface from clocks.c as well. Make it a proper quirks function and factor out the code to quirks.c. Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai --- sound/usb/quirks.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sound/usb/quirks.h') diff --git a/sound/usb/quirks.h b/sound/usb/quirks.h index 0ca9e91067a6..7c3681fd1c3c 100644 --- a/sound/usb/quirks.h +++ b/sound/usb/quirks.h @@ -26,6 +26,7 @@ int snd_usb_is_big_endian_format(struct snd_usb_audio *chip, void snd_usb_endpoint_start_quirk(struct snd_usb_endpoint *ep); +void snd_usb_set_interface_quirk(struct usb_device *dev); void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void *data, __u16 size); -- cgit v1.2.3 From 126825e7ea271ae8e3172e10ca1fc22c908b5385 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Wed, 17 Apr 2013 00:01:40 +0800 Subject: ALSA: snd-usb: add quirks handler for DSD streams Unfortunately, none of the UAC standards provides a way to identify DSD (Direct Stream Digital) formats. Hence, this patch adds a quirks handler to identify USB interfaces that are capable of handling DSD. That quirks handler can augment the already parsed formats bit-field, by any of the new SNDRV_PCM_FMTBIT_DSD_{U8_U16} and setting the dsd_dop flag in the audio format, if the driver should take care for the DOP byte stuffing. The only devices that are known to work with this are the ones with a 'Playback Designs' vendor id. Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai --- sound/usb/quirks.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sound/usb/quirks.h') diff --git a/sound/usb/quirks.h b/sound/usb/quirks.h index 7c3681fd1c3c..665e972a1b40 100644 --- a/sound/usb/quirks.h +++ b/sound/usb/quirks.h @@ -31,4 +31,8 @@ void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void *data, __u16 size); +u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip, + struct audioformat *fp, + unsigned int sample_bytes); + #endif /* __USBAUDIO_QUIRKS_H */ -- cgit v1.2.3