Blame src/pcm/pcm_direct.h

Packit 4a16fb
/*
Packit 4a16fb
 *  PCM - Direct Stream Mixing
Packit 4a16fb
 *  Copyright (c) 2003 by Jaroslav Kysela <perex@perex.cz>
Packit 4a16fb
 *
Packit 4a16fb
 *
Packit 4a16fb
 *   This library is free software; you can redistribute it and/or modify
Packit 4a16fb
 *   it under the terms of the GNU Lesser General Public License as
Packit 4a16fb
 *   published by the Free Software Foundation; either version 2.1 of
Packit 4a16fb
 *   the License, or (at your option) any later version.
Packit 4a16fb
 *
Packit 4a16fb
 *   This program is distributed in the hope that it will be useful,
Packit 4a16fb
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 4a16fb
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 4a16fb
 *   GNU Lesser General Public License for more details.
Packit 4a16fb
 *
Packit 4a16fb
 *   You should have received a copy of the GNU Lesser General Public
Packit 4a16fb
 *   License along with this library; if not, write to the Free Software
Packit 4a16fb
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit 4a16fb
 *
Packit 4a16fb
 */
Packit 4a16fb
Packit 4a16fb
#include "pcm_local.h"  
Packit 4a16fb
#include "../timer/timer_local.h"
Packit 4a16fb
Packit 4a16fb
#define DIRECT_IPC_SEMS         1
Packit 4a16fb
#define DIRECT_IPC_SEM_CLIENT   0
Packit 4a16fb
/* Seconds representing in Milli seconds */
Packit 4a16fb
#define SEC_TO_MS               1000
Packit 4a16fb
/* slave_period time for low latency requirements in ms */
Packit 4a16fb
#define LOW_LATENCY_PERIOD_TIME 10
Packit 4a16fb
Packit 4a16fb
Packit 4a16fb
typedef void (mix_areas_t)(unsigned int size,
Packit 4a16fb
			   volatile void *dst, void *src,
Packit 4a16fb
			   volatile signed int *sum, size_t dst_step,
Packit 4a16fb
			   size_t src_step, size_t sum_step);
Packit 4a16fb
Packit 4a16fb
typedef void (mix_areas_16_t)(unsigned int size,
Packit 4a16fb
			      volatile signed short *dst, signed short *src,
Packit 4a16fb
			      volatile signed int *sum, size_t dst_step,
Packit 4a16fb
			      size_t src_step, size_t sum_step);
Packit 4a16fb
Packit 4a16fb
typedef void (mix_areas_32_t)(unsigned int size,
Packit 4a16fb
			      volatile signed int *dst, signed int *src,
Packit 4a16fb
			      volatile signed int *sum, size_t dst_step,
Packit 4a16fb
			      size_t src_step, size_t sum_step);
Packit 4a16fb
Packit 4a16fb
typedef void (mix_areas_24_t)(unsigned int size,
Packit 4a16fb
			      volatile unsigned char *dst, unsigned char *src,
Packit 4a16fb
			      volatile signed int *sum, size_t dst_step,
Packit 4a16fb
			      size_t src_step, size_t sum_step);
Packit 4a16fb
Packit 4a16fb
typedef void (mix_areas_u8_t)(unsigned int size,
Packit 4a16fb
			      volatile unsigned char *dst, unsigned char *src,
Packit 4a16fb
			      volatile signed int *sum, size_t dst_step,
Packit 4a16fb
			      size_t src_step, size_t sum_step);
