@@ -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 ;
0 commit comments