Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) #ifndef __SOUND_MIXER_OSS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) #define __SOUND_MIXER_OSS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  *  OSS MIXER API
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define SNDRV_OSS_MAX_MIXERS	32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) struct snd_mixer_oss_file;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) struct snd_mixer_oss_slot {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 	int number;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 	unsigned int stereo: 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 	int (*get_volume)(struct snd_mixer_oss_file *fmixer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 			  struct snd_mixer_oss_slot *chn,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 			  int *left, int *right);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	int (*put_volume)(struct snd_mixer_oss_file *fmixer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 			  struct snd_mixer_oss_slot *chn,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 			  int left, int right);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	int (*get_recsrc)(struct snd_mixer_oss_file *fmixer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 			  struct snd_mixer_oss_slot *chn,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 			  int *active);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 	int (*put_recsrc)(struct snd_mixer_oss_file *fmixer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 			  struct snd_mixer_oss_slot *chn,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 			  int active);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	unsigned long private_value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	void *private_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 	void (*private_free)(struct snd_mixer_oss_slot *slot);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 	int volume[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) struct snd_mixer_oss {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 	struct snd_card *card;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 	char id[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 	char name[32];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 	struct snd_mixer_oss_slot slots[SNDRV_OSS_MAX_MIXERS]; /* OSS mixer slots */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 	unsigned int mask_recsrc;		/* exclusive recsrc mask */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 	int (*get_recsrc)(struct snd_mixer_oss_file *fmixer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 			  unsigned int *active_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 	int (*put_recsrc)(struct snd_mixer_oss_file *fmixer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 			  unsigned int active_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 	void *private_data_recsrc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 	void (*private_free_recsrc)(struct snd_mixer_oss *mixer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 	struct mutex reg_mutex;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 	struct snd_info_entry *proc_entry;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 	int oss_dev_alloc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) 	/* --- */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 	int oss_recsrc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) struct snd_mixer_oss_file {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) 	struct snd_card *card;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) 	struct snd_mixer_oss *mixer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) int snd_mixer_oss_ioctl_card(struct snd_card *card,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 			     unsigned int cmd, unsigned long arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) #endif /* CONFIG_SND_MIXER_OSS */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) #endif /* __SOUND_MIXER_OSS_H */