summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/mt6358.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/mt6358.c')
-rw-r--r--sound/soc/codecs/mt6358.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/sound/soc/codecs/mt6358.c b/sound/soc/codecs/mt6358.c
index e033027fd4c7..a787accb88e8 100644
--- a/sound/soc/codecs/mt6358.c
+++ b/sound/soc/codecs/mt6358.c
@@ -320,8 +320,7 @@ static void headset_volume_ramp(struct mt6358_priv *priv, int from, int to)
static int mt6358_put_volsw(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *component =
- snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct mt6358_priv *priv = snd_soc_component_get_drvdata(component);
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
@@ -442,7 +441,7 @@ static int mt6358_disable_wov_phase2(struct mt6358_priv *priv)
static int mt6358_get_wov(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *c = snd_kcontrol_chip(kcontrol);
struct mt6358_priv *priv = snd_soc_component_get_drvdata(c);
ucontrol->value.integer.value[0] = priv->wov_enabled;
@@ -452,7 +451,7 @@ static int mt6358_get_wov(struct snd_kcontrol *kcontrol,
static int mt6358_put_wov(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *c = snd_kcontrol_chip(kcontrol);
struct mt6358_priv *priv = snd_soc_component_get_drvdata(c);
int enabled = ucontrol->value.integer.value[0];
@@ -476,7 +475,7 @@ static int mt6358_put_wov(struct snd_kcontrol *kcontrol,
static int mt6358_dmic_mode_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *c = snd_kcontrol_chip(kcontrol);
struct mt6358_priv *priv = snd_soc_component_get_drvdata(c);
ucontrol->value.integer.value[0] = priv->dmic_one_wire_mode;
@@ -488,7 +487,7 @@ static int mt6358_dmic_mode_get(struct snd_kcontrol *kcontrol,
static int mt6358_dmic_mode_set(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *c = snd_kcontrol_chip(kcontrol);
struct mt6358_priv *priv = snd_soc_component_get_drvdata(c);
int enabled = ucontrol->value.integer.value[0];
@@ -1288,7 +1287,7 @@ static int mt_hp_event(struct snd_soc_dapm_widget *w,
{
struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
struct mt6358_priv *priv = snd_soc_component_get_drvdata(cmpnt);
- unsigned int mux = dapm_kcontrol_get_value(w->kcontrols[0]);
+ unsigned int mux = snd_soc_dapm_kcontrol_get_value(w->kcontrols[0]);
int device = DEVICE_HP;
dev_info(priv->dev, "%s(), event 0x%x, dev_counter[DEV_HP] %d, mux %u\n",
@@ -1350,7 +1349,7 @@ static int mt_rcv_event(struct snd_soc_dapm_widget *w,
dev_info(priv->dev, "%s(), event 0x%x, mux %u\n",
__func__,
event,
- dapm_kcontrol_get_value(w->kcontrols[0]));
+ snd_soc_dapm_kcontrol_get_value(w->kcontrols[0]));
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
@@ -1829,7 +1828,7 @@ static int mt_mic_type_event(struct snd_soc_dapm_widget *w,
{
struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
struct mt6358_priv *priv = snd_soc_component_get_drvdata(cmpnt);
- unsigned int mux = dapm_kcontrol_get_value(w->kcontrols[0]);
+ unsigned int mux = snd_soc_dapm_kcontrol_get_value(w->kcontrols[0]);
dev_dbg(priv->dev, "%s(), event 0x%x, mux %u\n",
__func__, event, mux);
@@ -1875,7 +1874,7 @@ static int mt_adc_l_event(struct snd_soc_dapm_widget *w,
{
struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
struct mt6358_priv *priv = snd_soc_component_get_drvdata(cmpnt);
- unsigned int mux = dapm_kcontrol_get_value(w->kcontrols[0]);
+ unsigned int mux = snd_soc_dapm_kcontrol_get_value(w->kcontrols[0]);
dev_dbg(priv->dev, "%s(), event = 0x%x, mux %u\n",
__func__, event, mux);
@@ -1891,7 +1890,7 @@ static int mt_adc_r_event(struct snd_soc_dapm_widget *w,
{
struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
struct mt6358_priv *priv = snd_soc_component_get_drvdata(cmpnt);
- unsigned int mux = dapm_kcontrol_get_value(w->kcontrols[0]);
+ unsigned int mux = snd_soc_dapm_kcontrol_get_value(w->kcontrols[0]);
dev_dbg(priv->dev, "%s(), event = 0x%x, mux %u\n",
__func__, event, mux);
@@ -1907,7 +1906,7 @@ static int mt_pga_left_event(struct snd_soc_dapm_widget *w,
{
struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
struct mt6358_priv *priv = snd_soc_component_get_drvdata(cmpnt);
- unsigned int mux = dapm_kcontrol_get_value(w->kcontrols[0]);
+ unsigned int mux = snd_soc_dapm_kcontrol_get_value(w->kcontrols[0]);
dev_dbg(priv->dev, "%s(), event = 0x%x, mux %u\n",
__func__, event, mux);
@@ -1923,7 +1922,7 @@ static int mt_pga_right_event(struct snd_soc_dapm_widget *w,
{
struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
struct mt6358_priv *priv = snd_soc_component_get_drvdata(cmpnt);
- unsigned int mux = dapm_kcontrol_get_value(w->kcontrols[0]);
+ unsigned int mux = snd_soc_dapm_kcontrol_get_value(w->kcontrols[0]);
dev_dbg(priv->dev, "%s(), event = 0x%x, mux %u\n",
__func__, event, mux);