Packit 4a16fb
Packit 4a16fb
typedef enum snd_pcm_direct_hw_ptr_alignment {
Packit 4a16fb
	SND_PCM_HW_PTR_ALIGNMENT_NO = 0,	/* use the hw_ptr as is and do no rounding */
Packit 4a16fb
	SND_PCM_HW_PTR_ALIGNMENT_ROUNDUP = 1,	/* round the slave_appl_ptr up to slave_period */
Packit 4a16fb
	SND_PCM_HW_PTR_ALIGNMENT_ROUNDDOWN = 2,	/* round slave_hw_ptr and slave_appl_ptr down to slave_period */
Packit 4a16fb
	SND_PCM_HW_PTR_ALIGNMENT_AUTO = 3	/* automatic selection */
Packit 4a16fb
} snd_pcm_direct_hw_ptr_alignment_t;
Packit 4a16fb
Packit 4a16fb
struct slave_params {
Packit 4a16fb
	snd_pcm_format_t format;
Packit 4a16fb
	int rate;
Packit 4a16fb
	int channels;
Packit 4a16fb
	int period_time;
Packit 4a16fb
	int buffer_time;
Packit 4a16fb
	snd_pcm_sframes_t period_size;
Packit 4a16fb
	snd_pcm_sframes_t buffer_size;
Packit 4a16fb
	unsigned int periods;
Packit 4a16fb
};
Packit 4a16fb
Packit 4a16fb
/* shared among direct plugin clients - be careful to be 32/64bit compatible! */
Packit 4a16fb
typedef struct {
Packit 4a16fb
	unsigned int magic;			/* magic number */
Packit 4a16fb
	char socket_name[256];			/* name of communication socket */
Packit 4a16fb
	snd_pcm_type_t type;			/* PCM type (currently only hw) */
Packit 4a16fb
	int use_server;
Packit 4a16fb
	struct {
Packit 4a16fb
		unsigned int format;
Packit 4a16fb
		snd_interval_t rate;
Packit 4a16fb
		snd_interval_t buffer_size;
Packit 4a16fb
		snd_interval_t buffer_time;
Packit 4a16fb
		snd_interval_t period_size;
Packit 4a16fb
		snd_interval_t period_time;
Packit 4a16fb
		snd_interval_t periods;
Packit 4a16fb
	} hw;
Packit 4a16fb
	struct {
Packit 4a16fb
		/* copied to slave PCMs */
Packit 4a16fb
		snd_pcm_access_t access;
Packit 4a16fb
		snd_pcm_format_t format;
Packit 4a16fb
		snd_pcm_subformat_t subformat;
Packit 4a16fb
		unsigned int channels;
Packit 4a16fb
		unsigned int rate;
Packit 4a16fb
		unsigned int period_size;
Packit 4a16fb
		unsigned int period_time;
Packit 4a16fb
		snd_interval_t periods;
Packit 4a16fb
		snd_pcm_tstamp_t tstamp_mode;
Packit 4a16fb
		snd_pcm_tstamp_type_t tstamp_type;
Packit 4a16fb
		unsigned int period_step;
Packit 4a16fb
		unsigned int sleep_min; /* not used */
Packit 4a16fb
		unsigned int avail_min;
Packit 4a16fb
		unsigned int start_threshold;	
Packit 4a16fb
		unsigned int stop_threshold;	
Packit 4a16fb
		unsigned int silence_threshold;
Packit 4a16fb
		unsigned int silence_size;
Packit 4a16fb
		unsigned int recoveries;	/* no of executed recoveries on slave*/
Packit 4a16fb
		unsigned long long boundary;
Packit 4a16fb
		unsigned int info;
Packit 4a16fb
		unsigned int msbits;
Packit 4a16fb
		unsigned int rate_num;
Packit 4a16fb
		unsigned int rate_den;
Packit 4a16fb
		unsigned int hw_flags;
Packit 4a16fb
		unsigned int fifo_size;
Packit 4a16fb
		unsigned int buffer_size;
Packit 4a16fb
		snd_interval_t buffer_time;
Packit 4a16fb
		unsigned int sample_bits;
Packit 4a16fb
		unsigned int frame_bits;
Packit 4a16fb
	} s;
Packit 4a16fb
	union {
Packit 4a16fb
		struct {
Packit 4a16fb
			unsigned long long chn_mask;
Packit 4a16fb
		} dshare;
Packit 4a16fb
	} u;
Packit 4a16fb
} snd_pcm_direct_share_t;
Packit 4a16fb
Packit 4a16fb
typedef struct snd_pcm_direct snd_pcm_direct_t;
Packit 4a16fb
Packit 4a16fb
struct snd_pcm_direct {
Packit 4a16fb
	snd_pcm_type_t type;		/* type (dmix, dsnoop, dshare) */
Packit 4a16fb
	key_t ipc_key;			/* IPC key for semaphore and memory */
Packit 4a16fb
	mode_t ipc_perm;		/* IPC socket permissions */
Packit 4a16fb
	int ipc_gid;			/* IPC socket gid */
Packit 4a16fb
	int semid;			/* IPC global semaphore identification */
Packit 4a16fb
	int locked[DIRECT_IPC_SEMS];	/* local lock counter */
Packit 4a16fb
	int shmid;			/* IPC global shared memory identification */
Packit 4a16fb
	snd_pcm_direct_share_t *shmptr;	/* pointer to shared memory area */
Packit 4a16fb
	snd_pcm_t *spcm; 		/* slave PCM handle */
Packit 4a16fb
	snd_pcm_uframes_t appl_ptr;
Packit 4a16fb
	snd_pcm_uframes_t last_appl_ptr;
Packit 4a16fb
	snd_pcm_uframes_t hw_ptr;
Packit 4a16fb
	snd_pcm_uframes_t avail_max;
Packit 4a16fb
	snd_pcm_uframes_t slave_appl_ptr;
Packit 4a16fb
	snd_pcm_uframes_t slave_hw_ptr;
Packit 4a16fb
	snd_pcm_uframes_t slave_period_size;
Packit 4a16fb
	snd_pcm_uframes_t slave_buffer_size;
Packit 4a16fb
	snd_pcm_uframes_t slave_boundary;
Packit 4a16fb
	int (*sync_ptr)(snd_pcm_t *pcm);
Packit 4a16fb
	snd_pcm_state_t state;
Packit 4a16fb
	snd_htimestamp_t trigger_tstamp;
Packit 4a16fb
	snd_htimestamp_t update_tstamp;
Packit 4a16fb
	int server, client;
Packit 4a16fb
	int comm_fd;			/* communication file descriptor (socket) */
Packit 4a16fb
	int hw_fd;			/* hardware file descriptor */
Packit 4a16fb
	struct pollfd timer_fd;
Packit 4a16fb
	int poll_fd;
Packit 4a16fb
	int tread: 1;
Packit 4a16fb
	int timer_need_poll: 1;
Packit 4a16fb
	unsigned int timer_events;
Packit 4a16fb
	unsigned int timer_ticks;
Packit 4a16fb
	int server_fd;
Packit 4a16fb
	pid_t server_pid;
Packit 4a16fb
	snd_timer_t *timer; 		/* timer used as poll_fd */
Packit 4a16fb
	int interleaved;	 	/* we have interleaved buffer */
Packit 4a16fb
	int slowptr;			/* use slow but more precise ptr updates */
Packit 4a16fb
	int max_periods;		/* max periods (-1 = fixed periods, 0 = max buffer size) */
Packit 4a16fb
	int var_periodsize;		/* allow variable period size if max_periods is != -1*/
Packit 4a16fb
	unsigned int channels;		/* client's channels */
Packit 4a16fb
	unsigned int *bindings;
Packit 4a16fb
	unsigned int recoveries;	/* mirror of executed recoveries on slave */
Packit 4a16fb
	int direct_memory_access;	/* use arch-optimized buffer RW */
Packit 4a16fb
	snd_pcm_direct_hw_ptr_alignment_t hw_ptr_alignment;
Packit 4a16fb
	union {
Packit 4a16fb
		struct {
Packit 4a16fb
			int shmid_sum;			/* IPC global sum ring buffer memory identification */
Packit 4a16fb
			signed int *sum_buffer;		/* shared sum buffer */
Packit 4a16fb
			mix_areas_16_t *mix_areas_16;
Packit 4a16fb
			mix_areas_32_t *mix_areas_32;
Packit 4a16fb
			mix_areas_24_t *mix_areas_24;
Packit 4a16fb
			mix_areas_u8_t *mix_areas_u8;
Packit 4a16fb
			mix_areas_16_t *remix_areas_16;
Packit 4a16fb
			mix_areas_32_t *remix_areas_32;
Packit 4a16fb
			mix_areas_24_t *remix_areas_24;
Packit 4a16fb
			mix_areas_u8_t *remix_areas_u8;
Packit 4a16fb
		} dmix;
Packit 4a16fb
		struct {
Packit 4a16fb
			unsigned long long chn_mask;
Packit 4a16fb
		} dshare;
Packit 4a16fb
	} u;
Packit 4a16fb
	void (*server_free)(snd_pcm_direct_t *direct);
Packit 4a16fb
};
Packit 4a16fb
Packit 4a16fb
/* make local functions really local */
Packit 4a16fb
#define snd_pcm_direct_semaphore_create_or_connect \
Packit 4a16fb
	snd1_pcm_direct_semaphore_create_or_connect
