Skip to content

Commit 006de26

Browse files
committed
ALSA: Add missing KERN_* prefix to printk in sound/core
Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent e616165 commit 006de26

5 files changed

Lines changed: 39 additions & 25 deletions

File tree

‎sound/core/oss/pcm_oss.c‎

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,9 +1160,11 @@ snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream, const
11601160
runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
11611161
#ifdef OSS_DEBUG
11621162
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");
11641165
else
1165-
printk("pcm_oss: write: recovering from SUSPEND\n");
1166+
printk(KERN_DEBUG "pcm_oss: write: "
1167+
"recovering from SUSPEND\n");
11661168
#endif
11671169
ret = snd_pcm_oss_prepare(substream);
11681170
if (ret < 0)
@@ -1196,9 +1198,11 @@ snd_pcm_sframes_t snd_pcm_oss_read3(struct snd_pcm_substream *substream, char *p
11961198
runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
11971199
#ifdef OSS_DEBUG
11981200
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");
12001203
else
1201-
printk("pcm_oss: read: recovering from SUSPEND\n");
1204+
printk(KERN_DEBUG "pcm_oss: read: "
1205+
"recovering from SUSPEND\n");
12021206
#endif
12031207
ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL);
12041208
if (ret < 0)
@@ -1242,9 +1246,11 @@ snd_pcm_sframes_t snd_pcm_oss_writev3(struct snd_pcm_substream *substream, void
12421246
runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
12431247
#ifdef OSS_DEBUG
12441248
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");
12461251
else
1247-
printk("pcm_oss: writev: recovering from SUSPEND\n");
1252+
printk(KERN_DEBUG "pcm_oss: writev: "
1253+
"recovering from SUSPEND\n");
12481254
#endif
12491255
ret = snd_pcm_oss_prepare(substream);
12501256
if (ret < 0)
@@ -1278,9 +1284,11 @@ snd_pcm_sframes_t snd_pcm_oss_readv3(struct snd_pcm_substream *substream, void *
12781284
runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
12791285
#ifdef OSS_DEBUG
12801286
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");
12821289
else
1283-
printk("pcm_oss: readv: recovering from SUSPEND\n");
1290+
printk(KERN_DEBUG "pcm_oss: readv: "
1291+
"recovering from SUSPEND\n");
12841292
#endif
12851293
ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL);
12861294
if (ret < 0)
@@ -1533,7 +1541,7 @@ static int snd_pcm_oss_sync1(struct snd_pcm_substream *substream, size_t size)
15331541
init_waitqueue_entry(&wait, current);
15341542
add_wait_queue(&runtime->sleep, &wait);
15351543
#ifdef OSS_DEBUG
1536-
printk("sync1: size = %li\n", size);
1544+
printk(KERN_DEBUG "sync1: size = %li\n", size);
15371545
#endif
15381546
while (1) {
15391547
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)
15901598
mutex_lock(&runtime->oss.params_lock);
15911599
if (runtime->oss.buffer_used > 0) {
15921600
#ifdef OSS_DEBUG
1593-
printk("sync: buffer_used\n");
1601+
printk(KERN_DEBUG "sync: buffer_used\n");
15941602
#endif
15951603
size = (8 * (runtime->oss.period_bytes - runtime->oss.buffer_used) + 7) / width;
15961604
snd_pcm_format_set_silence(format,
@@ -1603,7 +1611,7 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
16031611
}
16041612
} else if (runtime->oss.period_ptr > 0) {
16051613
#ifdef OSS_DEBUG
1606-
printk("sync: period_ptr\n");
1614+
printk(KERN_DEBUG "sync: period_ptr\n");
16071615
#endif
16081616
size = runtime->oss.period_bytes - runtime->oss.period_ptr;
16091617
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
19521960
int err, cmd;
19531961

19541962
#ifdef OSS_DEBUG
1955-
printk("pcm_oss: trigger = 0x%x\n", trigger);
1963+
printk(KERN_DEBUG "pcm_oss: trigger = 0x%x\n", trigger);
19561964
#endif
19571965

19581966
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
21702178
}
21712179

21722180
#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);
21742184
#endif
21752185
if (copy_to_user(_info, &info, sizeof(info)))
21762186
return -EFAULT;
@@ -2473,7 +2483,7 @@ static long snd_pcm_oss_ioctl(struct file *file, unsigned int cmd, unsigned long
24732483
if (((cmd >> 8) & 0xff) != 'P')
24742484
return -EINVAL;
24752485
#ifdef OSS_DEBUG
2476-
printk("pcm_oss: ioctl = 0x%x\n", cmd);
2486+
printk(KERN_DEBUG "pcm_oss: ioctl = 0x%x\n", cmd);
24772487
#endif
24782488
switch (cmd) {
24792489
case SNDCTL_DSP_RESET:
@@ -2627,7 +2637,8 @@ static ssize_t snd_pcm_oss_read(struct file *file, char __user *buf, size_t coun
26272637
#else
26282638
{
26292639
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);
26312642
return res;
26322643
}
26332644
#endif
@@ -2646,7 +2657,8 @@ static ssize_t snd_pcm_oss_write(struct file *file, const char __user *buf, size
26462657
substream->f_flags = file->f_flags & O_NONBLOCK;
26472658
result = snd_pcm_oss_write1(substream, buf, count);
26482659
#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);
26502662
#endif
26512663
return result;
26522664
}
@@ -2720,7 +2732,7 @@ static int snd_pcm_oss_mmap(struct file *file, struct vm_area_struct *area)
27202732
int err;
27212733

27222734
#ifdef OSS_DEBUG
2723-
printk("pcm_oss: mmap begin\n");
2735+
printk(KERN_DEBUG "pcm_oss: mmap begin\n");
27242736
#endif
27252737
pcm_oss_file = file->private_data;
27262738
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)
27702782
runtime->silence_threshold = 0;
27712783
runtime->silence_size = 0;
27722784
#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);
27742787
#endif
27752788
/* In mmap mode we never stop */
27762789
runtime->stop_threshold = runtime->boundary;

‎sound/core/oss/pcm_plugin.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ static inline int snd_pcm_plug_slave_format(int format, struct snd_mask *format_
176176
#endif
177177

178178
#ifdef PLUGIN_DEBUG
179-
#define pdprintf( fmt, args... ) printk( "plugin: " fmt, ##args)
179+
#define pdprintf(fmt, args...) printk(KERN_DEBUG "plugin: " fmt, ##args)
180180
#else
181-
#define pdprintf( fmt, args... )
181+
#define pdprintf(fmt, args...)
182182
#endif
183183

184184
#endif /* __PCM_PLUGIN_H */

‎sound/core/pcm_native.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
186186
if (!(params->rmask & (1 << k)))
187187
continue;
188188
#ifdef RULES_DEBUG
189-
printk("%s = ", snd_pcm_hw_param_names[k]);
189+
printk(KERN_DEBUG "%s = ", snd_pcm_hw_param_names[k]);
190190
printk("%04x%04x%04x%04x -> ", m->bits[3], m->bits[2], m->bits[1], m->bits[0]);
191191
#endif
192192
changed = snd_mask_refine(m, constrs_mask(constrs, k));
@@ -206,7 +206,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
206206
if (!(params->rmask & (1 << k)))
207207
continue;
208208
#ifdef RULES_DEBUG
209-
printk("%s = ", snd_pcm_hw_param_names[k]);
209+
printk(KERN_DEBUG "%s = ", snd_pcm_hw_param_names[k]);
210210
if (i->empty)
211211
printk("empty");
212212
else
@@ -251,7 +251,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
251251
if (!doit)
252252
continue;
253253
#ifdef RULES_DEBUG
254-
printk("Rule %d [%p]: ", k, r->func);
254+
printk(KERN_DEBUG "Rule %d [%p]: ", k, r->func);
255255
if (r->var >= 0) {
256256
printk("%s = ", snd_pcm_hw_param_names[r->var]);
257257
if (hw_is_mask(r->var)) {

‎sound/core/seq/oss/seq_oss_device.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ char *enabled_str(int bool);
181181
/* for debug */
182182
#ifdef SNDRV_SEQ_OSS_DEBUG
183183
extern 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)
185185
#else
186186
#define debug_printk(x) /**/
187187
#endif

‎sound/core/seq/seq_prioq.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ void snd_seq_prioq_leave(struct snd_seq_prioq * f, int client, int timestamp)
321321
freeprev = cell;
322322
} else {
323323
#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",
325326
cell->event.type,
326327
cell->event.source.client,
327328
cell->event.dest.client,

0 commit comments

Comments
 (0)