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);
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;
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);