mirror of https://github.com/torvalds/linux.git
ASoC: codecs: rt298: convert to snd_soc_dapm_xxx()
This patch converts below functions. dapm->dev -> snd_soc_dapm_to_dev() dapm->card -> snd_soc_dapm_to_card() dapm->component -> snd_soc_dapm_to_component() dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value() snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin() snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked() snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin() snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked() snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin() snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked() snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status() snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin() snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked() snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level() snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level() snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level() snd_soc_component_get_dapm() -> snd_soc_component_to_dapm() snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component() snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget() snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm() snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/877bvx4drp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c2b942fbf9
commit
11c256c49d
|
|
@ -227,7 +227,7 @@ static int rt298_jack_detect(struct rt298_priv *rt298, bool *hp, bool *mic)
|
||||||
if (!rt298->component)
|
if (!rt298->component)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
dapm = snd_soc_component_get_dapm(rt298->component);
|
dapm = snd_soc_component_to_dapm(rt298->component);
|
||||||
|
|
||||||
if (rt298->pdata.cbj_en) {
|
if (rt298->pdata.cbj_en) {
|
||||||
regmap_read(rt298->regmap, RT298_GET_HP_SENSE, &buf);
|
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,
|
static int rt298_mic_detect(struct snd_soc_component *component,
|
||||||
struct snd_soc_jack *jack, void *data)
|
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);
|
struct rt298_priv *rt298 = snd_soc_component_get_drvdata(component);
|
||||||
|
|
||||||
rt298->jack = jack;
|
rt298->jack = jack;
|
||||||
|
|
@ -949,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,
|
static int rt298_set_bias_level(struct snd_soc_component *component,
|
||||||
enum snd_soc_bias_level level)
|
enum snd_soc_bias_level level)
|
||||||
{
|
{
|
||||||
|
struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
|
||||||
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case SND_SOC_BIAS_PREPARE:
|
case SND_SOC_BIAS_PREPARE:
|
||||||
if (SND_SOC_BIAS_STANDBY ==
|
if (SND_SOC_BIAS_STANDBY == snd_soc_dapm_get_bias_level(dapm)) {
|
||||||
snd_soc_component_get_bias_level(component)) {
|
|
||||||
snd_soc_component_write(component,
|
snd_soc_component_write(component,
|
||||||
RT298_SET_AUDIO_POWER, AC_PWRST_D0);
|
RT298_SET_AUDIO_POWER, AC_PWRST_D0);
|
||||||
snd_soc_component_update_bits(component, 0x0d, 0x200, 0x200);
|
snd_soc_component_update_bits(component, 0x0d, 0x200, 0x200);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue