diff options
Diffstat (limited to 'sound/soc/codecs/rt298.c')
| -rw-r--r-- | sound/soc/codecs/rt298.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c index 8fbd25ad9b47..02247593513a 100644 --- a/sound/soc/codecs/rt298.c +++ b/sound/soc/codecs/rt298.c @@ -227,7 +227,7 @@ static int rt298_jack_detect(struct rt298_priv *rt298, bool *hp, bool *mic) if (!rt298->component) return -EINVAL; - dapm = snd_soc_component_get_dapm(rt298->component); + dapm = snd_soc_component_to_dapm(rt298->component); if (rt298->pdata.cbj_en) { regmap_read(rt298->regmap, RT298_GET_HP_SENSE, &buf); @@ -329,7 +329,7 @@ static void rt298_jack_detect_work(struct work_struct *work) static int rt298_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack, void *data) { - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); struct rt298_priv *rt298 = snd_soc_component_get_drvdata(component); rt298->jack = jack; @@ -789,7 +789,6 @@ static int rt298_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } - d_len_code = 0; switch (params_width(params)) { /* bit 6:4 Bits per Sample */ case 16: @@ -830,11 +829,11 @@ static int rt298_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) struct snd_soc_component *component = dai->component; switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBM_CFM: + case SND_SOC_DAIFMT_CBP_CFP: snd_soc_component_update_bits(component, RT298_I2S_CTRL1, 0x800, 0x800); break; - case SND_SOC_DAIFMT_CBS_CFS: + case SND_SOC_DAIFMT_CBC_CFC: snd_soc_component_update_bits(component, RT298_I2S_CTRL1, 0x800, 0x0); break; @@ -950,10 +949,11 @@ static int rt298_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio) static int rt298_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); + switch (level) { case SND_SOC_BIAS_PREPARE: - if (SND_SOC_BIAS_STANDBY == - snd_soc_component_get_bias_level(component)) { + if (SND_SOC_BIAS_STANDBY == snd_soc_dapm_get_bias_level(dapm)) { snd_soc_component_write(component, RT298_SET_AUDIO_POWER, AC_PWRST_D0); snd_soc_component_update_bits(component, 0x0d, 0x200, 0x200); @@ -1138,15 +1138,16 @@ static const struct regmap_config rt298_regmap = { }; static const struct i2c_device_id rt298_i2c_id[] = { - {"rt298", 0}, + {"rt298"}, {} }; MODULE_DEVICE_TABLE(i2c, rt298_i2c_id); #ifdef CONFIG_ACPI static const struct acpi_device_id rt298_acpi_match[] = { - { "INT343A", 0 }, - {}, + { "10EC0298" }, + { "INT343A" }, + { } }; MODULE_DEVICE_TABLE(acpi, rt298_acpi_match); #endif @@ -1285,7 +1286,7 @@ static int rt298_i2c_probe(struct i2c_client *i2c) IRQF_TRIGGER_HIGH | IRQF_ONESHOT, "rt298", rt298); if (ret != 0) { dev_err(&i2c->dev, - "Failed to reguest IRQ: %d\n", ret); + "Failed to request IRQ: %d\n", ret); return ret; } } |
