Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182836
b: refs/heads/master
c: b91b8fa
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Jan 21, 2010
1 parent 9bfb9b7 commit c697f22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 78 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: 6aceabb459c07a3fb4873c8306de8143c56241b2
refs/heads/master: b91b8fa02482a5a18f598ee5d2cd42970051731b
80 changes: 3 additions & 77 deletions trunk/sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@
#include <sound/soc-dapm.h>
#include <sound/initval.h>

/* debug */
#ifdef DEBUG
#define dump_dapm(codec, action) dbg_dump_dapm(codec, action)
#else
#define dump_dapm(codec, action)
#endif

/* dapm power sequences - make this per codec in the future */
static int dapm_up_seq[] = {
[snd_soc_dapm_pre] = 0,
Expand Down Expand Up @@ -1063,66 +1056,6 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event)
return 0;
}

#ifdef DEBUG
static void dbg_dump_dapm(struct snd_soc_codec* codec, const char *action)
{
struct snd_soc_dapm_widget *w;
struct snd_soc_dapm_path *p = NULL;
int in, out;

printk("DAPM %s %s\n", codec->name, action);

list_for_each_entry(w, &codec->dapm_widgets, list) {

/* only display widgets that effect routing */
switch (w->id) {
case snd_soc_dapm_pre:
case snd_soc_dapm_post:
case snd_soc_dapm_vmid:
continue;
case snd_soc_dapm_mux:
case snd_soc_dapm_value_mux:
case snd_soc_dapm_output:
case snd_soc_dapm_input:
case snd_soc_dapm_switch:
case snd_soc_dapm_hp:
case snd_soc_dapm_mic:
case snd_soc_dapm_spk:
case snd_soc_dapm_line:
case snd_soc_dapm_micbias:
case snd_soc_dapm_dac:
case snd_soc_dapm_adc:
case snd_soc_dapm_pga:
case snd_soc_dapm_mixer:
case snd_soc_dapm_mixer_named_ctl:
case snd_soc_dapm_supply:
case snd_soc_dapm_aif_in:
case snd_soc_dapm_aif_out:
if (w->name) {
in = is_connected_input_ep(w);
dapm_clear_walk(w->codec);
out = is_connected_output_ep(w);
dapm_clear_walk(w->codec);
printk("%s: %s in %d out %d\n", w->name,
w->power ? "On":"Off",in, out);

list_for_each_entry(p, &w->sources, list_sink) {
if (p->connect)
printk(" in %s %s\n", p->name ? p->name : "static",
p->source->name);
}
list_for_each_entry(p, &w->sinks, list_source) {
if (p->connect)
printk(" out %s %s\n", p->name ? p->name : "static",
p->sink->name);
}
}
break;
}
}
}
#endif

#ifdef CONFIG_DEBUG_FS
static int dapm_widget_power_open_file(struct inode *inode, struct file *file)
{
Expand Down Expand Up @@ -1254,10 +1187,8 @@ static int dapm_mux_update_power(struct snd_soc_dapm_widget *widget,
path->connect = 0; /* old connection must be powered down */
}

if (found) {
if (found)
dapm_power_widgets(widget->codec, SND_SOC_DAPM_STREAM_NOP);
dump_dapm(widget->codec, "mux power update");
}

return 0;
}
Expand Down Expand Up @@ -1285,10 +1216,8 @@ static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
break;
}

if (found) {
if (found)
dapm_power_widgets(widget->codec, SND_SOC_DAPM_STREAM_NOP);
dump_dapm(widget->codec, "mixer power update");
}

return 0;
}
Expand Down Expand Up @@ -1404,9 +1333,7 @@ static int snd_soc_dapm_set_pin(struct snd_soc_codec *codec,
*/
int snd_soc_dapm_sync(struct snd_soc_codec *codec)
{
int ret = dapm_power_widgets(codec, SND_SOC_DAPM_STREAM_NOP);
dump_dapm(codec, "sync");
return ret;
return dapm_power_widgets(codec, SND_SOC_DAPM_STREAM_NOP);
}
EXPORT_SYMBOL_GPL(snd_soc_dapm_sync);

Expand Down Expand Up @@ -2163,7 +2090,6 @@ int snd_soc_dapm_stream_event(struct snd_soc_codec *codec,

dapm_power_widgets(codec, event);
mutex_unlock(&codec->mutex);
dump_dapm(codec, __func__);
return 0;
}
EXPORT_SYMBOL_GPL(snd_soc_dapm_stream_event);
Expand Down

0 comments on commit c697f22

Please sign in to comment.