]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Removed snd_ctl_pcm_surround_next_device function.
authorJaroslav Kysela <perex@perex.cz>
Thu, 3 May 2001 15:11:35 +0000 (15:11 +0000)
committerJaroslav Kysela <perex@perex.cz>
Thu, 3 May 2001 15:11:35 +0000 (15:11 +0000)
aserver/aserver.c
include/aserver.h
include/control.h
include/pcm.h
src/control/control.c
src/control/control_hw.c
src/control/control_local.h
src/control/control_shm.c
src/pcm/pcm_local.h
src/pcm/pcm_surr.c

index c2a6dad4c5bbd5aaac0e969e0646137946013296..c52c1147adba97e262012a4b5f74b1884ae65878 100644 (file)
@@ -617,9 +617,6 @@ static int ctl_shm_cmd(client_t *client)
        case SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE:
                ctrl->result = snd_ctl_pcm_next_device(ctl, &ctrl->u.device);
                break;
-       case SND_CTL_IOCTL_PCM_SURROUND_NEXT_DEVICE:
-               ctrl->result = snd_ctl_pcm_surround_next_device(ctl, ctrl->u.surround.type, &ctrl->u.surround.device);
-               break;
        case SNDRV_CTL_IOCTL_PCM_INFO:
                ctrl->result = snd_ctl_pcm_info(ctl, &ctrl->u.pcm_info);
                break;
index 365afacaa0b5ac690066027050eae873af545a33..344167aab43e198edd48e982044bb5c781c95ea2 100644 (file)
@@ -90,7 +90,6 @@ 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;
@@ -101,10 +100,6 @@ typedef struct {
                        pid_t pid;
                } async;
                int device;
-               struct {
-                       snd_pcm_surround_type_t type;
-                       int device;
-               } surround;
                int subscribe_events;
                snd_ctl_card_info_t card_info;
                snd_ctl_elem_list_t element_list;
index d5818229e57d9f86ca6c7df1615121b74811ee95..84e49a4c95594fc9f0cf8286d913707437c955f8 100644 (file)
@@ -280,7 +280,6 @@ int snd_ctl_elem_unlock(snd_ctl_t *ctl, snd_ctl_elem_id_t *id);
 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);
index ec9c0797a037e56b0c65332303c8a7a3c0e357cd..47a5fa73f677a30947b43bd3f041f939701e1caa 100644 (file)
@@ -202,15 +202,6 @@ 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 */
index b888bd8031bf4147c2b18d6d23616393ba50e1af..94d1c1a8384436c50b407bd63104824e9f756079 100644 (file)
@@ -289,19 +289,6 @@ int snd_ctl_pcm_next_device(snd_ctl_t *ctl, int * device)
        return ctl->ops->pcm_next_device(ctl, device);
 }
 
