{
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component);
- struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(rt1320->component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt1320->component);
int ret;
if (!rt1320->hw_init)
rt1320->cali_done = false;
snd_soc_dapm_mutex_lock(dapm);
- if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF &&
+ if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF &&
ucontrol->value.integer.value[0]) {
rt1320_calibrate(rt1320);
}
short crc;
};
- struct snd_soc_dapm_context *dapm =
- snd_soc_component_get_dapm(rt1320->component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt1320->component);
struct device *dev = &rt1320->sdw_slave->dev;
unsigned int val, i, fw_offset, fw_ready;
unsigned int fw_status_addr;
{
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component);
- struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(rt1320->component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt1320->component);
int ret;
if (!rt1320->hw_init)
return ret;
snd_soc_dapm_mutex_lock(dapm);
- if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) {
+ if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) {
rt1320->r0_l_reg = ucontrol->value.integer.value[0];
rt1320->r0_r_reg = ucontrol->value.integer.value[1];
rt1320_calc_r0(rt1320);
{
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
int ret;
if (!rt1320->hw_init)
if (ret < 0 && ret != -EACCES)
return ret;
- if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF &&
+ if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF &&
ucontrol->value.integer.value[0])
rt1320_dspfw_load_code(rt1320);
{
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
int ret;
if (!rt1320->hw_init)
if (ret < 0 && ret != -EACCES)
return ret;
- if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF &&
+ if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF &&
ucontrol->value.integer.value[0] && rt1320->fw_load_done)
rt1320_rae_load(rt1320);
{
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component);
- struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(rt1320->component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt1320->component);
int ret;
if (!rt1320->hw_init)
return ret;
snd_soc_dapm_mutex_lock(dapm);
- if ((snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) &&
+ if ((snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) &&
ucontrol->value.integer.value[0] && ucontrol->value.integer.value[1])
rt1320_t0_load(rt1320, ucontrol->value.integer.value[0], ucontrol->value.integer.value[1]);
snd_soc_dapm_mutex_unlock(dapm);