mixer_oss.h 1.7 KB

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