aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards/broadwell.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-12-01 21:47:57 +0000
committerMark Brown <broonie@kernel.org>2016-12-01 21:47:57 +0000
commit5203a3ca09d51b3f475fd12cf974f886147d371d (patch)
treeb927e41edc5b3656e4c52ac73a0148c6fa95a4d1 /sound/soc/intel/boards/broadwell.c
parentASoC: cht_bsw_rt5672: Use HID translation unit (diff)
parentASoC: add Component level suspend/resume (diff)
downloadlinux-dev-5203a3ca09d51b3f475fd12cf974f886147d371d.tar.xz
linux-dev-5203a3ca09d51b3f475fd12cf974f886147d371d.zip
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.c16
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;