diff options
-rw-r--r-- | Documentation/sound/alsa/ALSA-Configuration.txt | 2 | ||||
-rw-r--r-- | Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | 4 | ||||
-rw-r--r-- | include/sound/core.h | 8 | ||||
-rw-r--r-- | sound/core/Kconfig | 10 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_hwdep.c | 2 | ||||
-rw-r--r-- | sound/pci/pcxhr/pcxhr.c | 4 | ||||
-rw-r--r-- | sound/pci/pcxhr/pcxhr_core.c | 18 |
8 files changed, 26 insertions, 24 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 0bbee38acd2..e59569462cb 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -1091,7 +1091,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1091 | This occurs when the access to non-existing or non-working codec slot | 1091 | This occurs when the access to non-existing or non-working codec slot |
1092 | (likely a modem one) causes a stall of the communication via HD-audio | 1092 | (likely a modem one) causes a stall of the communication via HD-audio |
1093 | bus. You can see which codec slots are probed by enabling | 1093 | bus. You can see which codec slots are probed by enabling |
1094 | CONFIG_SND_DEBUG_DETECT, or simply from the file name of the codec | 1094 | CONFIG_SND_DEBUG_VERBOSE, or simply from the file name of the codec |
1095 | proc files. Then limit the slots to probe by probe_mask option. | 1095 | proc files. Then limit the slots to probe by probe_mask option. |
1096 | For example, probe_mask=1 means to probe only the first slot, and | 1096 | For example, probe_mask=1 means to probe only the first slot, and |
1097 | probe_mask=4 means only the third slot. | 1097 | probe_mask=4 means only the third slot. |
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index b03df4d4795..e13c4e67029 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -6127,8 +6127,8 @@ struct _snd_pcm_runtime { | |||
6127 | 6127 | ||
6128 | <para> | 6128 | <para> |
6129 | <function>snd_printdd()</function> is compiled in only when | 6129 | <function>snd_printdd()</function> is compiled in only when |
6130 | <constant>CONFIG_SND_DEBUG_DETECT</constant> is set. Please note | 6130 | <constant>CONFIG_SND_DEBUG_VERBOSE</constant> is set. Please note |
6131 | that <constant>DEBUG_DETECT</constant> is not set as default | 6131 | that <constant>CONFIG_SND_DEBUG_VERBOSE</constant> is not set as default |
6132 | even if you configure the alsa-driver with | 6132 | even if you configure the alsa-driver with |
6133 | <option>--with-debug=full</option> option. You need to give | 6133 | <option>--with-debug=full</option> option. You need to give |
6134 | explicitly <option>--with-debug=detect</option> option instead. | 6134 | explicitly <option>--with-debug=detect</option> option instead. |
diff --git a/include/sound/core.h b/include/sound/core.h index 695ee53488a..558b96284bd 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -412,13 +412,13 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
412 | 412 | ||
413 | #endif /* CONFIG_SND_DEBUG */ | 413 | #endif /* CONFIG_SND_DEBUG */ |
414 | 414 | ||
415 | #ifdef CONFIG_SND_DEBUG_DETECT | 415 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
416 | /** | 416 | /** |
417 | * snd_printdd - debug printk | 417 | * snd_printdd - debug printk |
418 | * @format: format string | 418 | * @format: format string |
419 | * | 419 | * |
420 | * Works like snd_printk() for debugging purposes. | 420 | * Works like snd_printk() for debugging purposes. |
421 | * Ignored when CONFIG_SND_DEBUG_DETECT is not set. | 421 | * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set. |
422 | */ | 422 | */ |
423 | #define snd_printdd(format, args...) snd_printk(format, ##args) | 423 | #define snd_printdd(format, args...) snd_printk(format, ##args) |
424 | #else | 424 | #else |
@@ -442,7 +442,7 @@ struct snd_pci_quirk { | |||
442 | unsigned short subvendor; /* PCI subvendor ID */ | 442 | unsigned short subvendor; /* PCI subvendor ID */ |
443 | unsigned short subdevice; /* PCI subdevice ID */ | 443 | unsigned short subdevice; /* PCI subdevice ID */ |
444 | int value; /* value */ | 444 | int value; /* value */ |
445 | #ifdef CONFIG_SND_DEBUG_DETECT | 445 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
446 | const char *name; /* name of the device (optional) */ | 446 | const char *name; /* name of the device (optional) */ |
447 | #endif | 447 | #endif |
448 | }; | 448 | }; |
@@ -450,7 +450,7 @@ struct snd_pci_quirk { | |||
450 | #define _SND_PCI_QUIRK_ID(vend,dev) \ | 450 | #define _SND_PCI_QUIRK_ID(vend,dev) \ |
451 | .subvendor = (vend), .subdevice = (dev) | 451 | .subvendor = (vend), .subdevice = (dev) |
452 | #define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)} | 452 | #define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)} |
453 | #ifdef CONFIG_SND_DEBUG_DETECT | 453 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
454 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ | 454 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ |
455 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)} | 455 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)} |
456 | #else | 456 | #else |
diff --git a/sound/core/Kconfig b/sound/core/Kconfig index db211137578..335d45ecde6 100644 --- a/sound/core/Kconfig +++ b/sound/core/Kconfig | |||
@@ -153,12 +153,14 @@ config SND_DEBUG | |||
153 | help | 153 | help |
154 | Say Y here to enable ALSA debug code. | 154 | Say Y here to enable ALSA debug code. |
155 | 155 | ||
156 | config SND_DEBUG_DETECT | 156 | config SND_DEBUG_VERBOSE |
157 | bool "Debug detection" | 157 | bool "More verbose debug" |
158 | depends on SND_DEBUG | 158 | depends on SND_DEBUG |
159 | help | 159 | help |
160 | Say Y here to enable extra-verbose log messages printed when | 160 | Say Y here to enable extra-verbose debugging messages. |
161 | detecting devices. | 161 | |
162 | Let me repeat: it enables EXTRA-VERBOSE DEBUGGING messages. | ||
163 | So, say Y only if you are ready to be annoyed. | ||
162 | 164 | ||
163 | config SND_PCM_XRUN_DEBUG | 165 | config SND_PCM_XRUN_DEBUG |
164 | bool "Enable PCM ring buffer overrun/underrun debugging" | 166 | bool "Enable PCM ring buffer overrun/underrun debugging" |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index a6be6e3e871..d2e1093f8e9 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -2335,7 +2335,7 @@ int snd_hda_check_board_config(struct hda_codec *codec, | |||
2335 | if (!tbl) | 2335 | if (!tbl) |
2336 | return -1; | 2336 | return -1; |
2337 | if (tbl->value >= 0 && tbl->value < num_configs) { | 2337 | if (tbl->value >= 0 && tbl->value < num_configs) { |
2338 | #ifdef CONFIG_SND_DEBUG_DETECT | 2338 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
2339 | char tmp[10]; | 2339 | char tmp[10]; |
2340 | const char *model = NULL; | 2340 | const char *model = NULL; |
2341 | if (models) | 2341 | if (models) |
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index 2177d9af533..6e18a422d99 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c | |||
@@ -88,7 +88,7 @@ static int hda_hwdep_ioctl_compat(struct snd_hwdep *hw, struct file *file, | |||
88 | 88 | ||
89 | static int hda_hwdep_open(struct snd_hwdep *hw, struct file *file) | 89 | static int hda_hwdep_open(struct snd_hwdep *hw, struct file *file) |
90 | { | 90 | { |
91 | #ifndef CONFIG_SND_DEBUG_DETECT | 91 | #ifndef CONFIG_SND_DEBUG_VERBOSE |
92 | if (!capable(CAP_SYS_RAWIO)) | 92 | if (!capable(CAP_SYS_RAWIO)) |
93 | return -EACCES; | 93 | return -EACCES; |
94 | #endif | 94 | #endif |
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index 7fdcdc8c6b6..2c7e2533679 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c | |||
@@ -516,7 +516,7 @@ static void pcxhr_trigger_tasklet(unsigned long arg) | |||
516 | int capture_mask = 0; | 516 | int capture_mask = 0; |
517 | int playback_mask = 0; | 517 | int playback_mask = 0; |
518 | 518 | ||
519 | #ifdef CONFIG_SND_DEBUG_DETECT | 519 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
520 | struct timeval my_tv1, my_tv2; | 520 | struct timeval my_tv1, my_tv2; |
521 | do_gettimeofday(&my_tv1); | 521 | do_gettimeofday(&my_tv1); |
522 | #endif | 522 | #endif |
@@ -623,7 +623,7 @@ static void pcxhr_trigger_tasklet(unsigned long arg) | |||
623 | 623 | ||
624 | mutex_unlock(&mgr->setup_mutex); | 624 | mutex_unlock(&mgr->setup_mutex); |
625 | 625 | ||
626 | #ifdef CONFIG_SND_DEBUG_DETECT | 626 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
627 | do_gettimeofday(&my_tv2); | 627 | do_gettimeofday(&my_tv2); |
628 | snd_printdd("***TRIGGER TASKLET*** TIME = %ld (err = %x)\n", | 628 | snd_printdd("***TRIGGER TASKLET*** TIME = %ld (err = %x)\n", |
629 | (long)(my_tv2.tv_usec - my_tv1.tv_usec), err); | 629 | (long)(my_tv2.tv_usec - my_tv1.tv_usec), err); |
diff --git a/sound/pci/pcxhr/pcxhr_core.c b/sound/pci/pcxhr/pcxhr_core.c index 78aa81feaa4..abe5c59b72d 100644 --- a/sound/pci/pcxhr/pcxhr_core.c +++ b/sound/pci/pcxhr/pcxhr_core.c | |||
@@ -473,7 +473,7 @@ static struct pcxhr_cmd_info pcxhr_dsp_cmds[] = { | |||
473 | [CMD_AUDIO_LEVEL_ADJUST] = { 0xc22000, 0, RMH_SSIZE_FIXED }, | 473 | [CMD_AUDIO_LEVEL_ADJUST] = { 0xc22000, 0, RMH_SSIZE_FIXED }, |
474 | }; | 474 | }; |
475 | 475 | ||
476 | #ifdef CONFIG_SND_DEBUG_DETECT | 476 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
477 | static char* cmd_names[] = { | 477 | static char* cmd_names[] = { |
478 | [CMD_VERSION] = "CMD_VERSION", | 478 | [CMD_VERSION] = "CMD_VERSION", |
479 | [CMD_SUPPORTED] = "CMD_SUPPORTED", | 479 | [CMD_SUPPORTED] = "CMD_SUPPORTED", |
@@ -549,7 +549,7 @@ static int pcxhr_read_rmh_status(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh) | |||
549 | } | 549 | } |
550 | } | 550 | } |
551 | } | 551 | } |
552 | #ifdef CONFIG_SND_DEBUG_DETECT | 552 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
553 | if (rmh->cmd_idx < CMD_LAST_INDEX) | 553 | if (rmh->cmd_idx < CMD_LAST_INDEX) |
554 | snd_printdd(" stat[%d]=%x\n", i, data); | 554 | snd_printdd(" stat[%d]=%x\n", i, data); |
555 | #endif | 555 | #endif |
@@ -597,7 +597,7 @@ static int pcxhr_send_msg_nolock(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh) | |||
597 | data |= 0x008000; /* MASK_MORE_THAN_1_WORD_COMMAND */ | 597 | data |= 0x008000; /* MASK_MORE_THAN_1_WORD_COMMAND */ |
598 | else | 598 | else |
599 | data &= 0xff7fff; /* MASK_1_WORD_COMMAND */ | 599 | data &= 0xff7fff; /* MASK_1_WORD_COMMAND */ |
600 | #ifdef CONFIG_SND_DEBUG_DETECT | 600 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
601 | if (rmh->cmd_idx < CMD_LAST_INDEX) | 601 | if (rmh->cmd_idx < CMD_LAST_INDEX) |
602 | snd_printdd("MSG cmd[0]=%x (%s)\n", data, cmd_names[rmh->cmd_idx]); | 602 | snd_printdd("MSG cmd[0]=%x (%s)\n", data, cmd_names[rmh->cmd_idx]); |
603 | #endif | 603 | #endif |
@@ -624,7 +624,7 @@ static int pcxhr_send_msg_nolock(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh) | |||
624 | for (i=1; i < rmh->cmd_len; i++) { | 624 | for (i=1; i < rmh->cmd_len; i++) { |
625 | /* send other words */ | 625 | /* send other words */ |
626 | data = rmh->cmd[i]; | 626 | data = rmh->cmd[i]; |
627 | #ifdef CONFIG_SND_DEBUG_DETECT | 627 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
628 | if (rmh->cmd_idx < CMD_LAST_INDEX) | 628 | if (rmh->cmd_idx < CMD_LAST_INDEX) |
629 | snd_printdd(" cmd[%d]=%x\n", i, data); | 629 | snd_printdd(" cmd[%d]=%x\n", i, data); |
630 | #endif | 630 | #endif |
@@ -847,7 +847,7 @@ int pcxhr_set_pipe_state(struct pcxhr_mgr *mgr, int playback_mask, int capture_m | |||
847 | int state, i, err; | 847 | int state, i, err; |
848 | int audio_mask; | 848 | int audio_mask; |
849 | 849 | ||
850 | #ifdef CONFIG_SND_DEBUG_DETECT | 850 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
851 | struct timeval my_tv1, my_tv2; | 851 | struct timeval my_tv1, my_tv2; |
852 | do_gettimeofday(&my_tv1); | 852 | do_gettimeofday(&my_tv1); |
853 | #endif | 853 | #endif |
@@ -894,7 +894,7 @@ int pcxhr_set_pipe_state(struct pcxhr_mgr *mgr, int playback_mask, int capture_m | |||
894 | if (err) | 894 | if (err) |
895 | return err; | 895 | return err; |
896 | } | 896 | } |
897 | #ifdef CONFIG_SND_DEBUG_DETECT | 897 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
898 | do_gettimeofday(&my_tv2); | 898 | do_gettimeofday(&my_tv2); |
899 | snd_printdd("***SET PIPE STATE*** TIME = %ld (err = %x)\n", | 899 | snd_printdd("***SET PIPE STATE*** TIME = %ld (err = %x)\n", |
900 | (long)(my_tv2.tv_usec - my_tv1.tv_usec), err); | 900 | (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 | enum pcxhr_async_err_src err_src, int pipe, | 951 | enum pcxhr_async_err_src err_src, int pipe, |
952 | int is_capture) | 952 | int is_capture) |
953 | { | 953 | { |
954 | #ifdef CONFIG_SND_DEBUG_DETECT | 954 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
955 | static char* err_src_name[] = { | 955 | static char* err_src_name[] = { |
956 | [PCXHR_ERR_PIPE] = "Pipe", | 956 | [PCXHR_ERR_PIPE] = "Pipe", |
957 | [PCXHR_ERR_STREAM] = "Stream", | 957 | [PCXHR_ERR_STREAM] = "Stream", |
@@ -1169,7 +1169,7 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id) | |||
1169 | mgr->dsp_time_last, dsp_time_new); | 1169 | mgr->dsp_time_last, dsp_time_new); |
1170 | mgr->dsp_time_err++; | 1170 | mgr->dsp_time_err++; |
1171 | } | 1171 | } |
1172 | #ifdef CONFIG_SND_DEBUG_DETECT | 1172 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
1173 | if (dsp_time_diff == 0) | 1173 | if (dsp_time_diff == 0) |
1174 | snd_printdd("ERROR DSP TIME NO DIFF time(%d)\n", dsp_time_new); | 1174 | snd_printdd("ERROR DSP TIME NO DIFF time(%d)\n", dsp_time_new); |
1175 | else if (dsp_time_diff >= (2*PCXHR_GRANULARITY)) | 1175 | else if (dsp_time_diff >= (2*PCXHR_GRANULARITY)) |
@@ -1208,7 +1208,7 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id) | |||
1208 | mgr->src_it_dsp = reg; | 1208 | mgr->src_it_dsp = reg; |
1209 | tasklet_hi_schedule(&mgr->msg_taskq); | 1209 | tasklet_hi_schedule(&mgr->msg_taskq); |
1210 | } | 1210 | } |
1211 | #ifdef CONFIG_SND_DEBUG_DETECT | 1211 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
1212 | if (reg & PCXHR_FATAL_DSP_ERR) | 1212 | if (reg & PCXHR_FATAL_DSP_ERR) |
1213 | snd_printdd("FATAL DSP ERROR : %x\n", reg); | 1213 | snd_printdd("FATAL DSP ERROR : %x\n", reg); |
1214 | #endif | 1214 | #endif |