summaryrefslogtreecommitdiff
path: root/sound/usb/card.h
diff options
context:
space:
mode:
authorHector Martin <marcan@marcan.st>2020-08-10 11:24:00 +0300
committerTakashi Iwai <tiwai@suse.de>2020-08-10 13:57:12 +0300
commit1b7ecc241a67ad6b584e071bd791a54e0cd5f097 (patch)
treef3f50d33541982032c151bfe33a91378584f1120 /sound/usb/card.h
parent386a6539992b82fe9ac4f9dc3f548956fd894d8c (diff)
downloadlinux-1b7ecc241a67ad6b584e071bd791a54e0cd5f097.tar.xz
ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109
Further investigation of the L-R swap problem on the MS2109 reveals that the problem isn't that the channels are swapped, but rather that they are swapped and also out of phase by one sample. In other words, the issue is actually that the very first frame that comes from the hardware is a half-frame containing only the right channel, and after that everything becomes offset. So introduce a new quirk field to drop the very first 2 bytes that come in after the format is configured and a capture stream starts. This puts the channels in phase and in the correct order. Cc: stable@vger.kernel.org Signed-off-by: Hector Martin <marcan@marcan.st> Link: https://lore.kernel.org/r/20200810082400.225858-1-marcan@marcan.st Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.h')
-rw-r--r--sound/usb/card.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h
index de43267b9c8a..5351d7183b1b 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -137,6 +137,7 @@ struct snd_usb_substream {
unsigned int tx_length_quirk:1; /* add length specifier to transfers */
unsigned int fmt_type; /* USB audio format type (1-3) */
unsigned int pkt_offset_adj; /* Bytes to drop from beginning of packets (for non-compliant devices) */
+ unsigned int stream_offset_adj; /* Bytes to drop from beginning of stream (for non-compliant devices) */
unsigned int running: 1; /* running status */