Packit 4a16fb
#define snd_pcm_direct_shm_create_or_connect \
Packit 4a16fb
	snd1_pcm_direct_shm_create_or_connect
Packit 4a16fb
#define snd_pcm_direct_shm_discard \
Packit 4a16fb
	snd1_pcm_direct_shm_discard
Packit 4a16fb
#define snd_pcm_direct_server_create \
Packit 4a16fb
	snd1_pcm_direct_server_create
Packit 4a16fb
#define snd_pcm_direct_server_discard \
Packit 4a16fb
	snd1_pcm_direct_server_discard
Packit 4a16fb
#define snd_pcm_direct_client_connect \
Packit 4a16fb
	snd1_pcm_direct_client_connect
Packit 4a16fb
#define snd_pcm_direct_client_discard \
Packit 4a16fb
	snd1_pcm_direct_client_discard
Packit 4a16fb
#define snd_pcm_direct_initialize_slave \
Packit 4a16fb
	snd1_pcm_direct_initialize_slave
Packit 4a16fb
#define snd_pcm_direct_initialize_secondary_slave \
Packit 4a16fb
	snd1_pcm_direct_initialize_secondary_slave
Packit 4a16fb
#define snd_pcm_direct_initialize_poll_fd \
Packit 4a16fb
	snd1_pcm_direct_initialize_poll_fd
