Added the surround plugin to allow simple access for 4.0 and 5.1 speakers.

It needs a bit more work to make it functional.
This commit is contained in:
Jaroslav Kysela 2001-04-13 10:54:56 +00:00
parent edaf7fdf2c
commit c4f95f48c3
13 changed files with 549 additions and 2 deletions

View file

@ -89,6 +89,7 @@ typedef struct {
#define SND_CTL_IOCTL_CLOSE _IO ('U', 0xf2)
#define SND_CTL_IOCTL_POLL_DESCRIPTOR _IO ('U', 0xf3)
#define SND_CTL_IOCTL_ASYNC _IO ('U', 0xf4)
#define SND_CTL_IOCTL_PCM_SURROUND_NEXT_DEVICE _IO ('U', 0xf5)
typedef struct {
int result;
@ -99,6 +100,10 @@ typedef struct {
pid_t pid;
} async;
int device;
struct {
int type;
int device;
} surround;
int subscribe_events;
snd_ctl_card_info_t card_info;
snd_ctl_elem_list_t element_list;

View file

@ -272,6 +272,7 @@ int snd_ctl_elem_write(snd_ctl_t *ctl, snd_ctl_elem_value_t *value);
int snd_ctl_hwdep_next_device(snd_ctl_t *ctl, int * device);
int snd_ctl_hwdep_info(snd_ctl_t *ctl, snd_hwdep_info_t * info);
int snd_ctl_pcm_next_device(snd_ctl_t *ctl, int *device);
int snd_ctl_pcm_surround_next_device(snd_ctl_t *ctl, snd_pcm_surround_type_t type, int *device);
int snd_ctl_pcm_info(snd_ctl_t *ctl, snd_pcm_info_t * info);
int snd_ctl_pcm_prefer_subdevice(snd_ctl_t *ctl, int subdev);
int snd_ctl_rawmidi_next_device(snd_ctl_t *ctl, int * device);

View file

@ -12,7 +12,7 @@ typedef struct _snd_pcm_hw_params snd_pcm_hw_params_t;
/** PCM software configuration container */
typedef struct _snd_pcm_sw_params snd_pcm_sw_params_t;
/** PCM status container */
typedef struct _snd_pcm_status snd_pcm_status_t;
typedef struct _snd_pcm_status snd_pcm_status_t;
/** PCM access types mask */
typedef struct _snd_pcm_access_mask snd_pcm_access_mask_t;
/** PCM formats mask */
@ -196,6 +196,15 @@ typedef enum _snd_pcm_tstamp {
SND_PCM_TSTAMP_LAST = SNDRV_PCM_TSTAMP_LAST,
} snd_pcm_tstamp_t;
/** Surround type */
typedef enum _snd_pcm_surround_type {
/** 4.0 speakers */
SND_PCM_SURROUND_40 = 0,
/** 5.1 speakers */
SND_PCM_SURROUND_51 = 1,
SND_PCM_SURROUND_LAST = SND_PCM_SURROUND_51
} snd_pcm_surround_type_t;
/** Unsigned frames quantity */
typedef sndrv_pcm_uframes_t snd_pcm_uframes_t;
/** Signed frames quantity */
@ -266,6 +275,8 @@ enum _snd_pcm_type {
SND_PCM_TYPE_DROUTE,
/** Loopback server plugin (not yet implemented) */
SND_PCM_TYPE_LBSERVER,
/** Surround plugin */
SND_PCM_TYPE_SURROUND,
};
/** PCM type */