diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/usb/card.h | 1 | ||||
-rw-r--r-- | sound/usb/pcm.c | 2 | ||||
-rw-r--r-- | sound/usb/quirks.c | 1 | ||||
-rw-r--r-- | sound/usb/stream.c | 1 |
4 files changed, 4 insertions, 1 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h index 8a751b4887ea..d32ea411545a 100644 --- a/sound/usb/card.h +++ b/sound/usb/card.h | |||
@@ -116,6 +116,7 @@ struct snd_usb_substream { | |||
116 | unsigned int altset_idx; /* USB data format: index of alternate setting */ | 116 | unsigned int altset_idx; /* USB data format: index of alternate setting */ |
117 | unsigned int txfr_quirk:1; /* allow sub-frame alignment */ | 117 | unsigned int txfr_quirk:1; /* allow sub-frame alignment */ |
118 | unsigned int fmt_type; /* USB audio format type (1-3) */ | 118 | unsigned int fmt_type; /* USB audio format type (1-3) */ |
119 | unsigned int pkt_offset_adj; /* Bytes to drop from beginning of packets (for non-compliant devices) */ | ||
119 | 120 | ||
120 | unsigned int running: 1; /* running status */ | 121 | unsigned int running: 1; /* running status */ |
121 | 122 | ||
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 815a37d2e3e0..9916c85d8cdb 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c | |||
@@ -1162,7 +1162,7 @@ static void retire_capture_urb(struct snd_usb_substream *subs, | |||
1162 | stride = runtime->frame_bits >> 3; | 1162 | stride = runtime->frame_bits >> 3; |
1163 | 1163 | ||
1164 | for (i = 0; i < urb->number_of_packets; i++) { | 1164 | for (i = 0; i < urb->number_of_packets; i++) { |
1165 | cp = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset; | 1165 | cp = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset + subs->pkt_offset_adj; |
1166 | if (urb->iso_frame_desc[i].status && printk_ratelimit()) { | 1166 | if (urb->iso_frame_desc[i].status && printk_ratelimit()) { |
1167 | snd_printdd(KERN_ERR "frame %d active: %d\n", i, urb->iso_frame_desc[i].status); | 1167 | snd_printdd(KERN_ERR "frame %d active: %d\n", i, urb->iso_frame_desc[i].status); |
1168 | // continue; | 1168 | // continue; |
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 292798185afc..175fbb7d334a 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c | |||
@@ -854,6 +854,7 @@ static void set_format_emu_quirk(struct snd_usb_substream *subs, | |||
854 | break; | 854 | break; |
855 | } | 855 | } |
856 | snd_emuusb_set_samplerate(subs->stream->chip, emu_samplerate_id); | 856 | snd_emuusb_set_samplerate(subs->stream->chip, emu_samplerate_id); |
857 | subs->pkt_offset_adj = (emu_samplerate_id >= EMU_QUIRK_SR_176400HZ) ? 4 : 0; | ||
857 | } | 858 | } |
858 | 859 | ||
859 | void snd_usb_set_format_quirk(struct snd_usb_substream *subs, | 860 | void snd_usb_set_format_quirk(struct snd_usb_substream *subs, |
diff --git a/sound/usb/stream.c b/sound/usb/stream.c index 74beea237801..8951f77a7201 100644 --- a/sound/usb/stream.c +++ b/sound/usb/stream.c | |||
@@ -93,6 +93,7 @@ static void snd_usb_init_substream(struct snd_usb_stream *as, | |||
93 | subs->dev = as->chip->dev; | 93 | subs->dev = as->chip->dev; |
94 | subs->txfr_quirk = as->chip->txfr_quirk; | 94 | subs->txfr_quirk = as->chip->txfr_quirk; |
95 | subs->speed = snd_usb_get_speed(subs->dev); | 95 | subs->speed = snd_usb_get_speed(subs->dev); |
96 | subs->pkt_offset_adj = 0; | ||
96 | 97 | ||
97 | snd_usb_set_pcm_ops(as->pcm, stream); | 98 | snd_usb_set_pcm_ops(as->pcm, stream); |
98 | 99 | ||