Packit 4a16fb
#define snd_pcm_direct_check_interleave \
Packit 4a16fb
	snd1_pcm_direct_check_interleave
Packit 4a16fb
#define snd_pcm_direct_parse_bindings \
Packit 4a16fb
	snd1_pcm_direct_parse_bindings
Packit 4a16fb
#define snd_pcm_direct_nonblock \
Packit 4a16fb
	snd1_pcm_direct_nonblock
Packit 4a16fb
#define snd_pcm_direct_async \
Packit 4a16fb
	snd1_pcm_direct_async
Packit 4a16fb
#define snd_pcm_direct_poll_revents \
Packit 4a16fb
	snd1_pcm_direct_poll_revents
Packit 4a16fb
#define snd_pcm_direct_info \
Packit 4a16fb
	snd1_pcm_direct_info
Packit 4a16fb
#define snd_pcm_direct_hw_refine \
Packit 4a16fb
	snd1_pcm_direct_hw_refine
Packit 4a16fb
#define snd_pcm_direct_hw_params \
Packit 4a16fb
	snd1_pcm_direct_hw_params
Packit 4a16fb
#define snd_pcm_direct_hw_free \
Packit 4a16fb
	snd1_pcm_direct_hw_free
Packit 4a16fb
#define snd_pcm_direct_sw_params \
Packit 4a16fb
	snd1_pcm_direct_sw_params
Packit 4a16fb
#define snd_pcm_direct_channel_info \
Packit 4a16fb
	snd1_pcm_direct_channel_info
Packit 4a16fb
#define snd_pcm_direct_mmap \
Packit 4a16fb
	snd1_pcm_direct_mmap
Packit 4a16fb
#define snd_pcm_direct_munmap \
Packit 4a16fb
	snd1_pcm_direct_munmap
Packit 4a16fb
#define snd_pcm_direct_prepare \
Packit 4a16fb
	snd1_pcm_direct_prepare
Packit 4a16fb
#define snd_pcm_direct_resume \
Packit 4a16fb
	snd1_pcm_direct_resume
Packit 4a16fb
#define snd_pcm_direct_timer_stop \
Packit 4a16fb
	snd1_pcm_direct_timer_stop
Packit 4a16fb
#define snd_pcm_direct_clear_timer_queue \
Packit 4a16fb
	snd1_pcm_direct_clear_timer_queue
Packit 4a16fb
#define snd_pcm_direct_set_timer_params \
Packit 4a16fb
	snd1_pcm_direct_set_timer_params
Packit 4a16fb
#define snd_pcm_direct_open_secondary_client \
Packit 4a16fb
	snd1_pcm_direct_open_secondary_client
Packit 4a16fb
#define snd_pcm_direct_parse_open_conf \
Packit 4a16fb
	snd1_pcm_direct_parse_open_conf
