Commit 62cf872a authored by Takashi Iwai's avatar Takashi Iwai

[ALSA] Replace CONFIG_SND_DEBUG_DETECT with CONFIG_SND_DEBUG_VERBOSE

Replace CONFIG_SND_DEBUG_DETECT with CONFIG_SND_DEBUG_VERBOSE to
represent its meaning more better.  This config isn't provided only
for the detection but for more verbose debug prints in general.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 6938d6b2
...@@ -1091,7 +1091,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. ...@@ -1091,7 +1091,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
This occurs when the access to non-existing or non-working codec slot This occurs when the access to non-existing or non-working codec slot
(likely a modem one) causes a stall of the communication via HD-audio (likely a modem one) causes a stall of the communication via HD-audio
bus. You can see which codec slots are probed by enabling bus. You can see which codec slots are probed by enabling
CONFIG_SND_DEBUG_DETECT, or simply from the file name of the codec CONFIG_SND_DEBUG_VERBOSE, or simply from the file name of the codec
proc files. Then limit the slots to probe by probe_mask option. proc files. Then limit the slots to probe by probe_mask option.
For example, probe_mask=1 means to probe only the first slot, and For example, probe_mask=1 means to probe only the first slot, and
probe_mask=4 means only the third slot. probe_mask=4 means only the third slot.
......
...@@ -6127,8 +6127,8 @@ struct _snd_pcm_runtime { ...@@ -6127,8 +6127,8 @@ struct _snd_pcm_runtime {
<para> <para>
<function>snd_printdd()</function> is compiled in only when <function>snd_printdd()</function> is compiled in only when
<constant>CONFIG_SND_DEBUG_DETECT</constant> is set. Please note <constant>CONFIG_SND_DEBUG_VERBOSE</constant> is set. Please note
that <constant>DEBUG_DETECT</constant> is not set as default that <constant>CONFIG_SND_DEBUG_VERBOSE</constant> is not set as default
even if you configure the alsa-driver with even if you configure the alsa-driver with
<option>--with-debug=full</option> option. You need to give <option>--with-debug=full</option> option. You need to give
explicitly <option>--with-debug=detect</option> option instead. explicitly <option>--with-debug=detect</option> option instead.
......
...@@ -412,13 +412,13 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) ...@@ -412,13 +412,13 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
#endif /* CONFIG_SND_DEBUG */ #endif /* CONFIG_SND_DEBUG */
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
/** /**
* snd_printdd - debug printk * snd_printdd - debug printk
* @format: format string * @format: format string
* *
* Works like snd_printk() for debugging purposes. * Works like snd_printk() for debugging purposes.
* Ignored when CONFIG_SND_DEBUG_DETECT is not set. * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set.
*/ */
#define snd_printdd(format, args...) snd_printk(format, ##args) #define snd_printdd(format, args...) snd_printk(format, ##args)
#else #else
...@@ -442,7 +442,7 @@ struct snd_pci_quirk { ...@@ -442,7 +442,7 @@ struct snd_pci_quirk {
unsigned short subvendor; /* PCI subvendor ID */ unsigned short subvendor; /* PCI subvendor ID */
unsigned short subdevice; /* PCI subdevice ID */ unsigned short subdevice; /* PCI subdevice ID */
int value; /* value */ int value; /* value */
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
const char *name; /* name of the device (optional) */ const char *name; /* name of the device (optional) */
#endif #endif
}; };
...@@ -450,7 +450,7 @@ struct snd_pci_quirk { ...@@ -450,7 +450,7 @@ struct snd_pci_quirk {
#define _SND_PCI_QUIRK_ID(vend,dev) \ #define _SND_PCI_QUIRK_ID(vend,dev) \
.subvendor = (vend), .subdevice = (dev) .subvendor = (vend), .subdevice = (dev)
#define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)} #define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)}
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
#define SND_PCI_QUIRK(vend,dev,xname,val) \ #define SND_PCI_QUIRK(vend,dev,xname,val) \
{_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)} {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)}
#else #else
......
...@@ -153,12 +153,14 @@ config SND_DEBUG ...@@ -153,12 +153,14 @@ config SND_DEBUG
help help
Say Y here to enable ALSA debug code. Say Y here to enable ALSA debug code.
config SND_DEBUG_DETECT config SND_DEBUG_VERBOSE
bool "Debug detection" bool "More verbose debug"
depends on SND_DEBUG depends on SND_DEBUG
help help
Say Y here to enable extra-verbose log messages printed when Say Y here to enable extra-verbose debugging messages.
detecting devices.
Let me repeat: it enables EXTRA-VERBOSE DEBUGGING messages.
So, say Y only if you are ready to be annoyed.
config SND_PCM_XRUN_DEBUG config SND_PCM_XRUN_DEBUG
bool "Enable PCM ring buffer overrun/underrun debugging" bool "Enable PCM ring buffer overrun/underrun debugging"
......
...@@ -2335,7 +2335,7 @@ int snd_hda_check_board_config(struct hda_codec *codec, ...@@ -2335,7 +2335,7 @@ int snd_hda_check_board_config(struct hda_codec *codec,
if (!tbl) if (!tbl)
return -1; return -1;
if (tbl->value >= 0 && tbl->value < num_configs) { if (tbl->value >= 0 && tbl->value < num_configs) {
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
char tmp[10]; char tmp[10];
const char *model = NULL; const char *model = NULL;
if (models) if (models)
......
...@@ -88,7 +88,7 @@ static int hda_hwdep_ioctl_compat(struct snd_hwdep *hw, struct file *file, ...@@ -88,7 +88,7 @@ static int hda_hwdep_ioctl_compat(struct snd_hwdep *hw, struct file *file,
static int hda_hwdep_open(struct snd_hwdep *hw, struct file *file) static int hda_hwdep_open(struct snd_hwdep *hw, struct file *file)
{ {
#ifndef CONFIG_SND_DEBUG_DETECT #ifndef CONFIG_SND_DEBUG_VERBOSE
if (!capable(CAP_SYS_RAWIO)) if (!capable(CAP_SYS_RAWIO))
return -EACCES; return -EACCES;
#endif #endif
......
...@@ -516,7 +516,7 @@ static void pcxhr_trigger_tasklet(unsigned long arg) ...@@ -516,7 +516,7 @@ static void pcxhr_trigger_tasklet(unsigned long arg)
int capture_mask = 0; int capture_mask = 0;
int playback_mask = 0; int playback_mask = 0;
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
struct timeval my_tv1, my_tv2; struct timeval my_tv1, my_tv2;
do_gettimeofday(&my_tv1); do_gettimeofday(&my_tv1);
#endif #endif
...@@ -623,7 +623,7 @@ static void pcxhr_trigger_tasklet(unsigned long arg) ...@@ -623,7 +623,7 @@ static void pcxhr_trigger_tasklet(unsigned long arg)
mutex_unlock(&mgr->setup_mutex); mutex_unlock(&mgr->setup_mutex);
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
do_gettimeofday(&my_tv2); do_gettimeofday(&my_tv2);
snd_printdd("***TRIGGER TASKLET*** TIME = %ld (err = %x)\n", snd_printdd("***TRIGGER TASKLET*** TIME = %ld (err = %x)\n",
(long)(my_tv2.tv_usec - my_tv1.tv_usec), err); (long)(my_tv2.tv_usec - my_tv1.tv_usec), err);
......
...@@ -473,7 +473,7 @@ static struct pcxhr_cmd_info pcxhr_dsp_cmds[] = { ...@@ -473,7 +473,7 @@ static struct pcxhr_cmd_info pcxhr_dsp_cmds[] = {
[CMD_AUDIO_LEVEL_ADJUST] = { 0xc22000, 0, RMH_SSIZE_FIXED }, [CMD_AUDIO_LEVEL_ADJUST] = { 0xc22000, 0, RMH_SSIZE_FIXED },
}; };
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
static char* cmd_names[] = { static char* cmd_names[] = {
[CMD_VERSION] = "CMD_VERSION", [CMD_VERSION] = "CMD_VERSION",
[CMD_SUPPORTED] = "CMD_SUPPORTED", [CMD_SUPPORTED] = "CMD_SUPPORTED",
...@@ -549,7 +549,7 @@ static int pcxhr_read_rmh_status(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh) ...@@ -549,7 +549,7 @@ static int pcxhr_read_rmh_status(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh)
} }
} }
} }
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
if (rmh->cmd_idx < CMD_LAST_INDEX) if (rmh->cmd_idx < CMD_LAST_INDEX)
snd_printdd(" stat[%d]=%x\n", i, data); snd_printdd(" stat[%d]=%x\n", i, data);
#endif #endif
...@@ -597,7 +597,7 @@ static int pcxhr_send_msg_nolock(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh) ...@@ -597,7 +597,7 @@ static int pcxhr_send_msg_nolock(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh)
data |= 0x008000; /* MASK_MORE_THAN_1_WORD_COMMAND */ data |= 0x008000; /* MASK_MORE_THAN_1_WORD_COMMAND */
else else
data &= 0xff7fff; /* MASK_1_WORD_COMMAND */ data &= 0xff7fff; /* MASK_1_WORD_COMMAND */
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
if (rmh->cmd_idx < CMD_LAST_INDEX) if (rmh->cmd_idx < CMD_LAST_INDEX)
snd_printdd("MSG cmd[0]=%x (%s)\n", data, cmd_names[rmh->cmd_idx]); snd_printdd("MSG cmd[0]=%x (%s)\n", data, cmd_names[rmh->cmd_idx]);
#endif #endif
...@@ -624,7 +624,7 @@ static int pcxhr_send_msg_nolock(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh) ...@@ -624,7 +624,7 @@ static int pcxhr_send_msg_nolock(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh)
for (i=1; i < rmh->cmd_len; i++) { for (i=1; i < rmh->cmd_len; i++) {
/* send other words */ /* send other words */
data = rmh->cmd[i]; data = rmh->cmd[i];
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
if (rmh->cmd_idx < CMD_LAST_INDEX) if (rmh->cmd_idx < CMD_LAST_INDEX)
snd_printdd(" cmd[%d]=%x\n", i, data); snd_printdd(" cmd[%d]=%x\n", i, data);
#endif #endif
...@@ -847,7 +847,7 @@ int pcxhr_set_pipe_state(struct pcxhr_mgr *mgr, int playback_mask, int capture_m ...@@ -847,7 +847,7 @@ int pcxhr_set_pipe_state(struct pcxhr_mgr *mgr, int playback_mask, int capture_m
int state, i, err; int state, i, err;
int audio_mask; int audio_mask;
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
struct timeval my_tv1, my_tv2; struct timeval my_tv1, my_tv2;
do_gettimeofday(&my_tv1); do_gettimeofday(&my_tv1);
#endif #endif
...@@ -894,7 +894,7 @@ int pcxhr_set_pipe_state(struct pcxhr_mgr *mgr, int playback_mask, int capture_m ...@@ -894,7 +894,7 @@ int pcxhr_set_pipe_state(struct pcxhr_mgr *mgr, int playback_mask, int capture_m
if (err) if (err)
return err; return err;
} }
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
do_gettimeofday(&my_tv2); do_gettimeofday(&my_tv2);
snd_printdd("***SET PIPE STATE*** TIME = %ld (err = %x)\n", snd_printdd("***SET PIPE STATE*** TIME = %ld (err = %x)\n",
(long)(my_tv2.tv_usec - my_tv1.tv_usec), err); (long)(my_tv2.tv_usec - my_tv1.tv_usec), err);
...@@ -951,7 +951,7 @@ static int pcxhr_handle_async_err(struct pcxhr_mgr *mgr, u32 err, ...@@ -951,7 +951,7 @@ static int pcxhr_handle_async_err(struct pcxhr_mgr *mgr, u32 err,
enum pcxhr_async_err_src err_src, int pipe, enum pcxhr_async_err_src err_src, int pipe,
int is_capture) int is_capture)
{ {
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
static char* err_src_name[] = { static char* err_src_name[] = {
[PCXHR_ERR_PIPE] = "Pipe", [PCXHR_ERR_PIPE] = "Pipe",
[PCXHR_ERR_STREAM] = "Stream", [PCXHR_ERR_STREAM] = "Stream",
...@@ -1169,7 +1169,7 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id) ...@@ -1169,7 +1169,7 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id)
mgr->dsp_time_last, dsp_time_new); mgr->dsp_time_last, dsp_time_new);
mgr->dsp_time_err++; mgr->dsp_time_err++;
} }
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
if (dsp_time_diff == 0) if (dsp_time_diff == 0)
snd_printdd("ERROR DSP TIME NO DIFF time(%d)\n", dsp_time_new); snd_printdd("ERROR DSP TIME NO DIFF time(%d)\n", dsp_time_new);
else if (dsp_time_diff >= (2*PCXHR_GRANULARITY)) else if (dsp_time_diff >= (2*PCXHR_GRANULARITY))
...@@ -1208,7 +1208,7 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id) ...@@ -1208,7 +1208,7 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id)
mgr->src_it_dsp = reg; mgr->src_it_dsp = reg;
tasklet_hi_schedule(&mgr->msg_taskq); tasklet_hi_schedule(&mgr->msg_taskq);
} }
#ifdef CONFIG_SND_DEBUG_DETECT #ifdef CONFIG_SND_DEBUG_VERBOSE
if (reg & PCXHR_FATAL_DSP_ERR) if (reg & PCXHR_FATAL_DSP_ERR)
snd_printdd("FATAL DSP ERROR : %x\n", reg); snd_printdd("FATAL DSP ERROR : %x\n", reg);
#endif #endif
......
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