Skip to content

Commit 40a03b7

Browse files
committed
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'
2 parents fc03b2d + 033e404 commit 40a03b7

4 files changed

Lines changed: 27 additions & 12 deletions

File tree

sound/pci/hda/hda_jack.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,16 +275,21 @@ int snd_hda_jack_detect_state_mst(struct hda_codec *codec,
275275
}
276276
EXPORT_SYMBOL_GPL(snd_hda_jack_detect_state_mst);
277277

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)
280281
{
281282
struct hda_jack_callback *cb;
282283

284+
if (!func)
285+
return NULL;
286+
283287
for (cb = jack->callback; cb; cb = cb->next) {
284288
if (cb->func == func)
285-
return true;
289+
return cb;
286290
}
287-
return false;
291+
292+
return NULL;
288293
}
289294

290295
/**
@@ -309,7 +314,10 @@ snd_hda_jack_detect_enable_callback_mst(struct hda_codec *codec, hda_nid_t nid,
309314
jack = snd_hda_jack_tbl_new(codec, nid, dev_id);
310315
if (!jack)
311316
return ERR_PTR(-ENOMEM);
312-
if (func && !func_is_already_in_callback_list(jack, func)) {
317+
318+
callback = find_callback_from_list(jack, func);
319+
320+
if (func && !callback) {
313321
callback = kzalloc(sizeof(*callback), GFP_KERNEL);
314322
if (!callback)
315323
return ERR_PTR(-ENOMEM);

sound/pci/hda/patch_ca0132.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7910,8 +7910,12 @@ static void ae7_post_dsp_asi_stream_setup(struct hda_codec *codec)
79107910

79117911
static void ae7_post_dsp_pll_setup(struct hda_codec *codec)
79127912
{
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+
};
79157919
unsigned int i;
79167920

79177921
for (i = 0; i < ARRAY_SIZE(addr); i++) {
@@ -7925,10 +7929,12 @@ static void ae7_post_dsp_pll_setup(struct hda_codec *codec)
79257929
static void ae7_post_dsp_asi_setup_ports(struct hda_codec *codec)
79267930
{
79277931
struct ca0132_spec *spec = codec->spec;
7928-
const unsigned int target[] = { 0x0b, 0x04, 0x06, 0x0a, 0x0c, 0x11,
7929-
0x12, 0x13, 0x14 };
7930-
const unsigned int data[] = { 0x12, 0x00, 0x48, 0x05, 0x5f, 0xff,
7931-
0xff, 0xff, 0x7f };
7932+
static const unsigned int target[] = {
7933+
0x0b, 0x04, 0x06, 0x0a, 0x0c, 0x11, 0x12, 0x13, 0x14
7934+
};
7935+
static const unsigned int data[] = {
7936+
0x12, 0x00, 0x48, 0x05, 0x5f, 0xff, 0xff, 0xff, 0x7f
7937+
};
79327938
unsigned int i;
79337939

79347940
mutex_lock(&spec->chipio_mutex);

sound/sparc/dbri.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ A circular command buffer is used here. A new command is being added
620620
while another can be executed. The scheme works by adding two WAIT commands
621621
after each sent batch of commands. When the next batch is prepared it is
622622
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
624624
command (replaced by the JUMP by then). If the DBRI is still executing
625625
previous commands the request to reread the WAIT command is ignored.
626626

sound/usb/format.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ static int line6_parse_audio_format_rates_quirk(struct snd_usb_audio *chip,
406406
case USB_ID(0x0e41, 0x4242): /* Line6 Helix Rack */
407407
case USB_ID(0x0e41, 0x4244): /* Line6 Helix LT */
408408
case USB_ID(0x0e41, 0x4246): /* Line6 HX-Stomp */
409+
case USB_ID(0x0e41, 0x4247): /* Line6 Pod Go */
409410
case USB_ID(0x0e41, 0x4248): /* Line6 Helix >= fw 2.82 */
410411
case USB_ID(0x0e41, 0x4249): /* Line6 Helix Rack >= fw 2.82 */
411412
case USB_ID(0x0e41, 0x424a): /* Line6 Helix LT >= fw 2.82 */

0 commit comments

Comments
 (0)