aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-02-05 09:51:04 -0500
committerTakashi Iwai <tiwai@suse.de>2009-02-05 10:00:49 -0500
commit006de267351aa3d836f3307370eae7ec16eac09d (patch)
tree496b1b763c143d2c8b5a0dd92871f09cdc5a7756 /sound
parente6161653094f14b1add10efe3493a2e526fe9538 (diff)
ALSA: Add missing KERN_* prefix to printk in sound/core
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/oss/pcm_oss.c49
-rw-r--r--sound/core/oss/pcm_plugin.h4
-rw-r--r--sound/core/pcm_native.c6
-rw-r--r--sound/core/seq/oss/seq_oss_device.h2
-rw-r--r--sound/core/seq/seq_prioq.c3
5 files changed, 39 insertions, 25 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index e17836680f49..4b883595a85a 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1160,9 +1160,11 @@ snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream, const
1160 runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) { 1160 runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
1161#ifdef OSS_DEBUG 1161#ifdef OSS_DEBUG
1162 if (runtime->status->state == SNDRV_PCM_STATE_XRUN) 1162 if (runtime->status->state == SNDRV_PCM_STATE_XRUN)
1163 printk("pcm_oss: write: recovering from XRUN\n"); 1163 printk(KERN_DEBUG "pcm_oss: write: "
1164 "recovering from XRUN\n");
1164 else 1165 else
1165 printk("pcm_oss: write: recovering from SUSPEND\n"); 1166 printk(KERN_DEBUG "pcm_oss: write: "
1167 "recovering from SUSPEND\n");
1166#endif 1168#endif
1167 ret = snd_pcm_oss_prepare(substream); 1169 ret = snd_pcm_oss_prepare(substream);
1168 if (ret < 0) 1170 if (ret < 0)
@@ -1196,9 +1198,11 @@ snd_pcm_sframes_t snd_pcm_oss_read3(struct snd_pcm_substream *substream, char *p
1196 runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) { 1198 runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
1197#ifdef OSS_DEBUG 1199#ifdef OSS_DEBUG
1198 if (runtime->status->state == SNDRV_PCM_STATE_XRUN) 1200 if (runtime->status->state == SNDRV_PCM_STATE_XRUN)
1199 printk("pcm_oss: read: recovering from XRUN\n"); 1201 printk(KERN_DEBUG "pcm_oss: read: "
1202 "recovering from XRUN\n");
1200 else 1203 else
1201 printk("pcm_oss: read: recovering from SUSPEND\n"); 1204 printk(KERN_DEBUG "pcm_oss: read: "
1205 "recovering from SUSPEND\n");
1202#endif 1206#endif
1203 ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL); 1207 ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL);
1204 if (ret < 0) 1208 if (ret < 0)
@@ -1242,9 +1246,11 @@ snd_pcm_sframes_t snd_pcm_oss_writev3(struct snd_pcm_substream *substream, void
1242 runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) { 1246 runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
1243#ifdef OSS_DEBUG 1247#ifdef OSS_DEBUG
1244 if (runtime->status->state == SNDRV_PCM_STATE_XRUN) 1248 if (runtime->status->state == SNDRV_PCM_STATE_XRUN)
1245 printk("pcm_oss: writev: recovering from XRUN\n"); 1249 printk(KERN_DEBUG "pcm_oss: writev: "
1250 "recovering from XRUN\n");
1246 else 1251 else
1247 printk("pcm_oss: writev: recovering from SUSPEND\n"); 1252 printk(KERN_DEBUG "pcm_oss: writev: "
1253 "recovering from SUSPEND\n");
1248#endif 1254#endif
1249 ret = snd_pcm_oss_prepare(substream); 1255 ret = snd_pcm_oss_prepare(substream);
1250 if (ret < 0) 1256 if (ret < 0)
@@ -1278,9 +1284,11 @@ snd_pcm_sframes_t snd_pcm_oss_readv3(struct snd_pcm_substream *substream, void *
1278 runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) { 1284 runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
1279#ifdef OSS_DEBUG 1285#ifdef OSS_DEBUG
1280 if (runtime->status->state == SNDRV_PCM_STATE_XRUN) 1286 if (runtime->status->state == SNDRV_PCM_STATE_XRUN)
1281 printk("pcm_oss: readv: recovering from XRUN\n"); 1287 printk(KERN_DEBUG "pcm_oss: readv: "
1288 "recovering from XRUN\n");
1282 else 1289 else
1283 printk("pcm_oss: readv: recovering from SUSPEND\n"); 1290 printk(KERN_DEBUG "pcm_oss: readv: "
1291 "recovering from SUSPEND\n");
1284#endif 1292#endif
1285 ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL); 1293 ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL);
1286 if (ret < 0) 1294 if (ret < 0)
@@ -1533,7 +1541,7 @@ static int snd_pcm_oss_sync1(struct snd_pcm_substream *substream, size_t size)
1533 init_waitqueue_entry(&wait, current); 1541 init_waitqueue_entry(&wait, current);
1534 add_wait_queue(&runtime->sleep, &wait); 1542 add_wait_queue(&runtime->sleep, &wait);
1535#ifdef OSS_DEBUG 1543#ifdef OSS_DEBUG
1536 printk("sync1: size = %li\n", size); 1544 printk(KERN_DEBUG "sync1: size = %li\n", size);
1537#endif 1545#endif
1538 while (1) { 1546 while (1) {
1539 result = snd_pcm_oss_write2(substream, runtime->oss.buffer, size, 1); 1547 result = snd_pcm_oss_write2(substream, runtime->oss.buffer, size, 1);
@@ -1590,7 +1598,7 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
1590 mutex_lock(&runtime->oss.params_lock); 1598 mutex_lock(&runtime->oss.params_lock);
1591 if (runtime->oss.buffer_used > 0) { 1599 if (runtime->oss.buffer_used > 0) {
1592#ifdef OSS_DEBUG 1600#ifdef OSS_DEBUG
1593 printk("sync: buffer_used\n"); 1601 printk(KERN_DEBUG "sync: buffer_used\n");
1594#endif 1602#endif
1595 size = (8 * (runtime->oss.period_bytes - runtime->oss.buffer_used) + 7) / width; 1603 size = (8 * (runtime->oss.period_bytes - runtime->oss.buffer_used) + 7) / width;
1596 snd_pcm_format_set_silence(format, 1604 snd_pcm_format_set_silence(format,
@@ -1603,7 +1611,7 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
1603 } 1611 }
1604 } else if (runtime->oss.period_ptr > 0) { 1612 } else if (runtime->oss.period_ptr > 0) {
1605#ifdef OSS_DEBUG 1613#ifdef OSS_DEBUG
1606 printk("sync: period_ptr\n"); 1614 printk(KERN_DEBUG "sync: period_ptr\n");
1607#endif 1615#endif
1608 size = runtime->oss.period_bytes - runtime->oss.period_ptr; 1616 size = runtime->oss.period_bytes - runtime->oss.period_ptr;
1609 snd_pcm_format_set_silence(format, 1617 snd_pcm_format_set_silence(format,
@@ -1952,7 +1960,7 @@ static int snd_pcm_oss_set_trigger(struct snd_pcm_oss_file *pcm_oss_file, int tr
1952 int err, cmd; 1960 int err, cmd;
1953 1961
1954#ifdef OSS_DEBUG 1962#ifdef OSS_DEBUG
1955 printk("pcm_oss: trigger = 0x%x\n", trigger); 1963 printk(KERN_DEBUG "pcm_oss: trigger = 0x%x\n", trigger);
1956#endif 1964#endif
1957 1965
1958 psubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK]; 1966 psubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
@@ -2170,7 +2178,9 @@ static int snd_pcm_oss_get_space(struct snd_pcm_oss_file *pcm_oss_file, int stre
2170 } 2178 }
2171 2179
2172#ifdef OSS_DEBUG 2180#ifdef OSS_DEBUG
2173 printk("pcm_oss: space: bytes = %i, fragments = %i, fragstotal = %i, fragsize = %i\n", info.bytes, info.fragments, info.fragstotal, info.fragsize); 2181 printk(KERN_DEBUG "pcm_oss: space: bytes = %i, fragments = %i, "
2182 "fragstotal = %i, fragsize = %i\n",
2183 info.bytes, info.fragments, info.fragstotal, info.fragsize);
2174#endif 2184#endif
2175 if (copy_to_user(_info, &info, sizeof(info))) 2185 if (copy_to_user(_info, &info, sizeof(info)))
2176 return -EFAULT; 2186 return -EFAULT;
@@ -2473,7 +2483,7 @@ static long snd_pcm_oss_ioctl(struct file *file, unsigned int cmd, unsigned long
2473 if (((cmd >> 8) & 0xff) != 'P') 2483 if (((cmd >> 8) & 0xff) != 'P')
2474 return -EINVAL; 2484 return -EINVAL;
2475#ifdef OSS_DEBUG 2485#ifdef OSS_DEBUG
2476 printk("pcm_oss: ioctl = 0x%x\n", cmd); 2486 printk(KERN_DEBUG "pcm_oss: ioctl = 0x%x\n", cmd);
2477#endif 2487#endif
2478 switch (cmd) { 2488 switch (cmd) {
2479 case SNDCTL_DSP_RESET: 2489 case SNDCTL_DSP_RESET:
@@ -2627,7 +2637,8 @@ static ssize_t snd_pcm_oss_read(struct file *file, char __user *buf, size_t coun
2627#else 2637#else
2628 { 2638 {
2629 ssize_t res = snd_pcm_oss_read1(substream, buf, count); 2639 ssize_t res = snd_pcm_oss_read1(substream, buf, count);
2630 printk("pcm_oss: read %li bytes (returned %li bytes)\n", (long)count, (long)res); 2640 printk(KERN_DEBUG "pcm_oss: read %li bytes "
2641 "(returned %li bytes)\n", (long)count, (long)res);
2631 return res; 2642 return res;
2632 } 2643 }
2633#endif 2644#endif
@@ -2646,7 +2657,8 @@ static ssize_t snd_pcm_oss_write(struct file *file, const char __user *buf, size
2646 substream->f_flags = file->f_flags & O_NONBLOCK; 2657 substream->f_flags = file->f_flags & O_NONBLOCK;
2647 result = snd_pcm_oss_write1(substream, buf, count); 2658 result = snd_pcm_oss_write1(substream, buf, count);
2648#ifdef OSS_DEBUG 2659#ifdef OSS_DEBUG
2649 printk("pcm_oss: write %li bytes (wrote %li bytes)\n", (long)count, (long)result); 2660 printk(KERN_DEBUG "pcm_oss: write %li bytes (wrote %li bytes)\n",
2661 (long)count, (long)result);
2650#endif 2662#endif
2651 return result; 2663 return result;
2652} 2664}
@@ -2720,7 +2732,7 @@ static int snd_pcm_oss_mmap(struct file *file, struct vm_area_struct *area)
2720 int err; 2732 int err;
2721 2733
2722#ifdef OSS_DEBUG 2734#ifdef OSS_DEBUG
2723 printk("pcm_oss: mmap begin\n"); 2735 printk(KERN_DEBUG "pcm_oss: mmap begin\n");
2724#endif 2736#endif
2725 pcm_oss_file = file->private_data; 2737 pcm_oss_file = file->private_data;
2726 switch ((area->vm_flags & (VM_READ | VM_WRITE))) { 2738 switch ((area->vm_flags & (VM_READ | VM_WRITE))) {
@@ -2770,7 +2782,8 @@ static int snd_pcm_oss_mmap(struct file *file, struct vm_area_struct *area)
2770 runtime->silence_threshold = 0; 2782 runtime->silence_threshold = 0;
2771 runtime->silence_size = 0; 2783 runtime->silence_size = 0;
2772#ifdef OSS_DEBUG 2784#ifdef OSS_DEBUG
2773 printk("pcm_oss: mmap ok, bytes = 0x%x\n", runtime->oss.mmap_bytes); 2785 printk(KERN_DEBUG "pcm_oss: mmap ok, bytes = 0x%x\n",
2786 runtime->oss.mmap_bytes);
2774#endif 2787#endif
2775 /* In mmap mode we never stop */ 2788 /* In mmap mode we never stop */
2776 runtime->stop_threshold = runtime->boundary; 2789 runtime->stop_threshold = runtime->boundary;
diff --git a/sound/core/oss/pcm_plugin.h b/sound/core/oss/pcm_plugin.h
index ca2f4c39be46..b9afab603711 100644
--- a/sound/core/oss/pcm_plugin.h
+++ b/sound/core/oss/pcm_plugin.h
@@ -176,9 +176,9 @@ static inline int snd_pcm_plug_slave_format(int format, struct snd_mask *format_
176#endif 176#endif
177 177
178#ifdef PLUGIN_DEBUG 178#ifdef PLUGIN_DEBUG
179#define pdprintf( fmt, args... ) printk( "plugin: " fmt, ##args) 179#define pdprintf(fmt, args...) printk(KERN_DEBUG "plugin: " fmt, ##args)
180#else 180#else
181#define pdprintf( fmt, args... ) 181#define pdprintf(fmt, args...)
182#endif 182#endif
183 183
184#endif /* __PCM_PLUGIN_H */ 184#endif /* __PCM_PLUGIN_H */
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index a789efc9df39..d9b8f5379428 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -186,7 +186,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
186 if (!(params->rmask & (1 << k))) 186 if (!(params->rmask & (1 << k)))
187 continue; 187 continue;
188#ifdef RULES_DEBUG 188#ifdef RULES_DEBUG
189 printk("%s = ", snd_pcm_hw_param_names[k]); 189 printk(KERN_DEBUG "%s = ", snd_pcm_hw_param_names[k]);
190 printk("%04x%04x%04x%04x -> ", m->bits[3], m->bits[2], m->bits[1], m->bits[0]); 190 printk("%04x%04x%04x%04x -> ", m->bits[3], m->bits[2], m->bits[1], m->bits[0]);
191#endif 191#endif
192 changed = snd_mask_refine(m, constrs_mask(constrs, k)); 192 changed = snd_mask_refine(m, constrs_mask(constrs, k));
@@ -206,7 +206,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
206 if (!(params->rmask & (1 << k))) 206 if (!(params->rmask & (1 << k)))
207 continue; 207 continue;
208#ifdef RULES_DEBUG 208#ifdef RULES_DEBUG
209 printk("%s = ", snd_pcm_hw_param_names[k]); 209 printk(KERN_DEBUG "%s = ", snd_pcm_hw_param_names[k]);
210 if (i->empty) 210 if (i->empty)
211 printk("empty"); 211 printk("empty");
212 else 212 else
@@ -251,7 +251,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
251 if (!doit) 251 if (!doit)
252 continue; 252 continue;
253#ifdef RULES_DEBUG 253#ifdef RULES_DEBUG
254 printk("Rule %d [%p]: ", k, r->func); 254 printk(KERN_DEBUG "Rule %d [%p]: ", k, r->func);
255 if (r->var >= 0) { 255 if (r->var >= 0) {
256 printk("%s = ", snd_pcm_hw_param_names[r->var]); 256 printk("%s = ", snd_pcm_hw_param_names[r->var]);
257 if (hw_is_mask(r->var)) { 257 if (hw_is_mask(r->var)) {
diff --git a/sound/core/seq/oss/seq_oss_device.h b/sound/core/seq/oss/seq_oss_device.h
index bf8d2b4cb15e..c0154a959d55 100644
--- a/sound/core/seq/oss/seq_oss_device.h
+++ b/sound/core/seq/oss/seq_oss_device.h
@@ -181,7 +181,7 @@ char *enabled_str(int bool);
181/* for debug */ 181/* for debug */
182#ifdef SNDRV_SEQ_OSS_DEBUG 182#ifdef SNDRV_SEQ_OSS_DEBUG
183extern int seq_oss_debug; 183extern int seq_oss_debug;
184#define debug_printk(x) do { if (seq_oss_debug > 0) snd_printk x; } while (0) 184#define debug_printk(x) do { if (seq_oss_debug > 0) snd_printd x; } while (0)
185#else 185#else
186#define debug_printk(x) /**/ 186#define debug_printk(x) /**/
187#endif 187#endif
diff --git a/sound/core/seq/seq_prioq.c b/sound/core/seq/seq_prioq.c
index 0101a8b99b73..29896ab23403 100644
--- a/sound/core/seq/seq_prioq.c
+++ b/sound/core/seq/seq_prioq.c
@@ -321,7 +321,8 @@ void snd_seq_prioq_leave(struct snd_seq_prioq * f, int client, int timestamp)
321 freeprev = cell; 321 freeprev = cell;
322 } else { 322 } else {
323#if 0 323#if 0
324 printk("type = %i, source = %i, dest = %i, client = %i\n", 324 printk(KERN_DEBUG "type = %i, source = %i, dest = %i, "
325 "client = %i\n",
325 cell->event.type, 326 cell->event.type,
326 cell->event.source.client, 327 cell->event.source.client,
327 cell->event.dest.client, 328 cell->event.dest.client,