-/**
- * \brief Get next PCM surround device number
- * \param ctl CTL handle
- * \param type surround type
- * \param device current device on entry and next device on return
- * \return 0 on success otherwise a negative error code
- */
-int snd_ctl_pcm_surround_next_device(snd_ctl_t *ctl, snd_pcm_surround_type_t type, int * device)
-{
-       assert(ctl && device);
-       return ctl->ops->pcm_surround_next_device(ctl, type, device);
-}
-
 /**
  * \brief Get info about a PCM device
  * \param ctl CTL handle
index 51966db794253ea0c222f9bf043fde698b32425b..e99c2544b2a1dfc61c3e5743338d8f9eb130f45e 100644 (file)
@@ -203,13 +203,6 @@ static int snd_ctl_hw_pcm_next_device(snd_ctl_t *handle, int * device)
        return 0;
 }
 
-extern int snd_pcm_surround_next_device(snd_ctl_t *ctl, snd_pcm_surround_type_t type, int *device);
-
-static int snd_ctl_hw_pcm_surround_next_device(snd_ctl_t *handle, snd_pcm_surround_type_t type, int * device)
-{
-       return snd_pcm_surround_next_device(handle, type, device);
-}
-
 static int snd_ctl_hw_pcm_info(snd_ctl_t *handle, snd_pcm_info_t * info)
 {
        snd_ctl_hw_t *hw = handle->private_data;
@@ -276,7 +269,6 @@ snd_ctl_ops_t snd_ctl_hw_ops = {
        hwdep_next_device: snd_ctl_hw_hwdep_next_device,
        hwdep_info: snd_ctl_hw_hwdep_info,
        pcm_next_device: snd_ctl_hw_pcm_next_device,
-       pcm_surround_next_device: snd_ctl_hw_pcm_surround_next_device,
        pcm_info: snd_ctl_hw_pcm_info,
        pcm_prefer_subdevice: snd_ctl_hw_pcm_prefer_subdevice,
        rawmidi_next_device: snd_ctl_hw_rawmidi_next_device,
index 69ae2faa84d31bb2f50edcd412f797256892223a..01b8013a8cc6f661e94dd8d022dcacfc726e9859 100644 (file)
@@ -38,7 +38,6 @@ typedef struct _snd_ctl_ops {
        int (*hwdep_next_device)(snd_ctl_t *handle, int *device);
        int (*hwdep_info)(snd_ctl_t *handle, snd_hwdep_info_t * info);
        int (*pcm_next_device)(snd_ctl_t *handle, int *device);
-       int (*pcm_surround_next_device)(snd_ctl_t *handle, snd_pcm_surround_type_t type, int *device);
        int (*pcm_info)(snd_ctl_t *handle, snd_pcm_info_t * info);
        int (*pcm_prefer_subdevice)(snd_ctl_t *handle, int subdev);
        int (*rawmidi_next_device)(snd_ctl_t *handle, int *device);
index cbc5aef9ee65e6b22d33ec1064267ba43beaea20..e2527f02916f4756c43b53bae9cd3bcd392aa37f 100644 (file)
@@ -277,21 +277,6 @@ 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;
@@ -395,7 +380,6 @@ 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,
index 7c36f2c993e4fc45779ff27d6e405ea1907db8fb..2a1b5bcdff0ad30ef9278200780da78380a75bf7 100644 (file)
@@ -65,6 +65,15 @@ typedef enum sndrv_pcm_hw_param snd_pcm_hw_param_t;
 #define SND_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_LAST_INTERVAL
 #define SND_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_FIRST_INTERVAL
 
+/** 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;
+
 typedef struct _snd_pcm_channel_info {
        unsigned int channel;
        void *addr;                     /* base address of channel samples */
@@ -563,4 +572,3 @@ int snd_pcm_slave_conf(snd_config_t *conf, const char **namep,
         (1U << SND_PCM_FORMAT_U32_LE) | \
         (1U << SND_PCM_FORMAT_U32_BE))
 
-
index fcba75a24915ca5d08f717078e77533f39052b0a..01d0796063d4eecfba6ded083738a9f5bc647b94 100644 (file)
@@ -982,42 +982,3 @@ int _snd_pcm_surround_open(snd_pcm_t **pcmp, const char *name, snd_config_t *con
        }
        return snd_pcm_surround_open(pcmp, name, card, device, type, stream, mode);
 }
-
-int snd_pcm_surround_next_device(snd_ctl_t *ctl, snd_pcm_surround_type_t type, int *device)
-{
-       int err;
-       snd_ctl_card_info_t *info;
-       snd_card_type_t ctype;
-       surround_open_t *po;
-
-       assert(device);
-       snd_ctl_card_info_alloca(&info);
-       if ((err = snd_ctl_card_info(ctl, info)) < 0)
-               return err;
-       ctype = snd_ctl_card_info_get_type(info);
-       for (po = open_table; po->type != SND_CARD_TYPE_NONE; po++) {
-               if (po->type == ctype) {
-                       switch (type) {
-                       case SND_PCM_SURROUND_40:
-                               if (po->flags & SURR_FLG_NO_4CH)
-                                       return -ENODEV;
-                               break;
-                       case SND_PCM_SURROUND_51:
-                               if (po->flags & SURR_FLG_NO_6CH)
-                                       return -ENODEV;
-                               break;
-                       }
-                       if ((err = po->scount(ctl, info, type)) < 0)
-                               return err;
-                       if (err == 0)
-                               return -ENODEV;
-                       if (*device == 0)
-                               *device = 0;
-                       (*device)++;
-                       if (*device >= err)
-                               *device = -1;
-                       return 0;
-               }
-       }
-       return -ENODEV;
-}