Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 #ifndef __SOUND_MIXER_OSS_H
0003 #define __SOUND_MIXER_OSS_H
0004 
0005 /*
0006  *  OSS MIXER API
0007  *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
0008  */
0009 
0010 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
0011 
0012 #define SNDRV_OSS_MAX_MIXERS    32
0013 
0014 struct snd_mixer_oss_file;
0015 
0016 struct snd_mixer_oss_slot {
0017     int number;
0018     unsigned int stereo: 1;
0019     int (*get_volume)(struct snd_mixer_oss_file *fmixer,
0020               struct snd_mixer_oss_slot *chn,
0021               int *left, int *right);
0022     int (*put_volume)(struct snd_mixer_oss_file *fmixer,
0023               struct snd_mixer_oss_slot *chn,
0024               int left, int right);
0025     int (*get_recsrc)(struct snd_mixer_oss_file *fmixer,
0026               struct snd_mixer_oss_slot *chn,
0027               int *active);
0028     int (*put_recsrc)(struct snd_mixer_oss_file *fmixer,
0029               struct snd_mixer_oss_slot *chn,
0030               int active);
0031     unsigned long private_value;
0032     void *private_data;
0033     void (*private_free)(struct snd_mixer_oss_slot *slot);
0034     int volume[2];
0035 };
0036 
0037 struct snd_mixer_oss {
0038     struct snd_card *card;
0039     char id[16];
0040     char name[32];
0041     struct snd_mixer_oss_slot slots[SNDRV_OSS_MAX_MIXERS]; /* OSS mixer slots */
0042     unsigned int mask_recsrc;       /* exclusive recsrc mask */
0043     int (*get_recsrc)(struct snd_mixer_oss_file *fmixer,
0044               unsigned int *active_index);
0045     int (*put_recsrc)(struct snd_mixer_oss_file *fmixer,
0046               unsigned int active_index);
0047     void *private_data_recsrc;
0048     void (*private_free_recsrc)(struct snd_mixer_oss *mixer);
0049     struct mutex reg_mutex;
0050     struct snd_info_entry *proc_entry;
0051     int oss_dev_alloc;
0052     /* --- */
0053     int oss_recsrc;
0054 };
0055 
0056 struct snd_mixer_oss_file {
0057     struct snd_card *card;
0058     struct snd_mixer_oss *mixer;
0059 };
0060 
0061 int snd_mixer_oss_ioctl_card(struct snd_card *card,
0062                  unsigned int cmd, unsigned long arg);
0063 
0064 #endif /* CONFIG_SND_MIXER_OSS */
0065 
0066 #endif /* __SOUND_MIXER_OSS_H */