diff options
author | Geoffrey D. Bennett <g@b4.vu> | 2021-06-21 20:09:20 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-06-22 21:36:00 +0200 |
commit | e840ee303639a4dcee35fc92613a02702341ae6c (patch) | |
tree | c34e6296134c66f1df7470651707a76bb818a489 /sound/usb/mixer_scarlett_gen2.c | |
parent | ALSA: usb-audio: scarlett2: Fix 6i6 Gen 2 line out descriptions (diff) | |
download | linux-e840ee303639a4dcee35fc92613a02702341ae6c.tar.xz linux-e840ee303639a4dcee35fc92613a02702341ae6c.zip |
ALSA: usb-audio: scarlett2: Always enable interrupt polling
Always enable interrupt polling as every model has some sort of
status to report.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/8f49a6b9a9805ee0db221706193b7bb43b7fff75.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/mixer_scarlett_gen2.c')
-rw-r--r-- | sound/usb/mixer_scarlett_gen2.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sound/usb/mixer_scarlett_gen2.c b/sound/usb/mixer_scarlett_gen2.c index 0b1967d93486..620f1e814f0d 100644 --- a/sound/usb/mixer_scarlett_gen2.c +++ b/sound/usb/mixer_scarlett_gen2.c @@ -2059,11 +2059,16 @@ static void scarlett2_notify_monitor( struct usb_mixer_interface *mixer) { struct scarlett2_data *private = mixer->private_data; - const struct scarlett2_ports *ports = private->info->ports; + const struct scarlett2_device_info *info = private->info; + const struct scarlett2_ports *ports = info->ports; int num_line_out = ports[SCARLETT2_PORT_TYPE_ANALOGUE].num[SCARLETT2_PORT_OUT]; int i; + /* if line_out_hw_vol is 0, there are no controls to update */ + if (!info->line_out_hw_vol) + return; + private->vol_updated = 1; snd_ctl_notify(mixer->chip->card, SNDRV_CTL_EVENT_MASK_VALUE, @@ -2197,12 +2202,10 @@ static int snd_scarlett_gen2_controls_create(struct usb_mixer_interface *mixer, if (err < 0) return err; - /* Set up the interrupt polling if there are hardware buttons */ - if (info->line_out_hw_vol) { - err = scarlett2_init_notify(mixer); - if (err < 0) - return err; - } + /* Set up the interrupt polling */ + err = scarlett2_init_notify(mixer); + if (err < 0) + return err; return 0; } |