ASoC: intel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87r1xjir7a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
此提交包含在:
@@ -66,7 +66,7 @@ static const struct dmi_system_id sof_pcm512x_quirk_table[] = {
|
||||
static int sof_hdmi_init(struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct snd_soc_dai *dai = rtd->codec_dai;
|
||||
struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct sof_hdmi_pcm *pcm;
|
||||
|
||||
pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
|
||||
@@ -84,7 +84,7 @@ static int sof_hdmi_init(struct snd_soc_pcm_runtime *rtd)
|
||||
|
||||
static int sof_pcm512x_codec_init(struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
struct snd_soc_component *codec = rtd->codec_dai->component;
|
||||
struct snd_soc_component *codec = asoc_rtd_to_codec(rtd, 0)->component;
|
||||
|
||||
snd_soc_component_update_bits(codec, PCM512x_GPIO_EN, 0x08, 0x08);
|
||||
snd_soc_component_update_bits(codec, PCM512x_GPIO_OUTPUT_4, 0x0f, 0x02);
|
||||
@@ -97,7 +97,7 @@ static int sof_pcm512x_codec_init(struct snd_soc_pcm_runtime *rtd)
|
||||
static int aif1_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_component *codec = rtd->codec_dai->component;
|
||||
struct snd_soc_component *codec = asoc_rtd_to_codec(rtd, 0)->component;
|
||||
|
||||
snd_soc_component_update_bits(codec, PCM512x_GPIO_CONTROL_1,
|
||||
0x08, 0x08);
|
||||
@@ -108,7 +108,7 @@ static int aif1_startup(struct snd_pcm_substream *substream)
|
||||
static void aif1_shutdown(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_component *codec = rtd->codec_dai->component;
|
||||
struct snd_soc_component *codec = asoc_rtd_to_codec(rtd, 0)->component;
|
||||
|
||||
snd_soc_component_update_bits(codec, PCM512x_GPIO_CONTROL_1,
|
||||
0x08, 0x00);
|
||||
|
新增問題並參考
封鎖使用者