Loading include/sound/soc.h +3 −7 Original line number Diff line number Diff line Loading @@ -791,7 +791,6 @@ struct snd_soc_component { /* Don't use these, use snd_soc_component_get_dapm() */ struct snd_soc_dapm_context dapm; struct snd_soc_dapm_context *dapm_ptr; const struct snd_kcontrol_new *controls; unsigned int num_controls; Loading Loading @@ -831,9 +830,6 @@ struct snd_soc_codec { /* component */ struct snd_soc_component component; /* Don't access this directly, use snd_soc_codec_get_dapm() */ struct snd_soc_dapm_context dapm; #ifdef CONFIG_DEBUG_FS struct dentry *debugfs_reg; #endif Loading Loading @@ -1276,7 +1272,7 @@ static inline struct snd_soc_component *snd_soc_dapm_to_component( static inline struct snd_soc_codec *snd_soc_dapm_to_codec( struct snd_soc_dapm_context *dapm) { return container_of(dapm, struct snd_soc_codec, dapm); return snd_soc_component_to_codec(snd_soc_dapm_to_component(dapm)); } /** Loading @@ -1301,7 +1297,7 @@ static inline struct snd_soc_platform *snd_soc_dapm_to_platform( static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm( struct snd_soc_component *component) { return component->dapm_ptr; return &component->dapm; } /** Loading @@ -1313,7 +1309,7 @@ static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm( static inline struct snd_soc_dapm_context *snd_soc_codec_get_dapm( struct snd_soc_codec *codec) { return &codec->dapm; return snd_soc_component_get_dapm(&codec->component); } /** Loading sound/soc/codecs/rt5645.c +209 −206 File changed.Preview size limit exceeded, changes collapsed. Show changes sound/soc/codecs/rt5645.h +1 −26 Original line number Diff line number Diff line Loading @@ -2115,6 +2115,7 @@ enum { #define RT5645_JD_PSV_MODE (0x1 << 12) #define RT5645_IRQ_CLK_GATE_CTRL (0x1 << 11) #define RT5645_MICINDET_MANU (0x1 << 7) #define RT5645_RING2_SLEEVE_GND (0x1 << 5) /* Vendor ID (0xfd) */ #define RT5645_VER_C 0x2 Loading Loading @@ -2181,32 +2182,6 @@ enum { int rt5645_sel_asrc_clk_src(struct snd_soc_codec *codec, unsigned int filter_mask, unsigned int clk_src); struct rt5645_priv { struct snd_soc_codec *codec; struct rt5645_platform_data pdata; struct regmap *regmap; struct i2c_client *i2c; struct gpio_desc *gpiod_hp_det; struct snd_soc_jack *hp_jack; struct snd_soc_jack *mic_jack; struct snd_soc_jack *btn_jack; struct delayed_work jack_detect_work; int codec_type; int sysclk; int sysclk_src; int lrck[RT5645_AIFS]; int bclk[RT5645_AIFS]; int master[RT5645_AIFS]; int pll_src; int pll_in; int pll_out; int jack_type; bool en_button_func; }; int rt5645_set_jack_detect(struct snd_soc_codec *codec, struct snd_soc_jack *hp_jack, struct snd_soc_jack *mic_jack, struct snd_soc_jack *btn_jack); Loading sound/soc/codecs/tas571x.c +1 −1 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ static int tas571x_set_bias_level(struct snd_soc_codec *codec, case SND_SOC_BIAS_PREPARE: break; case SND_SOC_BIAS_STANDBY: if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) { if (!IS_ERR(priv->mclk)) { ret = clk_prepare_enable(priv->mclk); if (ret) { Loading sound/soc/intel/boards/cht_bsw_max98090_ti.c +7 −11 Original line number Diff line number Diff line Loading @@ -104,21 +104,17 @@ static int cht_aif1_hw_params(struct snd_pcm_substream *substream, static int cht_ti_jack_event(struct notifier_block *nb, unsigned long event, void *data) { struct snd_soc_jack *jack = (struct snd_soc_jack *)data; struct snd_soc_dai *codec_dai = jack->card->rtd->codec_dai; struct snd_soc_codec *codec = codec_dai->codec; struct snd_soc_dapm_context *dapm = &jack->card->dapm; if (event & SND_JACK_MICROPHONE) { snd_soc_dapm_force_enable_pin(&codec->dapm, "SHDN"); snd_soc_dapm_force_enable_pin(&codec->dapm, "MICBIAS"); snd_soc_dapm_sync(&codec->dapm); snd_soc_dapm_force_enable_pin(dapm, "SHDN"); snd_soc_dapm_force_enable_pin(dapm, "MICBIAS"); snd_soc_dapm_sync(dapm); } else { snd_soc_dapm_disable_pin(&codec->dapm, "MICBIAS"); snd_soc_dapm_disable_pin(&codec->dapm, "SHDN"); snd_soc_dapm_sync(&codec->dapm); snd_soc_dapm_disable_pin(dapm, "MICBIAS"); snd_soc_dapm_disable_pin(dapm, "SHDN"); snd_soc_dapm_sync(dapm); } return 0; Loading Loading
include/sound/soc.h +3 −7 Original line number Diff line number Diff line Loading @@ -791,7 +791,6 @@ struct snd_soc_component { /* Don't use these, use snd_soc_component_get_dapm() */ struct snd_soc_dapm_context dapm; struct snd_soc_dapm_context *dapm_ptr; const struct snd_kcontrol_new *controls; unsigned int num_controls; Loading Loading @@ -831,9 +830,6 @@ struct snd_soc_codec { /* component */ struct snd_soc_component component; /* Don't access this directly, use snd_soc_codec_get_dapm() */ struct snd_soc_dapm_context dapm; #ifdef CONFIG_DEBUG_FS struct dentry *debugfs_reg; #endif Loading Loading @@ -1276,7 +1272,7 @@ static inline struct snd_soc_component *snd_soc_dapm_to_component( static inline struct snd_soc_codec *snd_soc_dapm_to_codec( struct snd_soc_dapm_context *dapm) { return container_of(dapm, struct snd_soc_codec, dapm); return snd_soc_component_to_codec(snd_soc_dapm_to_component(dapm)); } /** Loading @@ -1301,7 +1297,7 @@ static inline struct snd_soc_platform *snd_soc_dapm_to_platform( static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm( struct snd_soc_component *component) { return component->dapm_ptr; return &component->dapm; } /** Loading @@ -1313,7 +1309,7 @@ static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm( static inline struct snd_soc_dapm_context *snd_soc_codec_get_dapm( struct snd_soc_codec *codec) { return &codec->dapm; return snd_soc_component_get_dapm(&codec->component); } /** Loading
sound/soc/codecs/rt5645.c +209 −206 File changed.Preview size limit exceeded, changes collapsed. Show changes
sound/soc/codecs/rt5645.h +1 −26 Original line number Diff line number Diff line Loading @@ -2115,6 +2115,7 @@ enum { #define RT5645_JD_PSV_MODE (0x1 << 12) #define RT5645_IRQ_CLK_GATE_CTRL (0x1 << 11) #define RT5645_MICINDET_MANU (0x1 << 7) #define RT5645_RING2_SLEEVE_GND (0x1 << 5) /* Vendor ID (0xfd) */ #define RT5645_VER_C 0x2 Loading Loading @@ -2181,32 +2182,6 @@ enum { int rt5645_sel_asrc_clk_src(struct snd_soc_codec *codec, unsigned int filter_mask, unsigned int clk_src); struct rt5645_priv { struct snd_soc_codec *codec; struct rt5645_platform_data pdata; struct regmap *regmap; struct i2c_client *i2c; struct gpio_desc *gpiod_hp_det; struct snd_soc_jack *hp_jack; struct snd_soc_jack *mic_jack; struct snd_soc_jack *btn_jack; struct delayed_work jack_detect_work; int codec_type; int sysclk; int sysclk_src; int lrck[RT5645_AIFS]; int bclk[RT5645_AIFS]; int master[RT5645_AIFS]; int pll_src; int pll_in; int pll_out; int jack_type; bool en_button_func; }; int rt5645_set_jack_detect(struct snd_soc_codec *codec, struct snd_soc_jack *hp_jack, struct snd_soc_jack *mic_jack, struct snd_soc_jack *btn_jack); Loading
sound/soc/codecs/tas571x.c +1 −1 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ static int tas571x_set_bias_level(struct snd_soc_codec *codec, case SND_SOC_BIAS_PREPARE: break; case SND_SOC_BIAS_STANDBY: if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) { if (!IS_ERR(priv->mclk)) { ret = clk_prepare_enable(priv->mclk); if (ret) { Loading
sound/soc/intel/boards/cht_bsw_max98090_ti.c +7 −11 Original line number Diff line number Diff line Loading @@ -104,21 +104,17 @@ static int cht_aif1_hw_params(struct snd_pcm_substream *substream, static int cht_ti_jack_event(struct notifier_block *nb, unsigned long event, void *data) { struct snd_soc_jack *jack = (struct snd_soc_jack *)data; struct snd_soc_dai *codec_dai = jack->card->rtd->codec_dai; struct snd_soc_codec *codec = codec_dai->codec; struct snd_soc_dapm_context *dapm = &jack->card->dapm; if (event & SND_JACK_MICROPHONE) { snd_soc_dapm_force_enable_pin(&codec->dapm, "SHDN"); snd_soc_dapm_force_enable_pin(&codec->dapm, "MICBIAS"); snd_soc_dapm_sync(&codec->dapm); snd_soc_dapm_force_enable_pin(dapm, "SHDN"); snd_soc_dapm_force_enable_pin(dapm, "MICBIAS"); snd_soc_dapm_sync(dapm); } else { snd_soc_dapm_disable_pin(&codec->dapm, "MICBIAS"); snd_soc_dapm_disable_pin(&codec->dapm, "SHDN"); snd_soc_dapm_sync(&codec->dapm); snd_soc_dapm_disable_pin(dapm, "MICBIAS"); snd_soc_dapm_disable_pin(dapm, "SHDN"); snd_soc_dapm_sync(dapm); } return 0; Loading