Commit f2a76385 authored by Mark Brown's avatar Mark Brown

Merge branch 'topic/codec-dapm' of...

Merge branch 'topic/codec-dapm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5645

Conflicts:
	sound/soc/codecs/rt5645.c
parents 83c09290 4890140f
...@@ -792,7 +792,6 @@ struct snd_soc_component { ...@@ -792,7 +792,6 @@ struct snd_soc_component {
/* Don't use these, use snd_soc_component_get_dapm() */ /* Don't use these, use snd_soc_component_get_dapm() */
struct snd_soc_dapm_context dapm; struct snd_soc_dapm_context dapm;
struct snd_soc_dapm_context *dapm_ptr;
const struct snd_kcontrol_new *controls; const struct snd_kcontrol_new *controls;
unsigned int num_controls; unsigned int num_controls;
...@@ -832,9 +831,6 @@ struct snd_soc_codec { ...@@ -832,9 +831,6 @@ struct snd_soc_codec {
/* component */ /* component */
struct snd_soc_component 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 #ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_reg; struct dentry *debugfs_reg;
#endif #endif
...@@ -1277,7 +1273,7 @@ static inline struct snd_soc_component *snd_soc_dapm_to_component( ...@@ -1277,7 +1273,7 @@ static inline struct snd_soc_component *snd_soc_dapm_to_component(
static inline struct snd_soc_codec *snd_soc_dapm_to_codec( static inline struct snd_soc_codec *snd_soc_dapm_to_codec(
struct snd_soc_dapm_context *dapm) 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));
} }
/** /**
...@@ -1302,7 +1298,7 @@ static inline struct snd_soc_platform *snd_soc_dapm_to_platform( ...@@ -1302,7 +1298,7 @@ static inline struct snd_soc_platform *snd_soc_dapm_to_platform(
static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm( static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(
struct snd_soc_component *component) struct snd_soc_component *component)
{ {
return component->dapm_ptr; return &component->dapm;
} }
/** /**
...@@ -1314,7 +1310,7 @@ static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm( ...@@ -1314,7 +1310,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( static inline struct snd_soc_dapm_context *snd_soc_codec_get_dapm(
struct snd_soc_codec *codec) struct snd_soc_codec *codec)
{ {
return &codec->dapm; return snd_soc_component_get_dapm(&codec->component);
} }
/** /**
......
...@@ -2644,7 +2644,7 @@ static int rt5645_set_bias_level(struct snd_soc_codec *codec, ...@@ -2644,7 +2644,7 @@ static int rt5645_set_bias_level(struct snd_soc_codec *codec,
switch (level) { switch (level) {
case SND_SOC_BIAS_PREPARE: case SND_SOC_BIAS_PREPARE:
if (SND_SOC_BIAS_STANDBY == codec->dapm.bias_level) { if (SND_SOC_BIAS_STANDBY == snd_soc_codec_get_bias_level(codec)) {
snd_soc_update_bits(codec, RT5645_PWR_ANLG1, snd_soc_update_bits(codec, RT5645_PWR_ANLG1,
RT5645_PWR_VREF1 | RT5645_PWR_MB | RT5645_PWR_VREF1 | RT5645_PWR_MB |
RT5645_PWR_BG | RT5645_PWR_VREF2, RT5645_PWR_BG | RT5645_PWR_VREF2,
...@@ -2762,20 +2762,17 @@ static int rt5650_calibration(struct rt5645_priv *rt5645) ...@@ -2762,20 +2762,17 @@ static int rt5650_calibration(struct rt5645_priv *rt5645)
static void rt5645_enable_push_button_irq(struct snd_soc_codec *codec, static void rt5645_enable_push_button_irq(struct snd_soc_codec *codec,
bool enable) bool enable)
{ {
struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec); struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec);
if (enable) { if (enable) {
snd_soc_dapm_mutex_lock(&codec->dapm); snd_soc_dapm_mutex_lock(dapm);
snd_soc_dapm_force_enable_pin_unlocked(&codec->dapm, snd_soc_dapm_force_enable_pin_unlocked(dapm, "ADC L power");
"ADC L power"); snd_soc_dapm_force_enable_pin_unlocked(dapm, "ADC R power");
snd_soc_dapm_force_enable_pin_unlocked(&codec->dapm, snd_soc_dapm_force_enable_pin_unlocked(dapm, "LDO2");
"ADC R power"); snd_soc_dapm_force_enable_pin_unlocked(dapm, "Mic Det Power");
snd_soc_dapm_force_enable_pin_unlocked(&codec->dapm, snd_soc_dapm_sync_unlocked(dapm);
"LDO2"); snd_soc_dapm_mutex_unlock(dapm);
snd_soc_dapm_force_enable_pin_unlocked(&codec->dapm,
"Mic Det Power");
snd_soc_dapm_sync_unlocked(&codec->dapm);
snd_soc_dapm_mutex_unlock(&codec->dapm);
snd_soc_update_bits(codec, snd_soc_update_bits(codec,
RT5645_INT_IRQ_ST, 0x8, 0x8); RT5645_INT_IRQ_ST, 0x8, 0x8);
...@@ -2788,23 +2785,20 @@ static void rt5645_enable_push_button_irq(struct snd_soc_codec *codec, ...@@ -2788,23 +2785,20 @@ static void rt5645_enable_push_button_irq(struct snd_soc_codec *codec,
snd_soc_update_bits(codec, RT5650_4BTN_IL_CMD2, 0x8000, 0x0); snd_soc_update_bits(codec, RT5650_4BTN_IL_CMD2, 0x8000, 0x0);
snd_soc_update_bits(codec, RT5645_INT_IRQ_ST, 0x8, 0x0); snd_soc_update_bits(codec, RT5645_INT_IRQ_ST, 0x8, 0x0);
snd_soc_dapm_mutex_lock(&codec->dapm); snd_soc_dapm_mutex_lock(dapm);
snd_soc_dapm_disable_pin_unlocked(&codec->dapm, snd_soc_dapm_disable_pin_unlocked(dapm, "ADC L power");
"ADC L power"); snd_soc_dapm_disable_pin_unlocked(dapm, "ADC R power");
snd_soc_dapm_disable_pin_unlocked(&codec->dapm,
"ADC R power");
if (rt5645->pdata.jd_mode == 0) if (rt5645->pdata.jd_mode == 0)
snd_soc_dapm_disable_pin_unlocked(&codec->dapm, snd_soc_dapm_disable_pin_unlocked(dapm, "LDO2");
"LDO2"); snd_soc_dapm_disable_pin_unlocked(dapm, "Mic Det Power");
snd_soc_dapm_disable_pin_unlocked(&codec->dapm, snd_soc_dapm_sync_unlocked(dapm);
"Mic Det Power"); snd_soc_dapm_mutex_unlock(dapm);
snd_soc_dapm_sync_unlocked(&codec->dapm);
snd_soc_dapm_mutex_unlock(&codec->dapm);
} }
} }
static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert) static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert)
{ {
struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec); struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec);
unsigned int val; unsigned int val;
...@@ -2813,10 +2807,9 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert) ...@@ -2813,10 +2807,9 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert)
if (codec->component.card->instantiated) { if (codec->component.card->instantiated) {
/* for jack type detect */ /* for jack type detect */
snd_soc_dapm_force_enable_pin(&codec->dapm, "LDO2"); snd_soc_dapm_force_enable_pin(dapm, "LDO2");
snd_soc_dapm_force_enable_pin(&codec->dapm, snd_soc_dapm_force_enable_pin(dapm, "Mic Det Power");
"Mic Det Power"); snd_soc_dapm_sync(dapm);
snd_soc_dapm_sync(&codec->dapm);
} else { } else {
/* Power up necessary bits for JD if dapm is /* Power up necessary bits for JD if dapm is
not ready yet */ not ready yet */
...@@ -2849,9 +2842,8 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert) ...@@ -2849,9 +2842,8 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert)
} }
} else { } else {
if (codec->component.card->instantiated) { if (codec->component.card->instantiated) {
snd_soc_dapm_disable_pin(&codec->dapm, snd_soc_dapm_disable_pin(dapm, "Mic Det Power");
"Mic Det Power"); snd_soc_dapm_sync(dapm);
snd_soc_dapm_sync(&codec->dapm);
} else } else
regmap_update_bits(rt5645->regmap, regmap_update_bits(rt5645->regmap,
RT5645_PWR_VOL, RT5645_PWR_MIC_DET, 0); RT5645_PWR_VOL, RT5645_PWR_MIC_DET, 0);
...@@ -2865,11 +2857,9 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert) ...@@ -2865,11 +2857,9 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert)
else { else {
if (codec->component.card->instantiated) { if (codec->component.card->instantiated) {
if (rt5645->pdata.jd_mode == 0) if (rt5645->pdata.jd_mode == 0)
snd_soc_dapm_disable_pin(&codec->dapm, snd_soc_dapm_disable_pin(dapm, "LDO2");
"LDO2"); snd_soc_dapm_disable_pin(dapm, "Mic Det Power");
snd_soc_dapm_disable_pin(&codec->dapm, snd_soc_dapm_sync(dapm);
"Mic Det Power");
snd_soc_dapm_sync(&codec->dapm);
} else { } else {
if (rt5645->pdata.jd_mode == 0) if (rt5645->pdata.jd_mode == 0)
regmap_update_bits(rt5645->regmap, regmap_update_bits(rt5645->regmap,
...@@ -3045,24 +3035,25 @@ static int rt5645_irq_detection(struct rt5645_priv *rt5645) ...@@ -3045,24 +3035,25 @@ static int rt5645_irq_detection(struct rt5645_priv *rt5645)
static int rt5645_probe(struct snd_soc_codec *codec) static int rt5645_probe(struct snd_soc_codec *codec)
{ {
struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec); struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec);
rt5645->codec = codec; rt5645->codec = codec;
switch (rt5645->codec_type) { switch (rt5645->codec_type) {
case CODEC_TYPE_RT5645: case CODEC_TYPE_RT5645:
snd_soc_dapm_new_controls(&codec->dapm, snd_soc_dapm_new_controls(dapm,
rt5645_specific_dapm_widgets, rt5645_specific_dapm_widgets,
ARRAY_SIZE(rt5645_specific_dapm_widgets)); ARRAY_SIZE(rt5645_specific_dapm_widgets));
snd_soc_dapm_add_routes(&codec->dapm, snd_soc_dapm_add_routes(dapm,
rt5645_specific_dapm_routes, rt5645_specific_dapm_routes,
ARRAY_SIZE(rt5645_specific_dapm_routes)); ARRAY_SIZE(rt5645_specific_dapm_routes));
break; break;
case CODEC_TYPE_RT5650: case CODEC_TYPE_RT5650:
snd_soc_dapm_new_controls(&codec->dapm, snd_soc_dapm_new_controls(dapm,
rt5650_specific_dapm_widgets, rt5650_specific_dapm_widgets,
ARRAY_SIZE(rt5650_specific_dapm_widgets)); ARRAY_SIZE(rt5650_specific_dapm_widgets));
snd_soc_dapm_add_routes(&codec->dapm, snd_soc_dapm_add_routes(dapm,
rt5650_specific_dapm_routes, rt5650_specific_dapm_routes,
ARRAY_SIZE(rt5650_specific_dapm_routes)); ARRAY_SIZE(rt5650_specific_dapm_routes));
break; break;
...@@ -3072,9 +3063,9 @@ static int rt5645_probe(struct snd_soc_codec *codec) ...@@ -3072,9 +3063,9 @@ static int rt5645_probe(struct snd_soc_codec *codec)
/* for JD function */ /* for JD function */
if (rt5645->pdata.jd_mode) { if (rt5645->pdata.jd_mode) {
snd_soc_dapm_force_enable_pin(&codec->dapm, "JD Power"); snd_soc_dapm_force_enable_pin(dapm, "JD Power");
snd_soc_dapm_force_enable_pin(&codec->dapm, "LDO2"); snd_soc_dapm_force_enable_pin(dapm, "LDO2");
snd_soc_dapm_sync(&codec->dapm); snd_soc_dapm_sync(dapm);
} }
return 0; return 0;
......
...@@ -179,7 +179,7 @@ static int tas571x_set_bias_level(struct snd_soc_codec *codec, ...@@ -179,7 +179,7 @@ static int tas571x_set_bias_level(struct snd_soc_codec *codec,
case SND_SOC_BIAS_PREPARE: case SND_SOC_BIAS_PREPARE:
break; break;
case SND_SOC_BIAS_STANDBY: 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)) { if (!IS_ERR(priv->mclk)) {
ret = clk_prepare_enable(priv->mclk); ret = clk_prepare_enable(priv->mclk);
if (ret) { if (ret) {
......
...@@ -104,21 +104,17 @@ static int cht_aif1_hw_params(struct snd_pcm_substream *substream, ...@@ -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, static int cht_ti_jack_event(struct notifier_block *nb,
unsigned long event, void *data) unsigned long event, void *data)
{ {
struct snd_soc_jack *jack = (struct snd_soc_jack *)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_dapm_context *dapm = &jack->card->dapm;
struct snd_soc_codec *codec = codec_dai->codec;
if (event & SND_JACK_MICROPHONE) { if (event & SND_JACK_MICROPHONE) {
snd_soc_dapm_force_enable_pin(dapm, "SHDN");
snd_soc_dapm_force_enable_pin(&codec->dapm, "SHDN"); snd_soc_dapm_force_enable_pin(dapm, "MICBIAS");
snd_soc_dapm_force_enable_pin(&codec->dapm, "MICBIAS"); snd_soc_dapm_sync(dapm);
snd_soc_dapm_sync(&codec->dapm);
} else { } else {
snd_soc_dapm_disable_pin(dapm, "MICBIAS");
snd_soc_dapm_disable_pin(&codec->dapm, "MICBIAS"); snd_soc_dapm_disable_pin(dapm, "SHDN");
snd_soc_dapm_disable_pin(&codec->dapm, "SHDN"); snd_soc_dapm_sync(dapm);
snd_soc_dapm_sync(&codec->dapm);
} }
return 0; return 0;
......
...@@ -154,8 +154,7 @@ static const struct snd_soc_dapm_route omap3pandora_map[] = { ...@@ -154,8 +154,7 @@ static const struct snd_soc_dapm_route omap3pandora_map[] = {
static int omap3pandora_out_init(struct snd_soc_pcm_runtime *rtd) static int omap3pandora_out_init(struct snd_soc_pcm_runtime *rtd)
{ {
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_dapm_context *dapm = &rtd->card->dapm;
struct snd_soc_dapm_context *dapm = &codec->dapm;
/* All TWL4030 output pins are floating */ /* All TWL4030 output pins are floating */
snd_soc_dapm_nc_pin(dapm, "EARPIECE"); snd_soc_dapm_nc_pin(dapm, "EARPIECE");
...@@ -174,8 +173,7 @@ static int omap3pandora_out_init(struct snd_soc_pcm_runtime *rtd) ...@@ -174,8 +173,7 @@ static int omap3pandora_out_init(struct snd_soc_pcm_runtime *rtd)
static int omap3pandora_in_init(struct snd_soc_pcm_runtime *rtd) static int omap3pandora_in_init(struct snd_soc_pcm_runtime *rtd)
{ {
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_dapm_context *dapm = &rtd->card->dapm;
struct snd_soc_dapm_context *dapm = &codec->dapm;
/* Not comnnected */ /* Not comnnected */
snd_soc_dapm_nc_pin(dapm, "HSMIC"); snd_soc_dapm_nc_pin(dapm, "HSMIC");
......
...@@ -654,10 +654,12 @@ int snd_soc_suspend(struct device *dev) ...@@ -654,10 +654,12 @@ int snd_soc_suspend(struct device *dev)
/* suspend all CODECs */ /* suspend all CODECs */
list_for_each_entry(codec, &card->codec_dev_list, card_list) { list_for_each_entry(codec, &card->codec_dev_list, card_list) {
struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
/* If there are paths active then the CODEC will be held with /* If there are paths active then the CODEC will be held with
* bias _ON and should not be suspended. */ * bias _ON and should not be suspended. */
if (!codec->suspended) { if (!codec->suspended) {
switch (codec->dapm.bias_level) { switch (snd_soc_dapm_get_bias_level(dapm)) {
case SND_SOC_BIAS_STANDBY: case SND_SOC_BIAS_STANDBY:
/* /*
* If the CODEC is capable of idle * If the CODEC is capable of idle
...@@ -665,7 +667,7 @@ int snd_soc_suspend(struct device *dev) ...@@ -665,7 +667,7 @@ int snd_soc_suspend(struct device *dev)
* means it's doing something, * means it's doing something,
* otherwise fall through. * otherwise fall through.
*/ */
if (codec->dapm.idle_bias_off) { if (dapm->idle_bias_off) {
dev_dbg(codec->dev, dev_dbg(codec->dev,
"ASoC: idle_bias_off CODEC on over suspend\n"); "ASoC: idle_bias_off CODEC on over suspend\n");
break; break;
...@@ -2651,10 +2653,7 @@ static int snd_soc_component_initialize(struct snd_soc_component *component, ...@@ -2651,10 +2653,7 @@ static int snd_soc_component_initialize(struct snd_soc_component *component,
component->probe = component->driver->probe; component->probe = component->driver->probe;
component->remove = component->driver->remove; component->remove = component->driver->remove;
if (!component->dapm_ptr) dapm = &component->dapm;
component->dapm_ptr = &component->dapm;
dapm = component->dapm_ptr;
dapm->dev = dev; dapm->dev = dev;
dapm->component = component; dapm->component = component;
dapm->bias_level = SND_SOC_BIAS_OFF; dapm->bias_level = SND_SOC_BIAS_OFF;
...@@ -3036,6 +3035,7 @@ int snd_soc_register_codec(struct device *dev, ...@@ -3036,6 +3035,7 @@ int snd_soc_register_codec(struct device *dev,
struct snd_soc_dai_driver *dai_drv, struct snd_soc_dai_driver *dai_drv,
int num_dai) int num_dai)
{ {
struct snd_soc_dapm_context *dapm;
struct snd_soc_codec *codec; struct snd_soc_codec *codec;
struct snd_soc_dai *dai; struct snd_soc_dai *dai;
int ret, i; int ret, i;
...@@ -3046,7 +3046,6 @@ int snd_soc_register_codec(struct device *dev, ...@@ -3046,7 +3046,6 @@ int snd_soc_register_codec(struct device *dev,
if (codec == NULL) if (codec == NULL)
return -ENOMEM; return -ENOMEM;
codec->component.dapm_ptr = &codec->dapm;
codec->component.codec = codec; codec->component.codec = codec;
ret = snd_soc_component_initialize(&codec->component, ret = snd_soc_component_initialize(&codec->component,
...@@ -3076,12 +3075,14 @@ int snd_soc_register_codec(struct device *dev, ...@@ -3076,12 +3075,14 @@ int snd_soc_register_codec(struct device *dev,
if (codec_drv->read) if (codec_drv->read)
codec->component.read = snd_soc_codec_drv_read; codec->component.read = snd_soc_codec_drv_read;
codec->component.ignore_pmdown_time = codec_drv->ignore_pmdown_time; codec->component.ignore_pmdown_time = codec_drv->ignore_pmdown_time;
codec->dapm.idle_bias_off = codec_drv->idle_bias_off;
codec->dapm.suspend_bias_off = codec_drv->suspend_bias_off; dapm = snd_soc_codec_get_dapm(codec);
dapm->idle_bias_off = codec_drv->idle_bias_off;
dapm->suspend_bias_off = codec_drv->suspend_bias_off;
if (codec_drv->seq_notifier) if (codec_drv->seq_notifier)
codec->dapm.seq_notifier = codec_drv->seq_notifier; dapm->seq_notifier = codec_drv->seq_notifier;
if (codec_drv->set_bias_level) if (codec_drv->set_bias_level)
codec->dapm.set_bias_level = snd_soc_codec_set_bias_level; dapm->set_bias_level = snd_soc_codec_set_bias_level;
codec->dev = dev; codec->dev = dev;
codec->driver = codec_drv; codec->driver = codec_drv;
codec->component.val_bytes = codec_drv->reg_word_size; codec->component.val_bytes = codec_drv->reg_word_size;
......
...@@ -2220,14 +2220,16 @@ int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_context *dapm, ...@@ -2220,14 +2220,16 @@ int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_context *dapm,
} }
EXPORT_SYMBOL_GPL(snd_soc_dapm_mixer_update_power); EXPORT_SYMBOL_GPL(snd_soc_dapm_mixer_update_power);
static ssize_t dapm_widget_show_codec(struct snd_soc_codec *codec, char *buf) static ssize_t dapm_widget_show_component(struct snd_soc_component *cmpnt,
char *buf)
{ {
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(cmpnt);
struct snd_soc_dapm_widget *w; struct snd_soc_dapm_widget *w;
int count = 0; int count = 0;
char *state = "not set"; char *state = "not set";
list_for_each_entry(w, &codec->component.card->widgets, list) { list_for_each_entry(w, &cmpnt->card->widgets, list) {
if (w->dapm != &codec->dapm) if (w->dapm != dapm)
continue; continue;
/* only display widgets that burnm power */ /* only display widgets that burnm power */
...@@ -2255,7 +2257,7 @@ static ssize_t dapm_widget_show_codec(struct snd_soc_codec *codec, char *buf) ...@@ -2255,7 +2257,7 @@ static ssize_t dapm_widget_show_codec(struct snd_soc_codec *codec, char *buf)
} }
} }
switch (codec->dapm.bias_level) { switch (snd_soc_dapm_get_bias_level(dapm)) {
case SND_SOC_BIAS_ON: case SND_SOC_BIAS_ON:
state = "On"; state = "On";
break; break;
...@@ -2282,8 +2284,9 @@ static ssize_t dapm_widget_show(struct device *dev, ...@@ -2282,8 +2284,9 @@ static ssize_t dapm_widget_show(struct device *dev,
int i, count = 0; int i, count = 0;
for (i = 0; i < rtd->num_codecs; i++) { for (i = 0; i < rtd->num_codecs; i++) {
struct snd_soc_codec *codec = rtd->codec_dais[i]->codec; struct snd_soc_component *cmpnt = rtd->codec_dais[i]->component;
count += dapm_widget_show_codec(codec, buf + count);
count += dapm_widget_show_component(cmpnt, buf + count);
} }
return count; return count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment