All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Subject: [PATCH 2/4] ALSA: usb-audio: Don't override ignore_ctl_error value from the map
Date: Sun, 12 Apr 2020 10:13:29 +0200	[thread overview]
Message-ID: <20200412081331.4742-3-tiwai@suse.de> (raw)
In-Reply-To: <20200412081331.4742-1-tiwai@suse.de>

The mapping table may contain also ignore_ctl_error flag for devices
that are known to behave wild.  Since this flag always writes the
card's own ignore_ctl_error flag, it overrides the value already set
by the module option, so it doesn't follow user's expectation.
Let's fix the code not to clear the flag that has been set by user.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206873
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/usb/mixer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index d27e390dcd32..83926b1be53b 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -3106,7 +3106,7 @@ static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer)
 		if (map->id == state.chip->usb_id) {
 			state.map = map->map;
 			state.selector_map = map->selector_map;
-			mixer->ignore_ctl_error = map->ignore_ctl_error;
+			mixer->ignore_ctl_error |= map->ignore_ctl_error;
 			break;
 		}
 	}
-- 
2.16.4


  parent reply	other threads:[~2020-04-12  8:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-12  8:13 [PATCH 0/4] ALSA: usb-audio: More workarounds for TRX40-mobos Takashi Iwai
2020-04-12  8:13 ` [PATCH 1/4] ALSA: usb-audio: Filter error from connector kctl ops, too Takashi Iwai
2020-04-12  8:13 ` Takashi Iwai [this message]
2020-04-12  8:13 ` [PATCH 3/4] ALSA: usb-audio: Don't create jack controls for PCM terminals Takashi Iwai
2020-04-12  8:13 ` [PATCH 4/4] ALSA: usb-audio: Check mapping at creating connector controls, too Takashi Iwai

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=20200412081331.4742-3-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.