diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-07-29 09:38:52 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-08-02 09:05:59 +0200 |
commit | f21dca857b4c2ab226083330ee31479ddac1e99d (patch) | |
tree | c153dd3e5b6a9fc6e616bdd36a56a0fb44635f21 /sound/usb/clock.c | |
parent | ALSA: usb-audio: Move playback_first flag into quirk_flags (diff) | |
download | linux-f21dca857b4c2ab226083330ee31479ddac1e99d.tar.xz linux-f21dca857b4c2ab226083330ee31479ddac1e99d.zip |
ALSA: usb-audio: Move clock setup quirk into quirk_flags
There are a couple of device-specific quirks in the clock setup code,
and those can be moved gracefully to quirk_flags, too.
Link: https://lore.kernel.org/r/20210729073855.19043-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/clock.c')
-rw-r--r-- | sound/usb/clock.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sound/usb/clock.c b/sound/usb/clock.c index 90b03ae03574..81d5ce07d548 100644 --- a/sound/usb/clock.c +++ b/sound/usb/clock.c @@ -324,11 +324,8 @@ static int __uac_clock_find_source(struct snd_usb_audio *chip, sources[ret - 1], visited, validate); if (ret > 0) { - /* - * For Samsung USBC Headset (AKG), setting clock selector again - * will result in incorrect default clock setting problems - */ - if (chip->usb_id == USB_ID(0x04e8, 0xa051)) + /* Skip setting clock selector again for some devices */ + if (chip->quirk_flags & QUIRK_FLAG_SKIP_CLOCK_SELECTOR) return ret; err = uac_clock_selector_set_val(chip, entity_id, cur); if (err < 0) @@ -541,10 +538,8 @@ static int set_sample_rate_v2v3(struct snd_usb_audio *chip, */ clock = snd_usb_clock_find_source(chip, fmt, false); - /* Denon DN-X1600 hardcoded - * Sample rate seems to be set on the hardware itself - */ - if (chip->usb_id == USB_ID(0x154e, 0x500e)) + /* Hardcoded sample rates */ + if (chip->quirk_flags & QUIRK_FLAG_IGNORE_CLOCK_SOURCE) return 0; if (clock < 0) |