Packit 4a16fb
#define snd_pcm_direct_query_chmaps \
Packit 4a16fb
	snd1_pcm_direct_query_chmaps
Packit 4a16fb
#define snd_pcm_direct_get_chmap \
Packit 4a16fb
	snd1_pcm_direct_get_chmap
Packit 4a16fb
#define snd_pcm_direct_set_chmap \
Packit 4a16fb
	snd1_pcm_direct_set_chmap
Packit 4a16fb
#define snd_pcm_direct_reset_slave_ptr \
Packit 4a16fb
	snd1_pcm_direct_reset_slave_ptr
Packit 4a16fb
Packit 4a16fb
int snd_pcm_direct_semaphore_create_or_connect(snd_pcm_direct_t *dmix);
Packit 4a16fb
Packit 4a16fb
static inline int snd_pcm_direct_semaphore_discard(snd_pcm_direct_t *dmix)
Packit 4a16fb
{
Packit 4a16fb
	if (dmix->semid >= 0) {
Packit 4a16fb
		if (semctl(dmix->semid, 0, IPC_RMID, NULL) < 0)
Packit 4a16fb
			return -errno;
Packit 4a16fb
		dmix->semid = -1;
Packit 4a16fb
	}
Packit 4a16fb
	return 0;
Packit 4a16fb
}
Packit 4a16fb
Packit 4a16fb
static inline int snd_pcm_direct_semaphore_down(snd_pcm_direct_t *dmix, int sem_num)
Packit 4a16fb
{
Packit 4a16fb
	struct sembuf op[2] = { { sem_num, 0, 0 }, { sem_num, 1, SEM_UNDO } };
Packit 4a16fb
	int err = semop(dmix->semid, op, 2);
Packit 4a16fb
	if (err == 0)
Packit 4a16fb
		dmix->locked[sem_num]++;
Packit 4a16fb
	else if (err == -1)
Packit 4a16fb
		err = -errno;
Packit 4a16fb
	return err;
Packit 4a16fb
}
Packit 4a16fb
Packit 4a16fb
static inline int snd_pcm_direct_semaphore_up(snd_pcm_direct_t *dmix, int sem_num)
Packit 4a16fb
{
Packit 4a16fb
	struct sembuf op = { sem_num, -1, SEM_UNDO | IPC_NOWAIT };
Packit 4a16fb
	int err = semop(dmix->semid, &op, 1);
Packit 4a16fb
	if (err == 0)
Packit 4a16fb
		dmix->locked[sem_num]--;
Packit 4a16fb
	else if (err == -1)
Packit 4a16fb
		err = -errno;
Packit 4a16fb
	return err;
Packit 4a16fb
}
Packit 4a16fb
Packit 4a16fb
static inline int snd_pcm_direct_semaphore_final(snd_pcm_direct_t *dmix, int sem_num)
Packit 4a16fb
{
Packit 4a16fb
	if (dmix->locked[sem_num] != 1) {
Packit 4a16fb
		SNDMSG("invalid semaphore count to finalize %d: %d", sem_num, dmix->locked[sem_num]);
Packit 4a16fb
		return -EBUSY;
Packit 4a16fb
	}
Packit 4a16fb
	return snd_pcm_direct_semaphore_up(dmix, sem_num);
Packit 4a16fb
}
Packit 4a16fb
Packit 4a16fb
int snd_pcm_direct_shm_create_or_connect(snd_pcm_direct_t *dmix);
Packit 4a16fb
int snd_pcm_direct_shm_discard(snd_pcm_direct_t *dmix);
Packit 4a16fb
int snd_pcm_direct_server_create(snd_pcm_direct_t *dmix);
Packit 4a16fb
int snd_pcm_direct_server_discard(snd_pcm_direct_t *dmix);
Packit 4a16fb
int snd_pcm_direct_client_connect(snd_pcm_direct_t *dmix);
Packit 4a16fb
int snd_pcm_direct_client_discard(snd_pcm_direct_t *dmix);
Packit 4a16fb
int snd_pcm_direct_initialize_slave(snd_pcm_direct_t *dmix, snd_pcm_t *spcm, struct slave_params *params);
Packit 4a16fb
int snd_pcm_direct_initialize_secondary_slave(snd_pcm_direct_t *dmix, snd_pcm_t *spcm, struct slave_params *params);
Packit 4a16fb
int snd_pcm_direct_initialize_poll_fd(snd_pcm_direct_t *dmix);
Packit 4a16fb
int snd_pcm_direct_check_interleave(snd_pcm_direct_t *dmix, snd_pcm_t *pcm);
Packit 4a16fb
int snd_pcm_direct_parse_bindings(snd_pcm_direct_t *dmix,
Packit 4a16fb
				  struct slave_params *params,
Packit 4a16fb
				  snd_config_t *cfg);
