Commit 04cc79a0 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: seq: Use standard printk helpers

Use the standard pr_xxx() helpers instead of home-baked snd_print*().
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent cf74dcf3
...@@ -123,7 +123,7 @@ static inline int snd_seq_write_pool_allocated(struct snd_seq_client *client) ...@@ -123,7 +123,7 @@ static inline int snd_seq_write_pool_allocated(struct snd_seq_client *client)
static struct snd_seq_client *clientptr(int clientid) static struct snd_seq_client *clientptr(int clientid)
{ {
if (clientid < 0 || clientid >= SNDRV_SEQ_MAX_CLIENTS) { if (clientid < 0 || clientid >= SNDRV_SEQ_MAX_CLIENTS) {
snd_printd("Seq: oops. Trying to get pointer to client %d\n", pr_debug("ALSA: seq: oops. Trying to get pointer to client %d\n",
clientid); clientid);
return NULL; return NULL;
} }
...@@ -136,7 +136,7 @@ struct snd_seq_client *snd_seq_client_use_ptr(int clientid) ...@@ -136,7 +136,7 @@ struct snd_seq_client *snd_seq_client_use_ptr(int clientid)
struct snd_seq_client *client; struct snd_seq_client *client;
if (clientid < 0 || clientid >= SNDRV_SEQ_MAX_CLIENTS) { if (clientid < 0 || clientid >= SNDRV_SEQ_MAX_CLIENTS) {
snd_printd("Seq: oops. Trying to get pointer to client %d\n", pr_debug("ALSA: seq: oops. Trying to get pointer to client %d\n",
clientid); clientid);
return NULL; return NULL;
} }
...@@ -291,8 +291,8 @@ static void seq_free_client(struct snd_seq_client * client) ...@@ -291,8 +291,8 @@ static void seq_free_client(struct snd_seq_client * client)
mutex_lock(&register_mutex); mutex_lock(&register_mutex);
switch (client->type) { switch (client->type) {
case NO_CLIENT: case NO_CLIENT:
snd_printk(KERN_WARNING "Seq: Trying to free unused client %d\n", pr_warn("ALSA: seq: Trying to free unused client %d\n",
client->number); client->number);
break; break;
case USER_CLIENT: case USER_CLIENT:
case KERNEL_CLIENT: case KERNEL_CLIENT:
...@@ -301,7 +301,7 @@ static void seq_free_client(struct snd_seq_client * client) ...@@ -301,7 +301,7 @@ static void seq_free_client(struct snd_seq_client * client)
break; break;
default: default:
snd_printk(KERN_ERR "Seq: Trying to free client %d with undefined type = %d\n", pr_err("ALSA: seq: Trying to free client %d with undefined type = %d\n",
client->number, client->type); client->number, client->type);
} }
mutex_unlock(&register_mutex); mutex_unlock(&register_mutex);
...@@ -773,7 +773,7 @@ static int broadcast_event(struct snd_seq_client *client, ...@@ -773,7 +773,7 @@ static int broadcast_event(struct snd_seq_client *client,
static int multicast_event(struct snd_seq_client *client, struct snd_seq_event *event, static int multicast_event(struct snd_seq_client *client, struct snd_seq_event *event,
int atomic, int hop) int atomic, int hop)
{ {
snd_printd("seq: multicast not supported yet.\n"); pr_debug("ALSA: seq: multicast not supported yet.\n");
return 0; /* ignored */ return 0; /* ignored */
} }
#endif /* SUPPORT_BROADCAST */ #endif /* SUPPORT_BROADCAST */
...@@ -794,7 +794,7 @@ static int snd_seq_deliver_event(struct snd_seq_client *client, struct snd_seq_e ...@@ -794,7 +794,7 @@ static int snd_seq_deliver_event(struct snd_seq_client *client, struct snd_seq_e
hop++; hop++;
if (hop >= SNDRV_SEQ_MAX_HOPS) { if (hop >= SNDRV_SEQ_MAX_HOPS) {
snd_printd("too long delivery path (%d:%d->%d:%d)\n", pr_debug("ALSA: seq: too long delivery path (%d:%d->%d:%d)\n",
event->source.client, event->source.port, event->source.client, event->source.port,
event->dest.client, event->dest.port); event->dest.client, event->dest.port);
return -EMLINK; return -EMLINK;
...@@ -2196,7 +2196,7 @@ static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd, ...@@ -2196,7 +2196,7 @@ static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd,
if (p->cmd == cmd) if (p->cmd == cmd)
return p->func(client, arg); return p->func(client, arg);
} }
snd_printd("seq unknown ioctl() 0x%x (type='%c', number=0x%02x)\n", pr_debug("ALSA: seq unknown ioctl() 0x%x (type='%c', number=0x%02x)\n",
cmd, _IOC_TYPE(cmd), _IOC_NR(cmd)); cmd, _IOC_TYPE(cmd), _IOC_NR(cmd));
return -ENOTTY; return -ENOTTY;
} }
......
...@@ -325,7 +325,7 @@ int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry, ...@@ -325,7 +325,7 @@ int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry,
return -ENOMEM; return -ENOMEM;
} }
if (ops->driver & DRIVER_LOADED) { if (ops->driver & DRIVER_LOADED) {
snd_printk(KERN_WARNING "driver_register: driver '%s' already exists\n", id); pr_warn("ALSA: seq: driver_register: driver '%s' already exists\n", id);
unlock_driver(ops); unlock_driver(ops);
snd_seq_autoload_unlock(); snd_seq_autoload_unlock();
return -EBUSY; return -EBUSY;
...@@ -398,7 +398,7 @@ int snd_seq_device_unregister_driver(char *id) ...@@ -398,7 +398,7 @@ int snd_seq_device_unregister_driver(char *id)
return -ENXIO; return -ENXIO;
if (! (ops->driver & DRIVER_LOADED) || if (! (ops->driver & DRIVER_LOADED) ||
(ops->driver & DRIVER_LOCKED)) { (ops->driver & DRIVER_LOCKED)) {
snd_printk(KERN_ERR "driver_unregister: cannot unload driver '%s': status=%x\n", pr_err("ALSA: seq: driver_unregister: cannot unload driver '%s': status=%x\n",
id, ops->driver); id, ops->driver);
unlock_driver(ops); unlock_driver(ops);
return -EBUSY; return -EBUSY;
...@@ -413,7 +413,7 @@ int snd_seq_device_unregister_driver(char *id) ...@@ -413,7 +413,7 @@ int snd_seq_device_unregister_driver(char *id)
ops->driver = 0; ops->driver = 0;
if (ops->num_init_devices > 0) if (ops->num_init_devices > 0)
snd_printk(KERN_ERR "free_driver: init_devices > 0!! (%d)\n", pr_err("ALSA: seq: free_driver: init_devices > 0!! (%d)\n",
ops->num_init_devices); ops->num_init_devices);
mutex_unlock(&ops->reg_mutex); mutex_unlock(&ops->reg_mutex);
...@@ -459,7 +459,7 @@ static int init_device(struct snd_seq_device *dev, struct ops_list *ops) ...@@ -459,7 +459,7 @@ static int init_device(struct snd_seq_device *dev, struct ops_list *ops)
if (dev->status != SNDRV_SEQ_DEVICE_FREE) if (dev->status != SNDRV_SEQ_DEVICE_FREE)
return 0; /* already initialized */ return 0; /* already initialized */
if (ops->argsize != dev->argsize) { if (ops->argsize != dev->argsize) {
snd_printk(KERN_ERR "incompatible device '%s' for plug-in '%s' (%d %d)\n", pr_err("ALSA: seq: incompatible device '%s' for plug-in '%s' (%d %d)\n",
dev->name, ops->id, ops->argsize, dev->argsize); dev->name, ops->id, ops->argsize, dev->argsize);
return -EINVAL; return -EINVAL;
} }
...@@ -467,7 +467,7 @@ static int init_device(struct snd_seq_device *dev, struct ops_list *ops) ...@@ -467,7 +467,7 @@ static int init_device(struct snd_seq_device *dev, struct ops_list *ops)
dev->status = SNDRV_SEQ_DEVICE_REGISTERED; dev->status = SNDRV_SEQ_DEVICE_REGISTERED;
ops->num_init_devices++; ops->num_init_devices++;
} else { } else {
snd_printk(KERN_ERR "init_device failed: %s: %s\n", pr_err("ALSA: seq: init_device failed: %s: %s\n",
dev->name, dev->id); dev->name, dev->id);
} }
...@@ -486,7 +486,7 @@ static int free_device(struct snd_seq_device *dev, struct ops_list *ops) ...@@ -486,7 +486,7 @@ static int free_device(struct snd_seq_device *dev, struct ops_list *ops)
if (dev->status != SNDRV_SEQ_DEVICE_REGISTERED) if (dev->status != SNDRV_SEQ_DEVICE_REGISTERED)
return 0; /* not registered */ return 0; /* not registered */
if (ops->argsize != dev->argsize) { if (ops->argsize != dev->argsize) {
snd_printk(KERN_ERR "incompatible device '%s' for plug-in '%s' (%d %d)\n", pr_err("ALSA: seq: incompatible device '%s' for plug-in '%s' (%d %d)\n",
dev->name, ops->id, ops->argsize, dev->argsize); dev->name, ops->id, ops->argsize, dev->argsize);
return -EINVAL; return -EINVAL;
} }
...@@ -495,7 +495,7 @@ static int free_device(struct snd_seq_device *dev, struct ops_list *ops) ...@@ -495,7 +495,7 @@ static int free_device(struct snd_seq_device *dev, struct ops_list *ops)
dev->driver_data = NULL; dev->driver_data = NULL;
ops->num_init_devices--; ops->num_init_devices--;
} else { } else {
snd_printk(KERN_ERR "free_device failed: %s: %s\n", pr_err("ALSA: seq: free_device failed: %s: %s\n",
dev->name, dev->id); dev->name, dev->id);
} }
...@@ -559,7 +559,7 @@ static void __exit alsa_seq_device_exit(void) ...@@ -559,7 +559,7 @@ static void __exit alsa_seq_device_exit(void)
snd_info_free_entry(info_entry); snd_info_free_entry(info_entry);
#endif #endif
if (num_ops) if (num_ops)
snd_printk(KERN_ERR "drivers not released (%d)\n", num_ops); pr_err("ALSA: seq: drivers not released (%d)\n", num_ops);
} }
module_init(alsa_seq_device_init) module_init(alsa_seq_device_init)
......
...@@ -198,7 +198,7 @@ register_client(void) ...@@ -198,7 +198,7 @@ register_client(void)
int i; int i;
if (ports < 1) { if (ports < 1) {
snd_printk(KERN_ERR "invalid number of ports %d\n", ports); pr_err("ALSA: seq_dummy: invalid number of ports %d\n", ports);
return -EINVAL; return -EINVAL;
} }
......
...@@ -34,7 +34,7 @@ struct snd_seq_fifo *snd_seq_fifo_new(int poolsize) ...@@ -34,7 +34,7 @@ struct snd_seq_fifo *snd_seq_fifo_new(int poolsize)
f = kzalloc(sizeof(*f), GFP_KERNEL); f = kzalloc(sizeof(*f), GFP_KERNEL);
if (f == NULL) { if (f == NULL) {
snd_printd("malloc failed for snd_seq_fifo_new() \n"); pr_debug("ALSA: seq: malloc failed for snd_seq_fifo_new() \n");
return NULL; return NULL;
} }
......
...@@ -31,12 +31,12 @@ void snd_use_lock_sync_helper(snd_use_lock_t *lockp, const char *file, int line) ...@@ -31,12 +31,12 @@ void snd_use_lock_sync_helper(snd_use_lock_t *lockp, const char *file, int line)
int max_count = 5 * HZ; int max_count = 5 * HZ;
if (atomic_read(lockp) < 0) { if (atomic_read(lockp) < 0) {
printk(KERN_WARNING "seq_lock: lock trouble [counter = %d] in %s:%d\n", atomic_read(lockp), file, line); pr_warn("ALSA: seq_lock: lock trouble [counter = %d] in %s:%d\n", atomic_read(lockp), file, line);
return; return;
} }
while (atomic_read(lockp) > 0) { while (atomic_read(lockp) > 0) {
if (max_count == 0) { if (max_count == 0) {
snd_printk(KERN_WARNING "seq_lock: timeout [%d left] in %s:%d\n", atomic_read(lockp), file, line); pr_warn("ALSA: seq_lock: timeout [%d left] in %s:%d\n", atomic_read(lockp), file, line);
break; break;
} }
schedule_timeout_uninterruptible(1); schedule_timeout_uninterruptible(1);
......
...@@ -236,7 +236,7 @@ static int snd_seq_cell_alloc(struct snd_seq_pool *pool, ...@@ -236,7 +236,7 @@ static int snd_seq_cell_alloc(struct snd_seq_pool *pool,
init_waitqueue_entry(&wait, current); init_waitqueue_entry(&wait, current);
spin_lock_irqsave(&pool->lock, flags); spin_lock_irqsave(&pool->lock, flags);
if (pool->ptr == NULL) { /* not initialized */ if (pool->ptr == NULL) { /* not initialized */
snd_printd("seq: pool is not initialized\n"); pr_debug("ALSA: seq: pool is not initialized\n");
err = -EINVAL; err = -EINVAL;
goto __error; goto __error;
} }
...@@ -388,7 +388,7 @@ int snd_seq_pool_init(struct snd_seq_pool *pool) ...@@ -388,7 +388,7 @@ int snd_seq_pool_init(struct snd_seq_pool *pool)
pool->ptr = vmalloc(sizeof(struct snd_seq_event_cell) * pool->size); pool->ptr = vmalloc(sizeof(struct snd_seq_event_cell) * pool->size);
if (pool->ptr == NULL) { if (pool->ptr == NULL) {
snd_printd("seq: malloc for sequencer events failed\n"); pr_debug("ALSA: seq: malloc for sequencer events failed\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -431,7 +431,7 @@ int snd_seq_pool_done(struct snd_seq_pool *pool) ...@@ -431,7 +431,7 @@ int snd_seq_pool_done(struct snd_seq_pool *pool)
while (atomic_read(&pool->counter) > 0) { while (atomic_read(&pool->counter) > 0) {
if (max_count == 0) { if (max_count == 0) {
snd_printk(KERN_WARNING "snd_seq_pool_done timeout: %d cells remain\n", atomic_read(&pool->counter)); pr_warn("ALSA: snd_seq_pool_done timeout: %d cells remain\n", atomic_read(&pool->counter));
break; break;
} }
schedule_timeout_uninterruptible(1); schedule_timeout_uninterruptible(1);
...@@ -464,7 +464,7 @@ struct snd_seq_pool *snd_seq_pool_new(int poolsize) ...@@ -464,7 +464,7 @@ struct snd_seq_pool *snd_seq_pool_new(int poolsize)
/* create pool block */ /* create pool block */
pool = kzalloc(sizeof(*pool), GFP_KERNEL); pool = kzalloc(sizeof(*pool), GFP_KERNEL);
if (pool == NULL) { if (pool == NULL) {
snd_printd("seq: malloc failed for pool\n"); pr_debug("ALSA: seq: malloc failed for pool\n");
return NULL; return NULL;
} }
spin_lock_init(&pool->lock); spin_lock_init(&pool->lock);
......
...@@ -121,7 +121,7 @@ static int dump_midi(struct snd_rawmidi_substream *substream, const char *buf, i ...@@ -121,7 +121,7 @@ static int dump_midi(struct snd_rawmidi_substream *substream, const char *buf, i
runtime = substream->runtime; runtime = substream->runtime;
if ((tmp = runtime->avail) < count) { if ((tmp = runtime->avail) < count) {
if (printk_ratelimit()) if (printk_ratelimit())
snd_printk(KERN_ERR "MIDI output buffer overrun\n"); pr_err("ALSA: seq_midi: MIDI output buffer overrun\n");
return -ENOMEM; return -ENOMEM;
} }
if (snd_rawmidi_kernel_write(substream, buf, count) < count) if (snd_rawmidi_kernel_write(substream, buf, count) < count)
...@@ -145,7 +145,7 @@ static int event_process_midi(struct snd_seq_event *ev, int direct, ...@@ -145,7 +145,7 @@ static int event_process_midi(struct snd_seq_event *ev, int direct,
if (ev->type == SNDRV_SEQ_EVENT_SYSEX) { /* special case, to save space */ if (ev->type == SNDRV_SEQ_EVENT_SYSEX) { /* special case, to save space */
if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARIABLE) { if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARIABLE) {
/* invalid event */ /* invalid event */
snd_printd("seq_midi: invalid sysex event flags = 0x%x\n", ev->flags); pr_debug("ALSA: seq_midi: invalid sysex event flags = 0x%x\n", ev->flags);
return 0; return 0;
} }
snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)dump_midi, substream); snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)dump_midi, substream);
...@@ -189,7 +189,7 @@ static int midisynth_subscribe(void *private_data, struct snd_seq_port_subscribe ...@@ -189,7 +189,7 @@ static int midisynth_subscribe(void *private_data, struct snd_seq_port_subscribe
msynth->subdevice, msynth->subdevice,
SNDRV_RAWMIDI_LFLG_INPUT, SNDRV_RAWMIDI_LFLG_INPUT,
&msynth->input_rfile)) < 0) { &msynth->input_rfile)) < 0) {
snd_printd("midi input open failed!!!\n"); pr_debug("ALSA: seq_midi: midi input open failed!!!\n");
return err; return err;
} }
runtime = msynth->input_rfile.input->runtime; runtime = msynth->input_rfile.input->runtime;
...@@ -231,7 +231,7 @@ static int midisynth_use(void *private_data, struct snd_seq_port_subscribe *info ...@@ -231,7 +231,7 @@ static int midisynth_use(void *private_data, struct snd_seq_port_subscribe *info
msynth->subdevice, msynth->subdevice,
SNDRV_RAWMIDI_LFLG_OUTPUT, SNDRV_RAWMIDI_LFLG_OUTPUT,
&msynth->output_rfile)) < 0) { &msynth->output_rfile)) < 0) {
snd_printd("midi output open failed!!!\n"); pr_debug("ALSA: seq_midi: midi output open failed!!!\n");
return err; return err;
} }
memset(&params, 0, sizeof(params)); memset(&params, 0, sizeof(params));
......
...@@ -89,7 +89,7 @@ snd_midi_process_event(struct snd_midi_op *ops, ...@@ -89,7 +89,7 @@ snd_midi_process_event(struct snd_midi_op *ops,
int dest_channel = 0; int dest_channel = 0;
if (ev == NULL || chanset == NULL) { if (ev == NULL || chanset == NULL) {
snd_printd("ev or chanbase NULL (snd_midi_process_event)\n"); pr_debug("ALSA: seq_midi_emul: ev or chanbase NULL (snd_midi_process_event)\n");
return; return;
} }
if (chanset->channels == NULL) if (chanset->channels == NULL)
...@@ -98,7 +98,7 @@ snd_midi_process_event(struct snd_midi_op *ops, ...@@ -98,7 +98,7 @@ snd_midi_process_event(struct snd_midi_op *ops,
if (snd_seq_ev_is_channel_type(ev)) { if (snd_seq_ev_is_channel_type(ev)) {
dest_channel = ev->data.note.channel; dest_channel = ev->data.note.channel;
if (dest_channel >= chanset->max_channels) { if (dest_channel >= chanset->max_channels) {
snd_printd("dest channel is %d, max is %d\n", pr_debug("ALSA: seq_midi_emul: dest channel is %d, max is %d\n",
dest_channel, chanset->max_channels); dest_channel, chanset->max_channels);
return; return;
} }
...@@ -232,7 +232,7 @@ snd_midi_process_event(struct snd_midi_op *ops, ...@@ -232,7 +232,7 @@ snd_midi_process_event(struct snd_midi_op *ops,
case SNDRV_SEQ_EVENT_ECHO: case SNDRV_SEQ_EVENT_ECHO:
not_yet: not_yet:
default: default:
/*snd_printd("Unimplemented event %d\n", ev->type);*/ /*pr_debug("ALSA: seq_midi_emul: Unimplemented event %d\n", ev->type);*/
break; break;
} }
} }
......
...@@ -135,14 +135,14 @@ struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client, ...@@ -135,14 +135,14 @@ struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client,
return NULL; return NULL;
if (client->num_ports >= SNDRV_SEQ_MAX_PORTS - 1) { if (client->num_ports >= SNDRV_SEQ_MAX_PORTS - 1) {
snd_printk(KERN_WARNING "too many ports for client %d\n", client->number); pr_warn("ALSA: seq: too many ports for client %d\n", client->number);
return NULL; return NULL;
} }
/* create a new port */ /* create a new port */
new_port = kzalloc(sizeof(*new_port), GFP_KERNEL); new_port = kzalloc(sizeof(*new_port), GFP_KERNEL);
if (! new_port) { if (! new_port) {
snd_printd("malloc failed for registering client port\n"); pr_debug("ALSA: seq: malloc failed for registering client port\n");
return NULL; /* failure, out of memory */ return NULL; /* failure, out of memory */
} }
/* init port data */ /* init port data */
......
...@@ -60,7 +60,7 @@ struct snd_seq_prioq *snd_seq_prioq_new(void) ...@@ -60,7 +60,7 @@ struct snd_seq_prioq *snd_seq_prioq_new(void)
f = kzalloc(sizeof(*f), GFP_KERNEL); f = kzalloc(sizeof(*f), GFP_KERNEL);
if (f == NULL) { if (f == NULL) {
snd_printd("oops: malloc failed for snd_seq_prioq_new()\n"); pr_debug("ALSA: seq: malloc failed for snd_seq_prioq_new()\n");
return NULL; return NULL;
} }
...@@ -79,7 +79,7 @@ void snd_seq_prioq_delete(struct snd_seq_prioq **fifo) ...@@ -79,7 +79,7 @@ void snd_seq_prioq_delete(struct snd_seq_prioq **fifo)
*fifo = NULL; *fifo = NULL;
if (f == NULL) { if (f == NULL) {
snd_printd("oops: snd_seq_prioq_delete() called with NULL prioq\n"); pr_debug("ALSA: seq: snd_seq_prioq_delete() called with NULL prioq\n");
return; return;
} }
...@@ -197,7 +197,7 @@ int snd_seq_prioq_cell_in(struct snd_seq_prioq * f, ...@@ -197,7 +197,7 @@ int snd_seq_prioq_cell_in(struct snd_seq_prioq * f,
cur = cur->next; cur = cur->next;
if (! --count) { if (! --count) {
spin_unlock_irqrestore(&f->lock, flags); spin_unlock_irqrestore(&f->lock, flags);
snd_printk(KERN_ERR "cannot find a pointer.. infinite loop?\n"); pr_err("ALSA: seq: cannot find a pointer.. infinite loop?\n");
return -EINVAL; return -EINVAL;
} }
} }
...@@ -223,7 +223,7 @@ struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f) ...@@ -223,7 +223,7 @@ struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f)
unsigned long flags; unsigned long flags;
if (f == NULL) { if (f == NULL) {
snd_printd("oops: snd_seq_prioq_cell_in() called with NULL prioq\n"); pr_debug("ALSA: seq: snd_seq_prioq_cell_in() called with NULL prioq\n");
return NULL; return NULL;
} }
spin_lock_irqsave(&f->lock, flags); spin_lock_irqsave(&f->lock, flags);
...@@ -248,7 +248,7 @@ struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f) ...@@ -248,7 +248,7 @@ struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f)
int snd_seq_prioq_avail(struct snd_seq_prioq * f) int snd_seq_prioq_avail(struct snd_seq_prioq * f)
{ {
if (f == NULL) { if (f == NULL) {
snd_printd("oops: snd_seq_prioq_cell_in() called with NULL prioq\n"); pr_debug("ALSA: seq: snd_seq_prioq_cell_in() called with NULL prioq\n");
return 0; return 0;
} }
return f->cells; return f->cells;
...@@ -259,7 +259,7 @@ int snd_seq_prioq_avail(struct snd_seq_prioq * f) ...@@ -259,7 +259,7 @@ int snd_seq_prioq_avail(struct snd_seq_prioq * f)
struct snd_seq_event_cell *snd_seq_prioq_cell_peek(struct snd_seq_prioq * f) struct snd_seq_event_cell *snd_seq_prioq_cell_peek(struct snd_seq_prioq * f)
{ {
if (f == NULL) { if (f == NULL) {
snd_printd("oops: snd_seq_prioq_cell_in() called with NULL prioq\n"); pr_debug("ALSA: seq: snd_seq_prioq_cell_in() called with NULL prioq\n");
return NULL; return NULL;
} }
return f->head; return f->head;
...@@ -321,7 +321,7 @@ void snd_seq_prioq_leave(struct snd_seq_prioq * f, int client, int timestamp) ...@@ -321,7 +321,7 @@ void snd_seq_prioq_leave(struct snd_seq_prioq * f, int client, int timestamp)
freeprev = cell; freeprev = cell;
} else { } else {
#if 0 #if 0
printk(KERN_DEBUG "type = %i, source = %i, dest = %i, " pr_debug("ALSA: seq: type = %i, source = %i, dest = %i, "
"client = %i\n", "client = %i\n",
cell->event.type, cell->event.type,
cell->event.source.client, cell->event.source.client,
......
...@@ -112,7 +112,7 @@ static struct snd_seq_queue *queue_new(int owner, int locked) ...@@ -112,7 +112,7 @@ static struct snd_seq_queue *queue_new(int owner, int locked)
q = kzalloc(sizeof(*q), GFP_KERNEL); q = kzalloc(sizeof(*q), GFP_KERNEL);
if (q == NULL) { if (q == NULL) {
snd_printd("malloc failed for snd_seq_queue_new()\n"); pr_debug("ALSA: seq: malloc failed for snd_seq_queue_new()\n");
return NULL; return NULL;
} }
......
...@@ -57,7 +57,7 @@ struct snd_seq_timer *snd_seq_timer_new(void) ...@@ -57,7 +57,7 @@ struct snd_seq_timer *snd_seq_timer_new(void)
tmr = kzalloc(sizeof(*tmr), GFP_KERNEL); tmr = kzalloc(sizeof(*tmr), GFP_KERNEL);
if (tmr == NULL) { if (tmr == NULL) {
snd_printd("malloc failed for snd_seq_timer_new() \n"); pr_debug("ALSA: seq: malloc failed for snd_seq_timer_new() \n");
return NULL; return NULL;
} }
spin_lock_init(&tmr->lock); spin_lock_init(&tmr->lock);
...@@ -78,7 +78,7 @@ void snd_seq_timer_delete(struct snd_seq_timer **tmr) ...@@ -78,7 +78,7 @@ void snd_seq_timer_delete(struct snd_seq_timer **tmr)
*tmr = NULL; *tmr = NULL;
if (t == NULL) { if (t == NULL) {
snd_printd("oops: snd_seq_timer_delete() called with NULL timer\n"); pr_debug("ALSA: seq: snd_seq_timer_delete() called with NULL timer\n");
return; return;
} }
t->running = 0; t->running = 0;
...@@ -199,7 +199,7 @@ int snd_seq_timer_set_ppq(struct snd_seq_timer * tmr, int ppq) ...@@ -199,7 +199,7 @@ int snd_seq_timer_set_ppq(struct snd_seq_timer * tmr, int ppq)
/* refuse to change ppq on running timers */ /* refuse to change ppq on running timers */
/* because it will upset the song position (ticks) */ /* because it will upset the song position (ticks) */
spin_unlock_irqrestore(&tmr->lock, flags); spin_unlock_irqrestore(&tmr->lock, flags);
snd_printd("seq: cannot change ppq of a running timer\n"); pr_debug("ALSA: seq: cannot change ppq of a running timer\n");
return -EBUSY; return -EBUSY;
} }
...@@ -252,7 +252,7 @@ int snd_seq_timer_set_skew(struct snd_seq_timer *tmr, unsigned int skew, ...@@ -252,7 +252,7 @@ int snd_seq_timer_set_skew(struct snd_seq_timer *tmr, unsigned int skew,
/* FIXME */ /* FIXME */
if (base != SKEW_BASE) { if (base != SKEW_BASE) {
snd_printd("invalid skew base 0x%x\n", base); pr_debug("ALSA: seq: invalid skew base 0x%x\n", base);
return -EINVAL; return -EINVAL;
} }
spin_lock_irqsave(&tmr->lock, flags); spin_lock_irqsave(&tmr->lock, flags);
...@@ -292,7 +292,7 @@ int snd_seq_timer_open(struct snd_seq_queue *q) ...@@ -292,7 +292,7 @@ int snd_seq_timer_open(struct snd_seq_queue *q)
} }
} }
if (err < 0) { if (err < 0) {
snd_printk(KERN_ERR "seq fatal error: cannot create timer (%i)\n", err); pr_err("ALSA: seq fatal error: cannot create timer (%i)\n", err);
return err; return err;
} }
t->callback = snd_seq_timer_interrupt; t->callback = snd_seq_timer_interrupt;
......
...@@ -446,7 +446,7 @@ static int snd_virmidi_dev_register(struct snd_rawmidi *rmidi) ...@@ -446,7 +446,7 @@ static int snd_virmidi_dev_register(struct snd_rawmidi *rmidi)
/* should check presence of port more strictly.. */ /* should check presence of port more strictly.. */
break; break;
default: default:
snd_printk(KERN_ERR "seq_mode is not set: %d\n", rdev->seq_mode); pr_err("ALSA: seq_virmidi: seq_mode is not set: %d\n", rdev->seq_mode);
return -EINVAL; return -EINVAL;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment