From: "Geoffrey D. Bennett" <g@b4.vu>
To: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>
Cc: Hin-Tak Leung <htl10@users.sourceforge.net>,
Vladimir Sadovnikov <sadko4u@gmail.com>
Subject: [PATCH 05/14] ALSA: usb-audio: scarlett2: Remove interrupt debug message
Date: Mon, 21 Jun 2021 02:16:32 +0930 [thread overview]
Message-ID: <20210620164632.GA9186@m.b4.vu> (raw)
Just ignore instead of printing an error if the interrupt data is not
the expected length. This check was for development and the condition
has not been observed.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
---
sound/usb/mixer_scarlett_gen2.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/sound/usb/mixer_scarlett_gen2.c b/sound/usb/mixer_scarlett_gen2.c
index a5f5c537e344..3225ec709d98 100644
--- a/sound/usb/mixer_scarlett_gen2.c
+++ b/sound/usb/mixer_scarlett_gen2.c
@@ -2018,19 +2018,14 @@ static void scarlett2_mixer_interrupt(struct urb *urb)
int ustatus = urb->status;
u32 data;
- if (ustatus != 0)
+ if (ustatus != 0 || len != 8)
goto requeue;
- if (len == 8) {
- data = le32_to_cpu(*(__le32 *)urb->transfer_buffer);
- if (data & SCARLETT2_USB_INTERRUPT_VOL_CHANGE)
- scarlett2_mixer_interrupt_vol_change(mixer);
- if (data & SCARLETT2_USB_INTERRUPT_BUTTON_CHANGE)
- scarlett2_mixer_interrupt_button_change(mixer);
- } else {
- usb_audio_err(mixer->chip,
- "scarlett mixer interrupt length %d\n", len);
- }
+ data = le32_to_cpu(*(__le32 *)urb->transfer_buffer);
+ if (data & SCARLETT2_USB_INTERRUPT_VOL_CHANGE)
+ scarlett2_mixer_interrupt_vol_change(mixer);
+ if (data & SCARLETT2_USB_INTERRUPT_BUTTON_CHANGE)
+ scarlett2_mixer_interrupt_button_change(mixer);
requeue:
if (ustatus != -ENOENT &&
--
2.31.1
reply other threads:[~2021-06-20 16:48 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=20210620164632.GA9186@m.b4.vu \
--to=g@b4.vu \
--cc=alsa-devel@alsa-project.org \
--cc=htl10@users.sourceforge.net \
--cc=sadko4u@gmail.com \
--cc=tiwai@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox