summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2018-01-29 04:46:46 +0100
committerMark Brown <broonie@kernel.org>2018-02-12 10:46:19 +0100
commit5ba04c66d592d53d889dc29281bb2db9471d3122 (patch)
treeab081881da8d70d2c5cc14a9696ea6a5f78a293b /sound/soc/intel
parentLinux 4.16-rc1 (diff)
downloadlinux-5ba04c66d592d53d889dc29281bb2db9471d3122.tar.xz
linux-5ba04c66d592d53d889dc29281bb2db9471d3122.zip
ASoC: rt5670: replace codec to component
Now we can replace Codec to Component. Let's do it. Note: 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 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel')
-rw-r--r--sound/soc/intel/boards/cht_bsw_rt5672.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c
index c14a52d2f714..e68ec32720a4 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5672.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5672.c
@@ -183,10 +183,10 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
{
int ret;
struct snd_soc_dai *codec_dai = runtime->codec_dai;
- struct snd_soc_codec *codec = codec_dai->codec;
+ struct snd_soc_component *component = codec_dai->component;
struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card);
- if (devm_acpi_dev_add_driver_gpios(codec->dev, cht_rt5672_gpios))
+ if (devm_acpi_dev_add_driver_gpios(component->dev, cht_rt5672_gpios))
dev_warn(runtime->dev, "Unable to add GPIO mapping table\n");
/* TDM 4 slots 24 bit, set Rx & Tx bitmask to 4 active slots */
@@ -201,7 +201,7 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
* be supported by RT5672. Otherwise, ASRC will be disabled and cause
* noise.
*/
- rt5670_sel_asrc_clk_src(codec,
+ rt5670_sel_asrc_clk_src(component,
RT5670_DA_STEREO_FILTER
| RT5670_DA_MONO_L_FILTER
| RT5670_DA_MONO_R_FILTER
@@ -219,7 +219,7 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
if (ret)
return ret;
- rt5670_set_jack_detect(codec, &ctx->headset);
+ rt5670_set_jack_detect(component, &ctx->headset);
if (ctx->mclk) {
/*
* The firmware might enable the clock at
@@ -333,10 +333,9 @@ static int cht_suspend_pre(struct snd_soc_card *card)
list_for_each_entry(component, &card->component_dev_list, card_list) {
if (!strncmp(component->name,
ctx->codec_name, sizeof(ctx->codec_name))) {
- struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
- dev_dbg(codec->dev, "disabling jack detect before going to suspend.\n");
- rt5670_jack_suspend(codec);
+ dev_dbg(component->dev, "disabling jack detect before going to suspend.\n");
+ rt5670_jack_suspend(component);
break;
}
}
@@ -351,10 +350,9 @@ static int cht_resume_post(struct snd_soc_card *card)
list_for_each_entry(component, &card->component_dev_list, card_list) {
if (!strncmp(component->name,
ctx->codec_name, sizeof(ctx->codec_name))) {
- struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
- dev_dbg(codec->dev, "enabling jack detect for resume.\n");
- rt5670_jack_resume(codec);
+ dev_dbg(component->dev, "enabling jack detect for resume.\n");
+ rt5670_jack_resume(component);
break;
}
}