aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEliot Blennerhassett <eblennerhassett@audioscience.com>2011-04-05 04:55:46 -0400
committerTakashi Iwai <tiwai@suse.de>2011-04-05 05:47:54 -0400
commitb0096a65677fa8d7e50975dc7282ce313610d9e8 (patch)
treeb79b0973dc2d35c10d578844dd8657d1888e7725
parent6027dfa46ea477b1223d83e74a3b3dcc572285b5 (diff)
ALSA: asihpi: Standardise substream name generation
Define and use pcm_debug_name if CONFIG_SND_DEBUG Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/asihpi/asihpi.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
index d5258aa738a1..eac7b08a161d 100644
--- a/sound/pci/asihpi/asihpi.c
+++ b/sound/pci/asihpi/asihpi.c
@@ -47,18 +47,7 @@ MODULE_LICENSE("GPL");
47MODULE_AUTHOR("AudioScience inc. <support@audioscience.com>"); 47MODULE_AUTHOR("AudioScience inc. <support@audioscience.com>");
48MODULE_DESCRIPTION("AudioScience ALSA ASI5000 ASI6000 ASI87xx ASI89xx"); 48MODULE_DESCRIPTION("AudioScience ALSA ASI5000 ASI6000 ASI87xx ASI89xx");
49 49
50#if defined CONFIG_SND_DEBUG_VERBOSE 50#if defined CONFIG_SND_DEBUG
51/**
52 * snd_printddd - very verbose debug printk
53 * @format: format string
54 *
55 * Works like snd_printk() for debugging purposes.
56 * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set.
57 * Must set snd module debug parameter to 3 to enable at runtime.
58 */
59#define snd_printddd(format, args...) \
60 __snd_printk(3, __FILE__, __LINE__, format, ##args)
61
62/* copied from pcm_lib.c, hope later patch will make that version public 51/* copied from pcm_lib.c, hope later patch will make that version public
63and this copy can be removed */ 52and this copy can be removed */
64static void pcm_debug_name(struct snd_pcm_substream *substream, 53static void pcm_debug_name(struct snd_pcm_substream *substream,
@@ -71,12 +60,24 @@ static void pcm_debug_name(struct snd_pcm_substream *substream,
71 substream->number); 60 substream->number);
72} 61}
73#define DEBUG_NAME(substream, name) char name[16]; pcm_debug_name(substream, name, sizeof(name)) 62#define DEBUG_NAME(substream, name) char name[16]; pcm_debug_name(substream, name, sizeof(name))
74
75#else 63#else
76#define snd_printddd(format, args...) do { } while (0)
77#define pcm_debug_name(s, n, l) do { } while (0) 64#define pcm_debug_name(s, n, l) do { } while (0)
78#define DEBUG_NAME(name, substream) do { } while (0) 65#define DEBUG_NAME(name, substream) do { } while (0)
66#endif
79 67
68#if defined CONFIG_SND_DEBUG_VERBOSE
69/**
70 * snd_printddd - very verbose debug printk
71 * @format: format string
72 *
73 * Works like snd_printk() for debugging purposes.
74 * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set.
75 * Must set snd module debug parameter to 3 to enable at runtime.
76 */
77#define snd_printddd(format, args...) \
78 __snd_printk(3, __FILE__, __LINE__, format, ##args)
79#else
80#define snd_printddd(format, args...) do { } while (0)
80#endif 81#endif
81 82
82static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* index 0-MAX */ 83static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* index 0-MAX */
@@ -857,7 +858,7 @@ static void snd_card_asihpi_timer_function(unsigned long data)
857 unsigned int xfer1, xfer2; 858 unsigned int xfer1, xfer2;
858 char *pd = &s->runtime->dma_area[buf_ofs]; 859 char *pd = &s->runtime->dma_area[buf_ofs];
859 860
860 if (card->can_dma) { 861 if (card->can_dma) { /* buffer wrap is handled at lower level */
861 xfer1 = xfercount; 862 xfer1 = xfercount;
862 xfer2 = 0; 863 xfer2 = 0;
863 } else { 864 } else {