161864d84STakashi Iwai /* 261864d84STakashi Iwai * Line6 Linux USB driver - 0.9.1beta 361864d84STakashi Iwai * 461864d84STakashi Iwai * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at) 561864d84STakashi Iwai * 661864d84STakashi Iwai * This program is free software; you can redistribute it and/or 761864d84STakashi Iwai * modify it under the terms of the GNU General Public License as 861864d84STakashi Iwai * published by the Free Software Foundation, version 2. 961864d84STakashi Iwai * 1061864d84STakashi Iwai */ 1161864d84STakashi Iwai 1261864d84STakashi Iwai #ifndef PLAYBACK_H 1361864d84STakashi Iwai #define PLAYBACK_H 1461864d84STakashi Iwai 1561864d84STakashi Iwai #include <sound/pcm.h> 1661864d84STakashi Iwai 1761864d84STakashi Iwai #include "driver.h" 1861864d84STakashi Iwai 1961864d84STakashi Iwai /* 2061864d84STakashi Iwai * When the TonePort is used with jack in full duplex mode and the outputs are 2161864d84STakashi Iwai * not connected, the software monitor produces an ugly noise since everything 2261864d84STakashi Iwai * written to the output buffer (i.e., the input signal) will be repeated in 2361864d84STakashi Iwai * the next period (sounds like a delay effect). As a workaround, the output 2461864d84STakashi Iwai * buffer is cleared after the data have been read, but there must be a better 2561864d84STakashi Iwai * solution. Until one is found, this workaround can be used to fix the 2661864d84STakashi Iwai * problem. 2761864d84STakashi Iwai */ 2861864d84STakashi Iwai #define USE_CLEAR_BUFFER_WORKAROUND 1 2961864d84STakashi Iwai 3061864d84STakashi Iwai extern struct snd_pcm_ops snd_line6_playback_ops; 3161864d84STakashi Iwai 3261864d84STakashi Iwai extern int line6_create_audio_out_urbs(struct snd_line6_pcm *line6pcm); 3361864d84STakashi Iwai extern void line6_free_playback_buffer(struct snd_line6_pcm *line6pcm); 3461864d84STakashi Iwai extern int line6_submit_audio_out_all_urbs(struct snd_line6_pcm *line6pcm); 3561864d84STakashi Iwai extern void line6_unlink_audio_out_urbs(struct snd_line6_pcm *line6pcm); 3661864d84STakashi Iwai extern void line6_unlink_wait_clear_audio_out_urbs(struct snd_line6_pcm 3761864d84STakashi Iwai *line6pcm); 3861864d84STakashi Iwai extern void line6_wait_clear_audio_out_urbs(struct snd_line6_pcm *line6pcm); 3961864d84STakashi Iwai extern int snd_line6_playback_trigger(struct snd_line6_pcm *line6pcm, int cmd); 4061864d84STakashi Iwai 4161864d84STakashi Iwai #endif 42