Commit c59331b3 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: hdmi-codec: use helper function

Current ASoC has many helper function.
This patch use it.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874js7foqb.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2e5f8617
......@@ -518,7 +518,7 @@ static int hdmi_codec_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
struct hdmi_codec_daifmt *cf = dai->playback_dma_data;
struct hdmi_codec_daifmt *cf = snd_soc_dai_dma_data_get_playback(dai);
struct hdmi_codec_params hp = {
.iec = {
.status = { 0 },
......@@ -562,7 +562,7 @@ static int hdmi_codec_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
struct hdmi_codec_daifmt *cf = dai->playback_dma_data;
struct hdmi_codec_daifmt *cf = snd_soc_dai_dma_data_get_playback(dai);
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned int channels = runtime->channels;
unsigned int width = snd_pcm_format_width(runtime->format);
......@@ -597,7 +597,7 @@ static int hdmi_codec_prepare(struct snd_pcm_substream *substream,
static int hdmi_codec_i2s_set_fmt(struct snd_soc_dai *dai,
unsigned int fmt)
{
struct hdmi_codec_daifmt *cf = dai->playback_dma_data;
struct hdmi_codec_daifmt *cf = snd_soc_dai_dma_data_get_playback(dai);
/* Reset daifmt */
memset(cf, 0, sizeof(*cf));
......@@ -834,7 +834,8 @@ static int hdmi_dai_probe(struct snd_soc_dai *dai)
if (!daifmt)
return -ENOMEM;
dai->playback_dma_data = daifmt;
snd_soc_dai_dma_data_set_playback(dai, daifmt);
return 0;
}
......@@ -891,7 +892,7 @@ static int hdmi_dai_spdif_probe(struct snd_soc_dai *dai)
if (ret)
return ret;
cf = dai->playback_dma_data;
cf = snd_soc_dai_dma_data_get_playback(dai);
cf->fmt = HDMI_SPDIF;
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment