Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293301
b: refs/heads/master
c: 40f02cd
h: refs/heads/master
i:
  293299: 86b99ee
v: v3
  • Loading branch information
Liam Girdwood authored and Mark Brown committed Feb 6, 2012
1 parent d05a91c commit 0712a55
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 839e5fadc68f5095e4fc76e8e618cc41affdf3d5
refs/heads/master: 40f02cd9f21dc2bd2c65713eb986139bb1ea0363
6 changes: 6 additions & 0 deletions trunk/include/sound/soc-dapm.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,12 @@ int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd,
const char *stream, int event);
void snd_soc_dapm_shutdown(struct snd_soc_card *card);

/* external DAPM widget events */
int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
struct snd_kcontrol *kcontrol, int connect);
int snd_soc_dapm_mux_update_power(struct snd_soc_dapm_widget *widget,
struct snd_kcontrol *kcontrol, int mux, struct soc_enum *e);

/* dapm sys fs - used by the core */
int snd_soc_dapm_sys_add(struct device *dev);
void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm,
Expand Down
21 changes: 9 additions & 12 deletions trunk/sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1699,9 +1699,8 @@ static inline void dapm_debugfs_cleanup(struct snd_soc_dapm_context *dapm)
#endif

/* test and update the power status of a mux widget */
static int dapm_mux_update_power(struct snd_soc_dapm_widget *widget,
struct snd_kcontrol *kcontrol, int change,
int mux, struct soc_enum *e)
int snd_soc_dapm_mux_update_power(struct snd_soc_dapm_widget *widget,
struct snd_kcontrol *kcontrol, int mux, struct soc_enum *e)
{
struct snd_soc_dapm_path *path;
int found = 0;
Expand All @@ -1711,9 +1710,6 @@ static int dapm_mux_update_power(struct snd_soc_dapm_widget *widget,
widget->id != snd_soc_dapm_value_mux)
return -ENODEV;

if (!change)
return 0;

/* find dapm widget path assoc with kcontrol */
list_for_each_entry(path, &widget->dapm->card->paths, list) {
if (path->kcontrol != kcontrol)
Expand Down Expand Up @@ -1742,9 +1738,10 @@ static int dapm_mux_update_power(struct snd_soc_dapm_widget *widget,

return 0;
}
EXPORT_SYMBOL_GPL(snd_soc_dapm_mux_update_power);

/* test and update the power status of a mixer or switch widget */
static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
struct snd_kcontrol *kcontrol, int connect)
{
struct snd_soc_dapm_path *path;
Expand Down Expand Up @@ -1773,6 +1770,7 @@ static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,

return 0;
}
EXPORT_SYMBOL_GPL(snd_soc_dapm_mixer_update_power);

/* show dapm widget status in sys fs */
static ssize_t dapm_widget_show(struct device *dev,
Expand Down Expand Up @@ -2357,7 +2355,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
update.val = val;
widget->dapm->update = &update;

dapm_mixer_update_power(widget, kcontrol, connect);
snd_soc_dapm_mixer_update_power(widget, kcontrol, connect);

widget->dapm->update = NULL;
}
Expand Down Expand Up @@ -2448,7 +2446,7 @@ int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
update.val = val;
widget->dapm->update = &update;

dapm_mux_update_power(widget, kcontrol, change, mux, e);
snd_soc_dapm_mux_update_power(widget, kcontrol, mux, e);

widget->dapm->update = NULL;
}
Expand Down Expand Up @@ -2509,8 +2507,7 @@ int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol,

widget->value = ucontrol->value.enumerated.item[0];

dapm_mux_update_power(widget, kcontrol, change,
widget->value, e);
snd_soc_dapm_mux_update_power(widget, kcontrol, widget->value, e);
}
}

Expand Down Expand Up @@ -2613,7 +2610,7 @@ int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol,
update.val = val;
widget->dapm->update = &update;

dapm_mux_update_power(widget, kcontrol, change, mux, e);
snd_soc_dapm_mux_update_power(widget, kcontrol, mux, e);

widget->dapm->update = NULL;
}
Expand Down

0 comments on commit 0712a55

Please sign in to comment.