diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-07-07 14:26:03 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-07-10 03:32:47 -0400 |
commit | c1286b8671135006eeb66b0267fa2895561b78e4 (patch) | |
tree | d8f7b533d4d5186789c96a202fb73fb58a7da827 /sound | |
parent | 53640650ffe07f6201ecae0b0dca078b97327247 (diff) |
ALSA: ASoC: Switch DAPM to use of standard DEBUG macro
DAPM contains debug output controlled by a DAPM_DEBUG macro. Change this
to be controlled by the standard DEBUG, dropping the custom dbg() macro
as we go.
Also fix the error printed when configuring an unknown pin to be an
unconditionally displayed error rather than debug output.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-dapm.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 94296b5dc58f..d18ebc627861 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -45,13 +45,10 @@ | |||
45 | #include <sound/initval.h> | 45 | #include <sound/initval.h> |
46 | 46 | ||
47 | /* debug */ | 47 | /* debug */ |
48 | #define DAPM_DEBUG 0 | 48 | #ifdef DEBUG |
49 | #if DAPM_DEBUG | ||
50 | #define dump_dapm(codec, action) dbg_dump_dapm(codec, action) | 49 | #define dump_dapm(codec, action) dbg_dump_dapm(codec, action) |
51 | #define dbg(format, arg...) printk(format, ## arg) | ||
52 | #else | 50 | #else |
53 | #define dump_dapm(codec, action) | 51 | #define dump_dapm(codec, action) |
54 | #define dbg(format, arg...) | ||
55 | #endif | 52 | #endif |
56 | 53 | ||
57 | /* dapm power sequences - make this per codec in the future */ | 54 | /* dapm power sequences - make this per codec in the future */ |
@@ -233,7 +230,8 @@ static int dapm_update_bits(struct snd_soc_dapm_widget *widget) | |||
233 | snd_soc_write(codec, widget->reg, new); | 230 | snd_soc_write(codec, widget->reg, new); |
234 | pop_wait(); | 231 | pop_wait(); |
235 | } | 232 | } |
236 | dbg("reg %x old %x new %x change %d\n", widget->reg, old, new, change); | 233 | pr_debug("reg %x old %x new %x change %d\n", widget->reg, |
234 | old, new, change); | ||
237 | return change; | 235 | return change; |
238 | } | 236 | } |
239 | 237 | ||
@@ -591,8 +589,8 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event) | |||
591 | /* call any power change event handlers */ | 589 | /* call any power change event handlers */ |
592 | if (power_change) { | 590 | if (power_change) { |
593 | if (w->event) { | 591 | if (w->event) { |
594 | dbg("power %s event for %s flags %x\n", | 592 | pr_debug("power %s event for %s flags %x\n", |
595 | w->power ? "on" : "off", w->name, w->event_flags); | 593 | w->power ? "on" : "off", w->name, w->event_flags); |
596 | if (power) { | 594 | if (power) { |
597 | /* power up event */ | 595 | /* power up event */ |
598 | if (w->event_flags & SND_SOC_DAPM_PRE_PMU) { | 596 | if (w->event_flags & SND_SOC_DAPM_PRE_PMU) { |
@@ -634,7 +632,7 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event) | |||
634 | return ret; | 632 | return ret; |
635 | } | 633 | } |
636 | 634 | ||
637 | #if DAPM_DEBUG | 635 | #ifdef DEBUG |
638 | static void dbg_dump_dapm(struct snd_soc_codec* codec, const char *action) | 636 | static void dbg_dump_dapm(struct snd_soc_codec* codec, const char *action) |
639 | { | 637 | { |
640 | struct snd_soc_dapm_widget *w; | 638 | struct snd_soc_dapm_widget *w; |
@@ -887,13 +885,13 @@ static int snd_soc_dapm_set_pin(struct snd_soc_codec *codec, | |||
887 | 885 | ||
888 | list_for_each_entry(w, &codec->dapm_widgets, list) { | 886 | list_for_each_entry(w, &codec->dapm_widgets, list) { |
889 | if (!strcmp(w->name, pin)) { | 887 | if (!strcmp(w->name, pin)) { |
890 | dbg("dapm: %s: pin %s\n", codec->name, pin); | 888 | pr_debug("dapm: %s: pin %s\n", codec->name, pin); |
891 | w->connected = status; | 889 | w->connected = status; |
892 | return 0; | 890 | return 0; |
893 | } | 891 | } |
894 | } | 892 | } |
895 | 893 | ||
896 | dbg("dapm: %s: configuring unknown pin %s\n", codec->name, pin); | 894 | pr_err("dapm: %s: configuring unknown pin %s\n", codec->name, pin); |
897 | return -EINVAL; | 895 | return -EINVAL; |
898 | } | 896 | } |
899 | 897 | ||
@@ -1397,8 +1395,8 @@ int snd_soc_dapm_stream_event(struct snd_soc_codec *codec, | |||
1397 | { | 1395 | { |
1398 | if (!w->sname) | 1396 | if (!w->sname) |
1399 | continue; | 1397 | continue; |
1400 | dbg("widget %s\n %s stream %s event %d\n", w->name, w->sname, | 1398 | pr_debug("widget %s\n %s stream %s event %d\n", |
1401 | stream, event); | 1399 | w->name, w->sname, stream, event); |
1402 | if (strstr(w->sname, stream)) { | 1400 | if (strstr(w->sname, stream)) { |
1403 | switch(event) { | 1401 | switch(event) { |
1404 | case SND_SOC_DAPM_STREAM_START: | 1402 | case SND_SOC_DAPM_STREAM_START: |