summaryrefslogtreecommitdiff
path: root/sound/usb/line6/pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-27 15:41:27 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-28 07:22:45 +0100
commit2954f914f2816738b800be7909b771f30bf6a856 (patch)
treef8781dd08a016fcbe7053e0362864d76d9d448e8 /sound/usb/line6/pcm.c
parent63e20df1e5b2ef8d871ecbdb6c038d554ed1ca74 (diff)
ALSA: line6: Make common PCM pointer callback
Both playback and capture callbacks are identical, so let's merge them. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/line6/pcm.c')
-rw-r--r--sound/usb/line6/pcm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/usb/line6/pcm.c b/sound/usb/line6/pcm.c
index 470fc1049d54..73c87467d2e0 100644
--- a/sound/usb/line6/pcm.c
+++ b/sound/usb/line6/pcm.c
@@ -266,6 +266,15 @@ int snd_line6_trigger(struct snd_pcm_substream *substream, int cmd)
return 0;
}
+/* common PCM pointer callback */
+snd_pcm_uframes_t snd_line6_pointer(struct snd_pcm_substream *substream)
+{
+ struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
+ struct line6_pcm_stream *pstr = get_stream(line6pcm, substream->stream);
+
+ return pstr->pos_done;
+}
+
/* Acquire and start duplex streams:
* type is either LINE6_STREAM_IMPULSE or LINE6_STREAM_MONITOR
*/