162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci#ifndef __SOUND_MIXER_OSS_H 362306a36Sopenharmony_ci#define __SOUND_MIXER_OSS_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci/* 662306a36Sopenharmony_ci * OSS MIXER API 762306a36Sopenharmony_ci * Copyright (c) by Jaroslav Kysela <perex@perex.cz> 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#if IS_ENABLED(CONFIG_SND_MIXER_OSS) 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#define SNDRV_OSS_MAX_MIXERS 32 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_cistruct snd_mixer_oss_file; 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_cistruct snd_mixer_oss_slot { 1762306a36Sopenharmony_ci int number; 1862306a36Sopenharmony_ci unsigned int stereo: 1; 1962306a36Sopenharmony_ci int (*get_volume)(struct snd_mixer_oss_file *fmixer, 2062306a36Sopenharmony_ci struct snd_mixer_oss_slot *chn, 2162306a36Sopenharmony_ci int *left, int *right); 2262306a36Sopenharmony_ci int (*put_volume)(struct snd_mixer_oss_file *fmixer, 2362306a36Sopenharmony_ci struct snd_mixer_oss_slot *chn, 2462306a36Sopenharmony_ci int left, int right); 2562306a36Sopenharmony_ci int (*get_recsrc)(struct snd_mixer_oss_file *fmixer, 2662306a36Sopenharmony_ci struct snd_mixer_oss_slot *chn, 2762306a36Sopenharmony_ci int *active); 2862306a36Sopenharmony_ci int (*put_recsrc)(struct snd_mixer_oss_file *fmixer, 2962306a36Sopenharmony_ci struct snd_mixer_oss_slot *chn, 3062306a36Sopenharmony_ci int active); 3162306a36Sopenharmony_ci unsigned long private_value; 3262306a36Sopenharmony_ci void *private_data; 3362306a36Sopenharmony_ci void (*private_free)(struct snd_mixer_oss_slot *slot); 3462306a36Sopenharmony_ci int volume[2]; 3562306a36Sopenharmony_ci}; 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_cistruct snd_mixer_oss { 3862306a36Sopenharmony_ci struct snd_card *card; 3962306a36Sopenharmony_ci char id[16]; 4062306a36Sopenharmony_ci char name[32]; 4162306a36Sopenharmony_ci struct snd_mixer_oss_slot slots[SNDRV_OSS_MAX_MIXERS]; /* OSS mixer slots */ 4262306a36Sopenharmony_ci unsigned int mask_recsrc; /* exclusive recsrc mask */ 4362306a36Sopenharmony_ci int (*get_recsrc)(struct snd_mixer_oss_file *fmixer, 4462306a36Sopenharmony_ci unsigned int *active_index); 4562306a36Sopenharmony_ci int (*put_recsrc)(struct snd_mixer_oss_file *fmixer, 4662306a36Sopenharmony_ci unsigned int active_index); 4762306a36Sopenharmony_ci void *private_data_recsrc; 4862306a36Sopenharmony_ci void (*private_free_recsrc)(struct snd_mixer_oss *mixer); 4962306a36Sopenharmony_ci struct mutex reg_mutex; 5062306a36Sopenharmony_ci struct snd_info_entry *proc_entry; 5162306a36Sopenharmony_ci int oss_dev_alloc; 5262306a36Sopenharmony_ci /* --- */ 5362306a36Sopenharmony_ci int oss_recsrc; 5462306a36Sopenharmony_ci}; 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_cistruct snd_mixer_oss_file { 5762306a36Sopenharmony_ci struct snd_card *card; 5862306a36Sopenharmony_ci struct snd_mixer_oss *mixer; 5962306a36Sopenharmony_ci}; 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ciint snd_mixer_oss_ioctl_card(struct snd_card *card, 6262306a36Sopenharmony_ci unsigned int cmd, unsigned long arg); 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci#endif /* CONFIG_SND_MIXER_OSS */ 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci#endif /* __SOUND_MIXER_OSS_H */ 67