xref: /openbmc/linux/sound/usb/line6/playback.h (revision 61864d844c296933d40c02683252bbea5193b101)
1*61864d84STakashi Iwai /*
2*61864d84STakashi Iwai  * Line6 Linux USB driver - 0.9.1beta
3*61864d84STakashi Iwai  *
4*61864d84STakashi Iwai  * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
5*61864d84STakashi Iwai  *
6*61864d84STakashi Iwai  *	This program is free software; you can redistribute it and/or
7*61864d84STakashi Iwai  *	modify it under the terms of the GNU General Public License as
8*61864d84STakashi Iwai  *	published by the Free Software Foundation, version 2.
9*61864d84STakashi Iwai  *
10*61864d84STakashi Iwai  */
11*61864d84STakashi Iwai 
12*61864d84STakashi Iwai #ifndef PLAYBACK_H
13*61864d84STakashi Iwai #define PLAYBACK_H
14*61864d84STakashi Iwai 
15*61864d84STakashi Iwai #include <sound/pcm.h>
16*61864d84STakashi Iwai 
17*61864d84STakashi Iwai #include "driver.h"
18*61864d84STakashi Iwai 
19*61864d84STakashi Iwai /*
20*61864d84STakashi Iwai  * When the TonePort is used with jack in full duplex mode and the outputs are
21*61864d84STakashi Iwai  * not connected, the software monitor produces an ugly noise since everything
22*61864d84STakashi Iwai  * written to the output buffer (i.e., the input signal) will be repeated in
23*61864d84STakashi Iwai  * the next period (sounds like a delay effect). As a workaround, the output
24*61864d84STakashi Iwai  * buffer is cleared after the data have been read, but there must be a better
25*61864d84STakashi Iwai  * solution. Until one is found, this workaround can be used to fix the
26*61864d84STakashi Iwai  * problem.
27*61864d84STakashi Iwai  */
28*61864d84STakashi Iwai #define USE_CLEAR_BUFFER_WORKAROUND 1
29*61864d84STakashi Iwai 
30*61864d84STakashi Iwai extern struct snd_pcm_ops snd_line6_playback_ops;
31*61864d84STakashi Iwai 
32*61864d84STakashi Iwai extern int line6_create_audio_out_urbs(struct snd_line6_pcm *line6pcm);
33*61864d84STakashi Iwai extern void line6_free_playback_buffer(struct snd_line6_pcm *line6pcm);
34*61864d84STakashi Iwai extern int line6_submit_audio_out_all_urbs(struct snd_line6_pcm *line6pcm);
35*61864d84STakashi Iwai extern void line6_unlink_audio_out_urbs(struct snd_line6_pcm *line6pcm);
36*61864d84STakashi Iwai extern void line6_unlink_wait_clear_audio_out_urbs(struct snd_line6_pcm
37*61864d84STakashi Iwai 						   *line6pcm);
38*61864d84STakashi Iwai extern void line6_wait_clear_audio_out_urbs(struct snd_line6_pcm *line6pcm);
39*61864d84STakashi Iwai extern int snd_line6_playback_trigger(struct snd_line6_pcm *line6pcm, int cmd);
40*61864d84STakashi Iwai 
41*61864d84STakashi Iwai #endif
42