Commit 006de267351aa3d836f3307370eae7ec16eac09d
1 parent
e616165309
Exists in
master
and in
7 other branches
ALSA: Add missing KERN_* prefix to printk in sound/core
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Showing 5 changed files with 39 additions and 25 deletions Side-by-side Diff
sound/core/oss/pcm_oss.c
... | ... | @@ -1160,9 +1160,11 @@ |
1160 | 1160 | runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) { |
1161 | 1161 | #ifdef OSS_DEBUG |
1162 | 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 | 1165 | else |
1165 | - printk("pcm_oss: write: recovering from SUSPEND\n"); | |
1166 | + printk(KERN_DEBUG "pcm_oss: write: " | |
1167 | + "recovering from SUSPEND\n"); | |
1166 | 1168 | #endif |
1167 | 1169 | ret = snd_pcm_oss_prepare(substream); |
1168 | 1170 | if (ret < 0) |
1169 | 1171 | |
... | ... | @@ -1196,9 +1198,11 @@ |
1196 | 1198 | runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) { |
1197 | 1199 | #ifdef OSS_DEBUG |
1198 | 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 | 1203 | else |
1201 | - printk("pcm_oss: read: recovering from SUSPEND\n"); | |
1204 | + printk(KERN_DEBUG "pcm_oss: read: " | |
1205 | + "recovering from SUSPEND\n"); | |
1202 | 1206 | #endif |
1203 | 1207 | ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL); |
1204 | 1208 | if (ret < 0) |
1205 | 1209 | |
... | ... | @@ -1242,9 +1246,11 @@ |
1242 | 1246 | runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) { |
1243 | 1247 | #ifdef OSS_DEBUG |
1244 | 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 | 1251 | else |
1247 | - printk("pcm_oss: writev: recovering from SUSPEND\n"); | |
1252 | + printk(KERN_DEBUG "pcm_oss: writev: " | |
1253 | + "recovering from SUSPEND\n"); | |
1248 | 1254 | #endif |
1249 | 1255 | ret = snd_pcm_oss_prepare(substream); |
1250 | 1256 | if (ret < 0) |
1251 | 1257 | |
... | ... | @@ -1278,9 +1284,11 @@ |
1278 | 1284 | runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) { |
1279 | 1285 | #ifdef OSS_DEBUG |
1280 | 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 | 1289 | else |
1283 | - printk("pcm_oss: readv: recovering from SUSPEND\n"); | |
1290 | + printk(KERN_DEBUG "pcm_oss: readv: " | |
1291 | + "recovering from SUSPEND\n"); | |
1284 | 1292 | #endif |
1285 | 1293 | ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL); |
1286 | 1294 | if (ret < 0) |
... | ... | @@ -1533,7 +1541,7 @@ |
1533 | 1541 | init_waitqueue_entry(&wait, current); |
1534 | 1542 | add_wait_queue(&runtime->sleep, &wait); |
1535 | 1543 | #ifdef OSS_DEBUG |
1536 | - printk("sync1: size = %li\n", size); | |
1544 | + printk(KERN_DEBUG "sync1: size = %li\n", size); | |
1537 | 1545 | #endif |
1538 | 1546 | while (1) { |
1539 | 1547 | result = snd_pcm_oss_write2(substream, runtime->oss.buffer, size, 1); |
... | ... | @@ -1590,7 +1598,7 @@ |
1590 | 1598 | mutex_lock(&runtime->oss.params_lock); |
1591 | 1599 | if (runtime->oss.buffer_used > 0) { |
1592 | 1600 | #ifdef OSS_DEBUG |
1593 | - printk("sync: buffer_used\n"); | |
1601 | + printk(KERN_DEBUG "sync: buffer_used\n"); | |
1594 | 1602 | #endif |
1595 | 1603 | size = (8 * (runtime->oss.period_bytes - runtime->oss.buffer_used) + 7) / width; |
1596 | 1604 | snd_pcm_format_set_silence(format, |
... | ... | @@ -1603,7 +1611,7 @@ |
1603 | 1611 | } |
1604 | 1612 | } else if (runtime->oss.period_ptr > 0) { |
1605 | 1613 | #ifdef OSS_DEBUG |
1606 | - printk("sync: period_ptr\n"); | |
1614 | + printk(KERN_DEBUG "sync: period_ptr\n"); | |
1607 | 1615 | #endif |
1608 | 1616 | size = runtime->oss.period_bytes - runtime->oss.period_ptr; |
1609 | 1617 | snd_pcm_format_set_silence(format, |
... | ... | @@ -1952,7 +1960,7 @@ |
1952 | 1960 | int err, cmd; |
1953 | 1961 | |
1954 | 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 | 1964 | #endif |
1957 | 1965 | |
1958 | 1966 | psubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK]; |
... | ... | @@ -2170,7 +2178,9 @@ |
2170 | 2178 | } |
2171 | 2179 | |
2172 | 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 | 2184 | #endif |
2175 | 2185 | if (copy_to_user(_info, &info, sizeof(info))) |
2176 | 2186 | return -EFAULT; |
... | ... | @@ -2473,7 +2483,7 @@ |
2473 | 2483 | if (((cmd >> 8) & 0xff) != 'P') |
2474 | 2484 | return -EINVAL; |
2475 | 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 | 2487 | #endif |
2478 | 2488 | switch (cmd) { |
2479 | 2489 | case SNDCTL_DSP_RESET: |
... | ... | @@ -2627,7 +2637,8 @@ |
2627 | 2637 | #else |
2628 | 2638 | { |
2629 | 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 | 2642 | return res; |
2632 | 2643 | } |
2633 | 2644 | #endif |
... | ... | @@ -2646,7 +2657,8 @@ |
2646 | 2657 | substream->f_flags = file->f_flags & O_NONBLOCK; |
2647 | 2658 | result = snd_pcm_oss_write1(substream, buf, count); |
2648 | 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 | 2662 | #endif |
2651 | 2663 | return result; |
2652 | 2664 | } |
... | ... | @@ -2720,7 +2732,7 @@ |
2720 | 2732 | int err; |
2721 | 2733 | |
2722 | 2734 | #ifdef OSS_DEBUG |
2723 | - printk("pcm_oss: mmap begin\n"); | |
2735 | + printk(KERN_DEBUG "pcm_oss: mmap begin\n"); | |
2724 | 2736 | #endif |
2725 | 2737 | pcm_oss_file = file->private_data; |
2726 | 2738 | switch ((area->vm_flags & (VM_READ | VM_WRITE))) { |
... | ... | @@ -2770,7 +2782,8 @@ |
2770 | 2782 | runtime->silence_threshold = 0; |
2771 | 2783 | runtime->silence_size = 0; |
2772 | 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 | 2787 | #endif |
2775 | 2788 | /* In mmap mode we never stop */ |
2776 | 2789 | runtime->stop_threshold = runtime->boundary; |
sound/core/oss/pcm_plugin.h
... | ... | @@ -176,9 +176,9 @@ |
176 | 176 | #endif |
177 | 177 | |
178 | 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 | 180 | #else |
181 | -#define pdprintf( fmt, args... ) | |
181 | +#define pdprintf(fmt, args...) | |
182 | 182 | #endif |
183 | 183 | |
184 | 184 | #endif /* __PCM_PLUGIN_H */ |
sound/core/pcm_native.c
... | ... | @@ -186,7 +186,7 @@ |
186 | 186 | if (!(params->rmask & (1 << k))) |
187 | 187 | continue; |
188 | 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 | 190 | printk("%04x%04x%04x%04x -> ", m->bits[3], m->bits[2], m->bits[1], m->bits[0]); |
191 | 191 | #endif |
192 | 192 | changed = snd_mask_refine(m, constrs_mask(constrs, k)); |
... | ... | @@ -206,7 +206,7 @@ |
206 | 206 | if (!(params->rmask & (1 << k))) |
207 | 207 | continue; |
208 | 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 | 210 | if (i->empty) |
211 | 211 | printk("empty"); |
212 | 212 | else |
... | ... | @@ -251,7 +251,7 @@ |
251 | 251 | if (!doit) |
252 | 252 | continue; |
253 | 253 | #ifdef RULES_DEBUG |
254 | - printk("Rule %d [%p]: ", k, r->func); | |
254 | + printk(KERN_DEBUG "Rule %d [%p]: ", k, r->func); | |
255 | 255 | if (r->var >= 0) { |
256 | 256 | printk("%s = ", snd_pcm_hw_param_names[r->var]); |
257 | 257 | if (hw_is_mask(r->var)) { |
sound/core/seq/oss/seq_oss_device.h
... | ... | @@ -181,7 +181,7 @@ |
181 | 181 | /* for debug */ |
182 | 182 | #ifdef SNDRV_SEQ_OSS_DEBUG |
183 | 183 | 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) | |
185 | 185 | #else |
186 | 186 | #define debug_printk(x) /**/ |
187 | 187 | #endif |
sound/core/seq/seq_prioq.c
... | ... | @@ -321,7 +321,8 @@ |
321 | 321 | freeprev = cell; |
322 | 322 | } else { |
323 | 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 | 326 | cell->event.type, |
326 | 327 | cell->event.source.client, |
327 | 328 | cell->event.dest.client, |