Packit 4a16fb
int snd_pcm_direct_nonblock(snd_pcm_t *pcm, int nonblock);
Packit 4a16fb
int snd_pcm_direct_async(snd_pcm_t *pcm, int sig, pid_t pid);
Packit 4a16fb
int snd_pcm_direct_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds,
Packit 4a16fb
				    unsigned int space);
Packit 4a16fb
int snd_pcm_direct_poll_revents(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
Packit 4a16fb
int snd_pcm_direct_info(snd_pcm_t *pcm, snd_pcm_info_t * info);
Packit 4a16fb
int snd_pcm_direct_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
Packit 4a16fb
int snd_pcm_direct_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params);
Packit 4a16fb
int snd_pcm_direct_hw_free(snd_pcm_t *pcm);
Packit 4a16fb
int snd_pcm_direct_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t * params);
Packit 4a16fb
int snd_pcm_direct_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t * info);
Packit 4a16fb
int snd_pcm_direct_mmap(snd_pcm_t *pcm);
Packit 4a16fb
int snd_pcm_direct_munmap(snd_pcm_t *pcm);
Packit 4a16fb
int snd_pcm_direct_prepare(snd_pcm_t *pcm);
Packit 4a16fb
int snd_pcm_direct_resume(snd_pcm_t *pcm);
Packit 4a16fb
int snd_pcm_direct_timer_stop(snd_pcm_direct_t *dmix);
Packit 4a16fb
int snd_pcm_direct_clear_timer_queue(snd_pcm_direct_t *dmix);
Packit 4a16fb
int snd_pcm_direct_set_timer_params(snd_pcm_direct_t *dmix);
Packit 4a16fb
int snd_pcm_direct_open_secondary_client(snd_pcm_t **spcmp, snd_pcm_direct_t *dmix, const char *client_name);
Packit 4a16fb
Packit 4a16fb
snd_pcm_chmap_query_t **snd_pcm_direct_query_chmaps(snd_pcm_t *pcm);
Packit 4a16fb
snd_pcm_chmap_t *snd_pcm_direct_get_chmap(snd_pcm_t *pcm);
Packit 4a16fb
int snd_pcm_direct_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map);
Packit 4a16fb
int snd_pcm_direct_slave_recover(snd_pcm_direct_t *direct);
Packit 4a16fb
int snd_pcm_direct_client_chk_xrun(snd_pcm_direct_t *direct, snd_pcm_t *pcm);
Packit 4a16fb
int snd_timer_async(snd_timer_t *timer, int sig, pid_t pid);
Packit 4a16fb
struct timespec snd_pcm_hw_fast_tstamp(snd_pcm_t *pcm);
Packit 4a16fb
void snd_pcm_direct_reset_slave_ptr(snd_pcm_t *pcm, snd_pcm_direct_t *dmix);
Packit 4a16fb
Packit 4a16fb
struct snd_pcm_direct_open_conf {
Packit 4a16fb
	key_t ipc_key;
Packit 4a16fb
	mode_t ipc_perm;
Packit 4a16fb
	int ipc_gid;
Packit 4a16fb
	int slowptr;
Packit 4a16fb
	int max_periods;
Packit 4a16fb
	int var_periodsize;
Packit 4a16fb
	int direct_memory_access;
Packit 4a16fb
	snd_pcm_direct_hw_ptr_alignment_t hw_ptr_alignment;
Packit 4a16fb
	snd_config_t *slave;
Packit 4a16fb
	snd_config_t *bindings;
Packit 4a16fb
};
Packit 4a16fb
Packit 4a16fb
int snd_pcm_direct_parse_open_conf(snd_config_t *root, snd_config_t *conf, int stream, struct snd_pcm_direct_open_conf *rec);