Commit 3b35de41 authored by Markus Grabner's avatar Markus Grabner Committed by Greg Kroah-Hartman

staging/line6: Remove obsolete code

This patch removes experimental code which is no longer used.
Signed-off-by: default avatarMarkus Grabner <grabner@icg.tugraz.at>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 251c3948
...@@ -244,11 +244,7 @@ static void audio_in_callback(struct urb *urb) ...@@ -244,11 +244,7 @@ static void audio_in_callback(struct urb *urb)
length += fsize; length += fsize;
/* the following assumes LINE6_ISO_PACKETS == 1: */ /* the following assumes LINE6_ISO_PACKETS == 1: */
#if LINE6_BACKUP_MONITOR_SIGNAL
memcpy(line6pcm->prev_fbuf, fbuf, fsize);
#else
line6pcm->prev_fbuf = fbuf; line6pcm->prev_fbuf = fbuf;
#endif
line6pcm->prev_fsize = fsize; line6pcm->prev_fsize = fsize;
#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE #ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
......
...@@ -93,21 +93,7 @@ int line6_pcm_start(struct snd_line6_pcm *line6pcm, int channels) ...@@ -93,21 +93,7 @@ int line6_pcm_start(struct snd_line6_pcm *line6pcm, int channels)
unsigned long flags_new = flags_old | channels; unsigned long flags_new = flags_old | channels;
int err = 0; int err = 0;
#if LINE6_BACKUP_MONITOR_SIGNAL
if (!(line6pcm->line6->properties->capabilities & LINE6_BIT_HWMON)) {
line6pcm->prev_fbuf =
kmalloc(LINE6_ISO_PACKETS * line6pcm->max_packet_size,
GFP_KERNEL);
if (!line6pcm->prev_fbuf) {
dev_err(line6pcm->line6->ifcdev,
"cannot malloc monitor buffer\n");
return -ENOMEM;
}
}
#else
line6pcm->prev_fbuf = NULL; line6pcm->prev_fbuf = NULL;
#endif
if (((flags_old & MASK_CAPTURE) == 0) && if (((flags_old & MASK_CAPTURE) == 0) &&
((flags_new & MASK_CAPTURE) != 0)) { ((flags_new & MASK_CAPTURE) != 0)) {
...@@ -164,9 +150,6 @@ int line6_pcm_stop(struct snd_line6_pcm *line6pcm, int channels) ...@@ -164,9 +150,6 @@ int line6_pcm_stop(struct snd_line6_pcm *line6pcm, int channels)
((flags_new & MASK_PLAYBACK) == 0)) { ((flags_new & MASK_PLAYBACK) == 0)) {
line6_unlink_audio_out_urbs(line6pcm); line6_unlink_audio_out_urbs(line6pcm);
} }
#if LINE6_BACKUP_MONITOR_SIGNAL
kfree(line6pcm->prev_fbuf);
#endif
return 0; return 0;
} }
......
...@@ -39,9 +39,6 @@ ...@@ -39,9 +39,6 @@
#define LINE6_IMPULSE_DEFAULT_PERIOD 100 #define LINE6_IMPULSE_DEFAULT_PERIOD 100
#endif #endif
#define LINE6_BACKUP_MONITOR_SIGNAL 0
#define LINE6_REUSE_DMA_AREA_FOR_PLAYBACK 0
/* /*
Get substream from Line6 PCM data structure Get substream from Line6 PCM data structure
*/ */
......
...@@ -223,18 +223,10 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm) ...@@ -223,18 +223,10 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm)
} else } else
dev_err(line6pcm->line6->ifcdev, "driver bug: len = %d\n", len); /* this is somewhat paranoid */ dev_err(line6pcm->line6->ifcdev, "driver bug: len = %d\n", len); /* this is somewhat paranoid */
} else { } else {
#if LINE6_REUSE_DMA_AREA_FOR_PLAYBACK
/* set the buffer pointer */
urb_out->transfer_buffer =
runtime->dma_area +
line6pcm->pos_out * bytes_per_frame;
#else
/* copy data */
memcpy(urb_out->transfer_buffer, memcpy(urb_out->transfer_buffer,
runtime->dma_area + runtime->dma_area +
line6pcm->pos_out * bytes_per_frame, line6pcm->pos_out * bytes_per_frame,
urb_out->transfer_buffer_length); urb_out->transfer_buffer_length);
#endif
} }
line6pcm->pos_out += urb_frames; line6pcm->pos_out += urb_frames;
......
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