diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-01-23 10:58:30 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-28 01:21:52 -0500 |
commit | 62a109d9e2ce948ee75222bbb92a97669f683875 (patch) | |
tree | 55760a4a8d5c5b97e4e445f81750e53b9fa3640d /sound/usb/line6 | |
parent | c8491535d7f1a1e8f7f3e0d31e8f7525809c98a1 (diff) |
ALSA: line6: Skip volume manipulation during silence copying
A minor optimization; while pausing, the driver just copies the zero
that doesn't need any volume changes.
Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/line6')
-rw-r--r-- | sound/usb/line6/playback.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/usb/line6/playback.c b/sound/usb/line6/playback.c index cbcd97f5d629..3762a98026aa 100644 --- a/sound/usb/line6/playback.c +++ b/sound/usb/line6/playback.c | |||
@@ -234,13 +234,14 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm) | |||
234 | line6pcm->out.pos += urb_frames; | 234 | line6pcm->out.pos += urb_frames; |
235 | if (line6pcm->out.pos >= runtime->buffer_size) | 235 | if (line6pcm->out.pos >= runtime->buffer_size) |
236 | line6pcm->out.pos -= runtime->buffer_size; | 236 | line6pcm->out.pos -= runtime->buffer_size; |
237 | |||
238 | change_volume(urb_out, line6pcm->volume_playback, | ||
239 | bytes_per_frame); | ||
237 | } else { | 240 | } else { |
238 | memset(urb_out->transfer_buffer, 0, | 241 | memset(urb_out->transfer_buffer, 0, |
239 | urb_out->transfer_buffer_length); | 242 | urb_out->transfer_buffer_length); |
240 | } | 243 | } |
241 | 244 | ||
242 | change_volume(urb_out, line6pcm->volume_playback, bytes_per_frame); | ||
243 | |||
244 | if (line6pcm->prev_fbuf != NULL) { | 245 | if (line6pcm->prev_fbuf != NULL) { |
245 | if (line6pcm->flags & LINE6_BITS_PCM_IMPULSE) { | 246 | if (line6pcm->flags & LINE6_BITS_PCM_IMPULSE) { |
246 | create_impulse_test_signal(line6pcm, urb_out, | 247 | create_impulse_test_signal(line6pcm, urb_out, |