summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards/broadwell.c
diff options
context:
space:
mode:
authorKuninori Morimoto2018-01-29 05:36:54 +0100
committerMark Brown2018-02-12 12:11:56 +0100
commit4510112217116d97df02121d3e1442858efb4897 (patch)
tree6e3fa97ee57d32a24594cc93a3f9972d775d3c73 /sound/soc/intel/boards/broadwell.c
parentASoC: Intel: Skylake: make function skl_clk_round_rate static (diff)
downloadkernel-qcow2-linux-4510112217116d97df02121d3e1442858efb4897.tar.gz
kernel-qcow2-linux-4510112217116d97df02121d3e1442858efb4897.tar.xz
kernel-qcow2-linux-4510112217116d97df02121d3e1442858efb4897.zip
ASoC: hdac_hdmi/nau8825/rt286/rt298/rt5663/da7219: replace codec to component
Now we can replace Codec to Component. Let's do it. Because intal/rockchip boards are using multi-codecs in 1 driver, we need to update these all related drivers in same time. Otherwise compile error/warning happen Note: hdac_hdmi xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 nau8825 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 rt286 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 rt298 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 rt5663 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 da7219 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/broadwell.c')
-rw-r--r--sound/soc/intel/boards/broadwell.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/soc/intel/boards/broadwell.c b/sound/soc/intel/boards/broadwell.c
index 6dcbbcefc25b..370cd916faba 100644
--- a/sound/soc/intel/boards/broadwell.c
+++ b/sound/soc/intel/boards/broadwell.c
@@ -78,7 +78,7 @@ static const struct snd_soc_dapm_route broadwell_rt286_map[] = {
static int broadwell_rt286_codec_init(struct snd_soc_pcm_runtime *rtd)
{
- struct snd_soc_codec *codec = rtd->codec;
+ struct snd_soc_component *component = rtd->codec_dai->component;
int ret = 0;
ret = snd_soc_card_jack_new(rtd->card, "Headset",
SND_JACK_HEADSET | SND_JACK_BTN_0, &broadwell_headset,
@@ -86,7 +86,7 @@ static int broadwell_rt286_codec_init(struct snd_soc_pcm_runtime *rtd)
if (ret)
return ret;
- rt286_mic_detect(codec, &broadwell_headset);
+ rt286_mic_detect(component, &broadwell_headset);
return 0;
}
@@ -224,10 +224,9 @@ static int broadwell_suspend(struct snd_soc_card *card){
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);
- dev_dbg(codec->dev, "disabling jack detect before going to suspend.\n");
- rt286_mic_detect(codec, NULL);
+ dev_dbg(component->dev, "disabling jack detect before going to suspend.\n");
+ rt286_mic_detect(component, NULL);
break;
}
}
@@ -239,10 +238,9 @@ static int broadwell_resume(struct snd_soc_card *card){
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);
- dev_dbg(codec->dev, "enabling jack detect for resume.\n");
- rt286_mic_detect(codec, &broadwell_headset);
+ dev_dbg(component->dev, "enabling jack detect for resume.\n");
+ rt286_mic_detect(component, &broadwell_headset);
break;
}
}