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

Merge tag 'sound-fix-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Just a few additional small and trivial fixes"

* tag 'sound-fix-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Fix the return value if cb func is already registered
ALSA: usb-audio: Line6 Pod Go interface requires static clock rate quirk
ALSA: hda/ca0132: make some const arrays static, makes object smaller
ALSA: sparc: dbri: fix repeated word 'the'

+27 -12
+13 -5
sound/pci/hda/hda_jack.c
··· 275 275 } 276 276 EXPORT_SYMBOL_GPL(snd_hda_jack_detect_state_mst); 277 277 278 - static bool func_is_already_in_callback_list(struct hda_jack_tbl *jack, 279 - hda_jack_callback_fn func) 278 + static struct hda_jack_callback * 279 + find_callback_from_list(struct hda_jack_tbl *jack, 280 + hda_jack_callback_fn func) 280 281 { 281 282 struct hda_jack_callback *cb; 282 283 284 + if (!func) 285 + return NULL; 286 + 283 287 for (cb = jack->callback; cb; cb = cb->next) { 284 288 if (cb->func == func) 285 - return true; 289 + return cb; 286 290 } 287 - return false; 291 + 292 + return NULL; 288 293 } 289 294 290 295 /** ··· 314 309 jack = snd_hda_jack_tbl_new(codec, nid, dev_id); 315 310 if (!jack) 316 311 return ERR_PTR(-ENOMEM); 317 - if (func && !func_is_already_in_callback_list(jack, func)) { 312 + 313 + callback = find_callback_from_list(jack, func); 314 + 315 + if (func && !callback) { 318 316 callback = kzalloc(sizeof(*callback), GFP_KERNEL); 319 317 if (!callback) 320 318 return ERR_PTR(-ENOMEM);
+12 -6
sound/pci/hda/patch_ca0132.c
··· 7910 7910 7911 7911 static void ae7_post_dsp_pll_setup(struct hda_codec *codec) 7912 7912 { 7913 - const unsigned int addr[] = { 0x41, 0x45, 0x40, 0x43, 0x51 }; 7914 - const unsigned int data[] = { 0xc8, 0xcc, 0xcb, 0xc7, 0x8d }; 7913 + static const unsigned int addr[] = { 7914 + 0x41, 0x45, 0x40, 0x43, 0x51 7915 + }; 7916 + static const unsigned int data[] = { 7917 + 0xc8, 0xcc, 0xcb, 0xc7, 0x8d 7918 + }; 7915 7919 unsigned int i; 7916 7920 7917 7921 for (i = 0; i < ARRAY_SIZE(addr); i++) { ··· 7929 7925 static void ae7_post_dsp_asi_setup_ports(struct hda_codec *codec) 7930 7926 { 7931 7927 struct ca0132_spec *spec = codec->spec; 7932 - const unsigned int target[] = { 0x0b, 0x04, 0x06, 0x0a, 0x0c, 0x11, 7933 - 0x12, 0x13, 0x14 }; 7934 - const unsigned int data[] = { 0x12, 0x00, 0x48, 0x05, 0x5f, 0xff, 7935 - 0xff, 0xff, 0x7f }; 7928 + static const unsigned int target[] = { 7929 + 0x0b, 0x04, 0x06, 0x0a, 0x0c, 0x11, 0x12, 0x13, 0x14 7930 + }; 7931 + static const unsigned int data[] = { 7932 + 0x12, 0x00, 0x48, 0x05, 0x5f, 0xff, 0xff, 0xff, 0x7f 7933 + }; 7936 7934 unsigned int i; 7937 7935 7938 7936 mutex_lock(&spec->chipio_mutex);
+1 -1
sound/sparc/dbri.c
··· 620 620 while another can be executed. The scheme works by adding two WAIT commands 621 621 after each sent batch of commands. When the next batch is prepared it is 622 622 added after the WAIT commands then the WAITs are replaced with single JUMP 623 - command to the new batch. The the DBRI is forced to reread the last WAIT 623 + command to the new batch. Then the DBRI is forced to reread the last WAIT 624 624 command (replaced by the JUMP by then). If the DBRI is still executing 625 625 previous commands the request to reread the WAIT command is ignored. 626 626
+1
sound/usb/format.c
··· 406 406 case USB_ID(0x0e41, 0x4242): /* Line6 Helix Rack */ 407 407 case USB_ID(0x0e41, 0x4244): /* Line6 Helix LT */ 408 408 case USB_ID(0x0e41, 0x4246): /* Line6 HX-Stomp */ 409 + case USB_ID(0x0e41, 0x4247): /* Line6 Pod Go */ 409 410 case USB_ID(0x0e41, 0x4248): /* Line6 Helix >= fw 2.82 */ 410 411 case USB_ID(0x0e41, 0x4249): /* Line6 Helix Rack >= fw 2.82 */ 411 412 case USB_ID(0x0e41, 0x424a): /* Line6 Helix LT >= fw 2.82 */