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

Commit cc148951 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Revert "ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109"



This reverts commit 10de4199 which is
commit 1b7ecc241a67ad6b584e071bd791a54e0cd5f097 upstream.

It breaks the abi for the android11-5.4 branch, and isn't needed in
android devices, so just revert it.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I081472f3c3663edaa0c1275fe5e1303833bd533c
parent c0b17797
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -140,7 +140,6 @@ 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 */

+0 −6
Original line number Diff line number Diff line
@@ -1585,12 +1585,6 @@ static void retire_capture_urb(struct snd_usb_substream *subs,
			// continue;
		}
		bytes = urb->iso_frame_desc[i].actual_length;
		if (subs->stream_offset_adj > 0) {
			unsigned int adj = min(subs->stream_offset_adj, bytes);
			cp += adj;
			bytes -= adj;
			subs->stream_offset_adj -= adj;
		}
		frames = bytes / stride;
		if (!subs->txfr_quirk)
			bytes = frames * stride;
+0 −3
Original line number Diff line number Diff line
@@ -1432,9 +1432,6 @@ void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
	case USB_ID(0x041e, 0x3f19): /* E-Mu 0204 USB */
		set_format_emu_quirk(subs, fmt);
		break;
	case USB_ID(0x534d, 0x2109): /* MacroSilicon MS2109 */
		subs->stream_offset_adj = 2;
		break;
	}
}

+0 −1
Original line number Diff line number Diff line
@@ -98,7 +98,6 @@ static void snd_usb_init_substream(struct snd_usb_stream *as,
	subs->tx_length_quirk = as->chip->tx_length_quirk;
	subs->speed = snd_usb_get_speed(subs->dev);
	subs->pkt_offset_adj = 0;
	subs->stream_offset_adj = 0;

	snd_usb_set_pcm_ops(as->pcm, stream);