static int rt5670_headset_detect(struct snd_soc_component *component, int jack_insert)
{
int val;
- 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 rt5670_priv *rt5670 = snd_soc_component_get_drvdata(component);
if (jack_insert) {
struct snd_ctl_elem_value *ucontrol)
{
struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value;
- struct snd_soc_component *component = snd_soc_dapm_kcontrol_component(kcontrol);
+ struct snd_soc_component *component = snd_soc_dapm_kcontrol_to_component(kcontrol);
struct rt5670_priv *rt5670 = snd_soc_component_get_drvdata(component);
int ret;
enum snd_soc_bias_level level)
{
struct rt5670_priv *rt5670 = snd_soc_component_get_drvdata(component);
+ 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_update_bits(component, RT5670_PWR_ANLG1,
RT5670_PWR_VREF1 | RT5670_PWR_MB |
RT5670_PWR_BG | RT5670_PWR_VREF2,
static int rt5670_probe(struct snd_soc_component *component)
{
- 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 rt5670_priv *rt5670 = snd_soc_component_get_drvdata(component);
switch (snd_soc_component_read(component, RT5670_RESET) & RT5670_ID_MASK) {