mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 04:30:08 +07:00
ASoC: qcom: apq8016_sbc: use for_each_rtd_codec_dai() macro
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87lfozjcaw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
a4eb41eef3
commit
cf4dae0320
@ -34,8 +34,8 @@ struct apq8016_sbc_data {
|
||||
static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
||||
struct snd_soc_dai *codec_dai;
|
||||
struct snd_soc_component *component;
|
||||
struct snd_soc_dai_link *dai_link = rtd->dai_link;
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct apq8016_sbc_data *pdata = snd_soc_card_get_drvdata(card);
|
||||
int i, rval;
|
||||
@ -90,10 +90,9 @@ static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd)
|
||||
pdata->jack_setup = true;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < dai_link->num_codecs; i++) {
|
||||
struct snd_soc_dai *dai = rtd->codec_dais[i];
|
||||
for_each_rtd_codec_dai(rtd, i, codec_dai) {
|
||||
|
||||
component = dai->component;
|
||||
component = codec_dai->component;
|
||||
/* Set default mclk for internal codec */
|
||||
rval = snd_soc_component_set_sysclk(component, 0, 0, DEFAULT_MCLK_RATE,
|
||||
SND_SOC_CLOCK_IN);
|
||||
|
Loading…
Reference in New Issue
Block a user