Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: scarlett2: Fix Scarlett 4th Gen 4i4 low-voltage detection

The value currently being read to determine the low-voltage state is
actually the front panel state. Fix the code to use the correct offset
for the low-voltage state.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Fixes: d7cfa2fdfc8a ("ALSA: scarlett2: Add power status control")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <d97b7d87f43b0e54f37e1552394be2f3ae182704.1710047969.git.g@b4.vu>

authored by

Geoffrey D. Bennett and committed by
Takashi Iwai
6ef1f08b 9fc91a6f

+7 -8
+7 -8
sound/usb/mixer_scarlett2.c
··· 415 415 SCARLETT2_CONFIG_INPUT_SELECT_SWITCH, 416 416 SCARLETT2_CONFIG_INPUT_LINK_SWITCH, 417 417 SCARLETT2_CONFIG_POWER_EXT, 418 - SCARLETT2_CONFIG_POWER_STATUS, 418 + SCARLETT2_CONFIG_POWER_LOW, 419 419 SCARLETT2_CONFIG_PCM_INPUT_SWITCH, 420 420 SCARLETT2_CONFIG_DIRECT_MONITOR_GAIN, 421 421 SCARLETT2_CONFIG_COUNT ··· 723 723 [SCARLETT2_CONFIG_POWER_EXT] = { 724 724 .offset = 0x168 }, 725 725 726 - [SCARLETT2_CONFIG_POWER_STATUS] = { 727 - .offset = 0x66 } 726 + [SCARLETT2_CONFIG_POWER_LOW] = { 727 + .offset = 0x16d } 728 728 } 729 729 }; 730 730 ··· 6294 6294 { 6295 6295 struct scarlett2_data *private = mixer->private_data; 6296 6296 int err; 6297 - u8 power_ext; 6298 - u8 power_status; 6297 + u8 power_ext, power_low; 6299 6298 6300 6299 private->power_status_updated = 0; 6301 6300 ··· 6303 6304 if (err < 0) 6304 6305 return err; 6305 6306 6306 - err = scarlett2_usb_get_config(mixer, SCARLETT2_CONFIG_POWER_STATUS, 6307 - 1, &power_status); 6307 + err = scarlett2_usb_get_config(mixer, SCARLETT2_CONFIG_POWER_LOW, 6308 + 1, &power_low); 6308 6309 if (err < 0) 6309 6310 return err; 6310 6311 6311 - if (power_status > 1) 6312 + if (power_low) 6312 6313 private->power_status = SCARLETT2_POWER_STATUS_FAIL; 6313 6314 else if (power_ext) 6314 6315 private->power_status = SCARLETT2_POWER_STATUS_EXT;