Loading sound/core/timer.c +20 −20 Original line number Diff line number Diff line Loading @@ -422,7 +422,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event) spin_lock_irqsave(&timer->lock, flags); list_for_each_entry(ts, &ti->slave_active_head, active_list) if (ts->ccallback) ts->ccallback(ti, event + 100, &tstamp, resolution); ts->ccallback(ts, event + 100, &tstamp, resolution); spin_unlock_irqrestore(&timer->lock, flags); } Loading Loading @@ -518,9 +518,13 @@ static int _snd_timer_stop(struct snd_timer_instance *timeri, int event) spin_unlock_irqrestore(&slave_active_lock, flags); return -EBUSY; } if (timeri->timer) spin_lock(&timeri->timer->lock); timeri->flags &= ~SNDRV_TIMER_IFLG_RUNNING; list_del_init(&timeri->ack_list); list_del_init(&timeri->active_list); if (timeri->timer) spin_unlock(&timeri->timer->lock); spin_unlock_irqrestore(&slave_active_lock, flags); goto __end; } Loading Loading @@ -1929,6 +1933,7 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer, { struct snd_timer_user *tu; long result = 0, unit; int qhead; int err = 0; tu = file->private_data; Loading @@ -1940,7 +1945,7 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer, if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) { err = -EAGAIN; break; goto _error; } set_current_state(TASK_INTERRUPTIBLE); Loading @@ -1955,42 +1960,37 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer, if (tu->disconnected) { err = -ENODEV; break; goto _error; } if (signal_pending(current)) { err = -ERESTARTSYS; break; goto _error; } } qhead = tu->qhead++; tu->qhead %= tu->queue_size; spin_unlock_irq(&tu->qlock); if (err < 0) goto _error; if (tu->tread) { if (copy_to_user(buffer, &tu->tqueue[tu->qhead++], sizeof(struct snd_timer_tread))) { if (copy_to_user(buffer, &tu->tqueue[qhead], sizeof(struct snd_timer_tread))) err = -EFAULT; goto _error; } } else { if (copy_to_user(buffer, &tu->queue[tu->qhead++], sizeof(struct snd_timer_read))) { if (copy_to_user(buffer, &tu->queue[qhead], sizeof(struct snd_timer_read))) err = -EFAULT; goto _error; } } tu->qhead %= tu->queue_size; result += unit; buffer += unit; spin_lock_irq(&tu->qlock); tu->qused--; if (err < 0) goto _error; result += unit; buffer += unit; } spin_unlock_irq(&tu->qlock); _error: spin_unlock_irq(&tu->qlock); return result > 0 ? result : err; } Loading sound/firewire/digi00x/amdtp-dot.c +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ struct amdtp_dot { #define BYTE_PER_SAMPLE (4) #define MAGIC_DOT_BYTE (2) #define MAGIC_BYTE_OFF(x) (((x) * BYTE_PER_SAMPLE) + MAGIC_DOT_BYTE) static const u8 dot_scrt(const u8 idx, const unsigned int off) static u8 dot_scrt(const u8 idx, const unsigned int off) { /* * the length of the added pattern only depends on the lower nibble Loading sound/firewire/tascam/tascam-transaction.c +6 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,7 @@ int snd_tscm_transaction_register(struct snd_tscm *tscm) return err; error: fw_core_remove_address_handler(&tscm->async_handler); tscm->async_handler.callback_data = NULL; return err; } Loading Loading @@ -276,6 +277,9 @@ void snd_tscm_transaction_unregister(struct snd_tscm *tscm) __be32 reg; unsigned int i; if (tscm->async_handler.callback_data == NULL) return; /* Turn off FireWire LED. */ reg = cpu_to_be32(0x0000008e); snd_fw_transaction(tscm->unit, TCODE_WRITE_QUADLET_REQUEST, Loading @@ -297,6 +301,8 @@ void snd_tscm_transaction_unregister(struct snd_tscm *tscm) ®, sizeof(reg), 0); fw_core_remove_address_handler(&tscm->async_handler); tscm->async_handler.callback_data = NULL; for (i = 0; i < TSCM_MIDI_OUT_PORT_MAX; i++) snd_fw_async_midi_port_destroy(&tscm->out_ports[i]); } sound/firewire/tascam/tascam.c +9 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ static struct snd_tscm_spec model_specs[] = { .pcm_playback_analog_channels = 8, .midi_capture_ports = 4, .midi_playback_ports = 4, .is_controller = true, }, { .name = "FW-1082", Loading @@ -31,9 +30,16 @@ static struct snd_tscm_spec model_specs[] = { .pcm_playback_analog_channels = 2, .midi_capture_ports = 2, .midi_playback_ports = 2, .is_controller = true, }, /* FW-1804 may be supported. */ { .name = "FW-1804", .has_adat = true, .has_spdif = true, .pcm_capture_analog_channels = 8, .pcm_playback_analog_channels = 2, .midi_capture_ports = 2, .midi_playback_ports = 4, }, }; static int identify_model(struct snd_tscm *tscm) Loading sound/firewire/tascam/tascam.h +0 −4 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ struct snd_tscm_spec { unsigned int pcm_playback_analog_channels; unsigned int midi_capture_ports; unsigned int midi_playback_ports; bool is_controller; }; #define TSCM_MIDI_IN_PORT_MAX 4 Loading Loading @@ -72,9 +71,6 @@ struct snd_tscm { struct snd_fw_async_midi_port out_ports[TSCM_MIDI_OUT_PORT_MAX]; u8 running_status[TSCM_MIDI_OUT_PORT_MAX]; bool on_sysex[TSCM_MIDI_OUT_PORT_MAX]; /* For control messages. */ struct snd_firewire_tascam_status *status; }; #define TSCM_ADDR_BASE 0xffff00000000ull Loading Loading
sound/core/timer.c +20 −20 Original line number Diff line number Diff line Loading @@ -422,7 +422,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event) spin_lock_irqsave(&timer->lock, flags); list_for_each_entry(ts, &ti->slave_active_head, active_list) if (ts->ccallback) ts->ccallback(ti, event + 100, &tstamp, resolution); ts->ccallback(ts, event + 100, &tstamp, resolution); spin_unlock_irqrestore(&timer->lock, flags); } Loading Loading @@ -518,9 +518,13 @@ static int _snd_timer_stop(struct snd_timer_instance *timeri, int event) spin_unlock_irqrestore(&slave_active_lock, flags); return -EBUSY; } if (timeri->timer) spin_lock(&timeri->timer->lock); timeri->flags &= ~SNDRV_TIMER_IFLG_RUNNING; list_del_init(&timeri->ack_list); list_del_init(&timeri->active_list); if (timeri->timer) spin_unlock(&timeri->timer->lock); spin_unlock_irqrestore(&slave_active_lock, flags); goto __end; } Loading Loading @@ -1929,6 +1933,7 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer, { struct snd_timer_user *tu; long result = 0, unit; int qhead; int err = 0; tu = file->private_data; Loading @@ -1940,7 +1945,7 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer, if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) { err = -EAGAIN; break; goto _error; } set_current_state(TASK_INTERRUPTIBLE); Loading @@ -1955,42 +1960,37 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer, if (tu->disconnected) { err = -ENODEV; break; goto _error; } if (signal_pending(current)) { err = -ERESTARTSYS; break; goto _error; } } qhead = tu->qhead++; tu->qhead %= tu->queue_size; spin_unlock_irq(&tu->qlock); if (err < 0) goto _error; if (tu->tread) { if (copy_to_user(buffer, &tu->tqueue[tu->qhead++], sizeof(struct snd_timer_tread))) { if (copy_to_user(buffer, &tu->tqueue[qhead], sizeof(struct snd_timer_tread))) err = -EFAULT; goto _error; } } else { if (copy_to_user(buffer, &tu->queue[tu->qhead++], sizeof(struct snd_timer_read))) { if (copy_to_user(buffer, &tu->queue[qhead], sizeof(struct snd_timer_read))) err = -EFAULT; goto _error; } } tu->qhead %= tu->queue_size; result += unit; buffer += unit; spin_lock_irq(&tu->qlock); tu->qused--; if (err < 0) goto _error; result += unit; buffer += unit; } spin_unlock_irq(&tu->qlock); _error: spin_unlock_irq(&tu->qlock); return result > 0 ? result : err; } Loading
sound/firewire/digi00x/amdtp-dot.c +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ struct amdtp_dot { #define BYTE_PER_SAMPLE (4) #define MAGIC_DOT_BYTE (2) #define MAGIC_BYTE_OFF(x) (((x) * BYTE_PER_SAMPLE) + MAGIC_DOT_BYTE) static const u8 dot_scrt(const u8 idx, const unsigned int off) static u8 dot_scrt(const u8 idx, const unsigned int off) { /* * the length of the added pattern only depends on the lower nibble Loading
sound/firewire/tascam/tascam-transaction.c +6 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,7 @@ int snd_tscm_transaction_register(struct snd_tscm *tscm) return err; error: fw_core_remove_address_handler(&tscm->async_handler); tscm->async_handler.callback_data = NULL; return err; } Loading Loading @@ -276,6 +277,9 @@ void snd_tscm_transaction_unregister(struct snd_tscm *tscm) __be32 reg; unsigned int i; if (tscm->async_handler.callback_data == NULL) return; /* Turn off FireWire LED. */ reg = cpu_to_be32(0x0000008e); snd_fw_transaction(tscm->unit, TCODE_WRITE_QUADLET_REQUEST, Loading @@ -297,6 +301,8 @@ void snd_tscm_transaction_unregister(struct snd_tscm *tscm) ®, sizeof(reg), 0); fw_core_remove_address_handler(&tscm->async_handler); tscm->async_handler.callback_data = NULL; for (i = 0; i < TSCM_MIDI_OUT_PORT_MAX; i++) snd_fw_async_midi_port_destroy(&tscm->out_ports[i]); }
sound/firewire/tascam/tascam.c +9 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ static struct snd_tscm_spec model_specs[] = { .pcm_playback_analog_channels = 8, .midi_capture_ports = 4, .midi_playback_ports = 4, .is_controller = true, }, { .name = "FW-1082", Loading @@ -31,9 +30,16 @@ static struct snd_tscm_spec model_specs[] = { .pcm_playback_analog_channels = 2, .midi_capture_ports = 2, .midi_playback_ports = 2, .is_controller = true, }, /* FW-1804 may be supported. */ { .name = "FW-1804", .has_adat = true, .has_spdif = true, .pcm_capture_analog_channels = 8, .pcm_playback_analog_channels = 2, .midi_capture_ports = 2, .midi_playback_ports = 4, }, }; static int identify_model(struct snd_tscm *tscm) Loading
sound/firewire/tascam/tascam.h +0 −4 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ struct snd_tscm_spec { unsigned int pcm_playback_analog_channels; unsigned int midi_capture_ports; unsigned int midi_playback_ports; bool is_controller; }; #define TSCM_MIDI_IN_PORT_MAX 4 Loading Loading @@ -72,9 +71,6 @@ struct snd_tscm { struct snd_fw_async_midi_port out_ports[TSCM_MIDI_OUT_PORT_MAX]; u8 running_status[TSCM_MIDI_OUT_PORT_MAX]; bool on_sysex[TSCM_MIDI_OUT_PORT_MAX]; /* For control messages. */ struct snd_firewire_tascam_status *status; }; #define TSCM_ADDR_BASE 0xffff00000000ull Loading