Skip to content

Commit

Permalink
Merge tag 'sound-4.12' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Two last-minute HD-audio fixes"

* tag 'sound-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix endless loop of codec configure
  ALSA: hda - set input_path bitmap to zero after moving it to new place
  • Loading branch information
torvalds committed Jun 30, 2017
2 parents 86c3e00 + d94815f commit 4adc6b9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions sound/pci/hda/hda_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ struct hda_codec {

#define list_for_each_codec(c, bus) \
list_for_each_entry(c, &(bus)->core.codec_list, core.list)
#define list_for_each_codec_safe(c, n, bus) \
list_for_each_entry_safe(c, n, &(bus)->core.codec_list, core.list)

/* snd_hda_codec_read/write optional flags */
#define HDA_RW_NO_RESPONSE_FALLBACK (1 << 0)
Expand Down
8 changes: 6 additions & 2 deletions sound/pci/hda/hda_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -1337,8 +1337,12 @@ EXPORT_SYMBOL_GPL(azx_probe_codecs);
/* configure each codec instance */
int azx_codec_configure(struct azx *chip)
{
struct hda_codec *codec;
list_for_each_codec(codec, &chip->bus) {
struct hda_codec *codec, *next;

/* use _safe version here since snd_hda_codec_configure() deregisters
* the device upon error and deletes itself from the bus list.
*/
list_for_each_codec_safe(codec, next, &chip->bus) {
snd_hda_codec_configure(codec);
}
return 0;
Expand Down
1 change: 1 addition & 0 deletions sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -3174,6 +3174,7 @@ static int check_dyn_adc_switch(struct hda_codec *codec)
spec->input_paths[i][nums]);
spec->input_paths[i][nums] =
spec->input_paths[i][n];
spec->input_paths[i][n] = 0;
}
}
nums++;
Expand Down

0 comments on commit 4adc6b9

Please sign in to comment.