Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62a109d9 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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: default avatarChris Rorvick <chris@rorvick.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent c8491535
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -234,13 +234,14 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm)
		line6pcm->out.pos += urb_frames;
		if (line6pcm->out.pos >= runtime->buffer_size)
			line6pcm->out.pos -= runtime->buffer_size;

		change_volume(urb_out, line6pcm->volume_playback,
			      bytes_per_frame);
	} else {
		memset(urb_out->transfer_buffer, 0,
		       urb_out->transfer_buffer_length);
	}

	change_volume(urb_out, line6pcm->volume_playback, bytes_per_frame);

	if (line6pcm->prev_fbuf != NULL) {
		if (line6pcm->flags & LINE6_BITS_PCM_IMPULSE) {
			create_impulse_test_signal(line6pcm, urb_out,