ASoC: rockchip: i2s: Use component kcontrol API

Fixes: a2d0c7f12f ("ASoC: rockchip: i2s: Use add_component_controls")

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I8343bf048cd3378e878286661a7c55c1255a532e
This commit is contained in:
Sugar Zhang
2023-10-15 11:26:26 +08:00
committed by Tao Huang
parent 4a68fd57a9
commit 3db7151741

View File

@@ -572,8 +572,8 @@ static int rockchip_i2s_clk_compensation_info(struct snd_kcontrol *kcontrol,
static int rockchip_i2s_clk_compensation_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_dai *dai = snd_kcontrol_chip(kcontrol);
struct rk_i2s_dev *i2s = snd_soc_dai_get_drvdata(dai);
struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol);
struct rk_i2s_dev *i2s = snd_soc_component_get_drvdata(compnt);
ucontrol->value.integer.value[0] = i2s->clk_ppm;
@@ -583,8 +583,8 @@ static int rockchip_i2s_clk_compensation_get(struct snd_kcontrol *kcontrol,
static int rockchip_i2s_clk_compensation_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_dai *dai = snd_kcontrol_chip(kcontrol);
struct rk_i2s_dev *i2s = snd_soc_dai_get_drvdata(dai);
struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol);
struct rk_i2s_dev *i2s = snd_soc_component_get_drvdata(compnt);
int ppm = ucontrol->value.integer.value[0];
if ((ucontrol->value.integer.value[0] < CLK_PPM_MIN) ||