Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sound/pcm/vchan.h
Show All 24 Lines | |||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
*/ | */ | ||||
#ifndef _SND_VCHAN_H_ | #ifndef _SND_VCHAN_H_ | ||||
#define _SND_VCHAN_H_ | #define _SND_VCHAN_H_ | ||||
extern int snd_maxautovchans; | extern bool snd_vchans_enable; | ||||
int vchan_create(struct pcm_channel *); | int vchan_create(struct pcm_channel *, struct pcm_channel **); | ||||
int vchan_destroy(struct pcm_channel *); | int vchan_destroy(struct pcm_channel *); | ||||
#ifdef SND_DEBUG | #ifdef SND_DEBUG | ||||
int vchan_passthrough(struct pcm_channel *, const char *); | int vchan_passthrough(struct pcm_channel *, const char *); | ||||
#define vchan_sync(c) vchan_passthrough(c, __func__) | #define vchan_sync(c) vchan_passthrough(c, __func__) | ||||
#else | #else | ||||
int vchan_sync(struct pcm_channel *); | int vchan_sync(struct pcm_channel *); | ||||
#endif | #endif | ||||
#define VCHAN_SYNC_REQUIRED(c) \ | #define VCHAN_SYNC_REQUIRED(c) \ | ||||
(((c)->flags & CHN_F_VIRTUAL) && (((c)->flags & CHN_F_DIRTY) || \ | (((c)->flags & CHN_F_VIRTUAL) && (((c)->flags & CHN_F_DIRTY) || \ | ||||
sndbuf_getfmt((c)->bufhard) != (c)->parentchannel->format || \ | sndbuf_getfmt((c)->bufhard) != (c)->parentchannel->format || \ | ||||
sndbuf_getspd((c)->bufhard) != (c)->parentchannel->speed)) | sndbuf_getspd((c)->bufhard) != (c)->parentchannel->speed)) | ||||
int vchan_setnew(struct snddev_info *, int, int); | |||||
void vchan_setmaxauto(struct snddev_info *, int); | |||||
void vchan_initsys(device_t); | void vchan_initsys(device_t); | ||||
/* | /* | ||||
* Default format / rate | * Default format / rate | ||||
*/ | */ | ||||
#define VCHAN_DEFAULT_FORMAT SND_FORMAT(AFMT_S16_LE, 2, 0) | #define VCHAN_DEFAULT_FORMAT SND_FORMAT(AFMT_S16_LE, 2, 0) | ||||
#define VCHAN_DEFAULT_RATE 48000 | #define VCHAN_DEFAULT_RATE 48000 | ||||
Show All 16 Lines |