All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Subject: [PATCH] ALSA: usb-audio: Drop superfluous interface setup at parsing
Date: Wed, 31 Aug 2022 15:00:21 +0200	[thread overview]
Message-ID: <20220831130021.4762-1-tiwai@suse.de> (raw)

We reset each interface that is being parsed for each stream, but this
is superfluous and even can lead to spurious errors.  Since the
interface is set up properly at opening the endpoint for each actual
stream operation, let's drop the superfluous one.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/usb/stream.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index ceb93d798182..99578e9a8af0 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -1221,12 +1221,6 @@ static int __snd_usb_parse_audio_interface(struct snd_usb_audio *chip,
 			if (err < 0)
 				return err;
 		}
-
-		/* try to set the interface... */
-		usb_set_interface(chip->dev, iface_no, 0);
-		snd_usb_init_pitch(chip, fp);
-		snd_usb_init_sample_rate(chip, fp, fp->rate_max);
-		usb_set_interface(chip->dev, iface_no, altno);
 	}
 	return 0;
 }
-- 
2.35.3


                 reply	other threads:[~2022-08-31 13:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220831130021.4762-1-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.