diff options
author | Mark Brown <broonie@kernel.org> | 2016-12-01 21:47:57 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-12-01 21:47:57 +0000 |
commit | 5203a3ca09d51b3f475fd12cf974f886147d371d (patch) | |
tree | b927e41edc5b3656e4c52ac73a0148c6fa95a4d1 /sound/soc/intel/boards/broadwell.c | |
parent | fee3244cd1f5af813a24537950e211eee4f33297 (diff) | |
parent | 9178feb4538e055bf22be44c38b90cc31d2baf99 (diff) |
Merge branch 'topic/component' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
Diffstat (limited to 'sound/soc/intel/boards/broadwell.c')
-rw-r--r-- | sound/soc/intel/boards/broadwell.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sound/soc/intel/boards/broadwell.c b/sound/soc/intel/boards/broadwell.c index 5bb64d164877..4d7e9decfa92 100644 --- a/sound/soc/intel/boards/broadwell.c +++ b/sound/soc/intel/boards/broadwell.c @@ -220,10 +220,12 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = { }; static int broadwell_suspend(struct snd_soc_card *card){ - struct snd_soc_codec *codec; + struct snd_soc_component *component; + + list_for_each_entry(component, &card->component_dev_list, card_list) { + if (!strcmp(component->name, "i2c-INT343A:00")) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); - list_for_each_entry(codec, &card->codec_dev_list, card_list) { - if (!strcmp(codec->component.name, "i2c-INT343A:00")) { dev_dbg(codec->dev, "disabling jack detect before going to suspend.\n"); rt286_mic_detect(codec, NULL); break; @@ -233,10 +235,12 @@ static int broadwell_suspend(struct snd_soc_card *card){ } static int broadwell_resume(struct snd_soc_card *card){ - struct snd_soc_codec *codec; + struct snd_soc_component *component; + + list_for_each_entry(component, &card->component_dev_list, card_list) { + if (!strcmp(component->name, "i2c-INT343A:00")) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); - list_for_each_entry(codec, &card->codec_dev_list, card_list) { - if (!strcmp(codec->component.name, "i2c-INT343A:00")) { dev_dbg(codec->dev, "enabling jack detect for resume.\n"); rt286_mic_detect(codec, &broadwell_headset); break; |