mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-16 22:05:18 -05:00
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:
parent
edaf7fdf2c
commit
c4f95f48c3
13 changed files with 549 additions and 2 deletions
|
|
@ -249,6 +249,21 @@ static int snd_ctl_shm_pcm_next_device(snd_ctl_t *ctl, int * device)
|
|||
return err;
|
||||
}
|
||||
|
||||
static int snd_ctl_shm_pcm_surround_next_device(snd_ctl_t *ctl, snd_pcm_surround_type_t type, int * device)
|
||||
{
|
||||
snd_ctl_shm_t *shm = ctl->private_data;
|
||||
volatile snd_ctl_shm_ctrl_t *ctrl = shm->ctrl;
|
||||
int err;
|
||||
ctrl->u.surround.type = type;
|
||||
ctrl->u.surround.device = *device;
|
||||
ctrl->cmd = SND_CTL_IOCTL_PCM_SURROUND_NEXT_DEVICE;
|
||||
err = snd_ctl_shm_action(ctl);
|
||||
if (err < 0)
|
||||
return err;
|
||||
*device = ctrl->u.device;
|
||||
return err;
|
||||
}
|
||||
|
||||
static int snd_ctl_shm_pcm_info(snd_ctl_t *ctl, snd_pcm_info_t * info)
|
||||
{
|
||||
snd_ctl_shm_t *shm = ctl->private_data;
|
||||
|
|
@ -350,6 +365,7 @@ snd_ctl_ops_t snd_ctl_shm_ops = {
|
|||
hwdep_next_device: snd_ctl_shm_hwdep_next_device,
|
||||
hwdep_info: snd_ctl_shm_hwdep_info,
|
||||
pcm_next_device: snd_ctl_shm_pcm_next_device,
|
||||
pcm_surround_next_device: snd_ctl_shm_pcm_surround_next_device,
|
||||
pcm_info: snd_ctl_shm_pcm_info,
|
||||
pcm_prefer_subdevice: snd_ctl_shm_pcm_prefer_subdevice,
|
||||
rawmidi_next_device: snd_ctl_shm_rawmidi_next_device,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue