mixer_oss.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef __SOUND_MIXER_OSS_H
  2. #define __SOUND_MIXER_OSS_H
  3. /*
  4. * OSS MIXER API
  5. * Copyright (c) by Jaroslav Kysela <perex@perex.cz>
  6. *
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. *
  22. */
  23. #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
  24. #define SNDRV_OSS_MAX_MIXERS 32
  25. struct snd_mixer_oss_file;
  26. struct snd_mixer_oss_slot {
  27. int number;
  28. unsigned int stereo: 1;
  29. int (*get_volume)(struct snd_mixer_oss_file *fmixer,
  30. struct snd_mixer_oss_slot *chn,
  31. int *left, int *right);
  32. int (*put_volume)(struct snd_mixer_oss_file *fmixer,
  33. struct snd_mixer_oss_slot *chn,
  34. int left, int right);
  35. int (*get_recsrc)(struct snd_mixer_oss_file *fmixer,
  36. struct snd_mixer_oss_slot *chn,
  37. int *active);
  38. int (*put_recsrc)(struct snd_mixer_oss_file *fmixer,
  39. struct snd_mixer_oss_slot *chn,
  40. int active);
  41. unsigned long private_value;
  42. void *private_data;
  43. void (*private_free)(struct snd_mixer_oss_slot *slot);
  44. int volume[2];
  45. };
  46. struct snd_mixer_oss {
  47. struct snd_card *card;
  48. char id[16];
  49. char name[32];
  50. struct snd_mixer_oss_slot slots[SNDRV_OSS_MAX_MIXERS]; /* OSS mixer slots */
  51. unsigned int mask_recsrc; /* exclusive recsrc mask */
  52. int (*get_recsrc)(struct snd_mixer_oss_file *fmixer,
  53. unsigned int *active_index);
  54. int (*put_recsrc)(struct snd_mixer_oss_file *fmixer,
  55. unsigned int active_index);
  56. void *private_data_recsrc;
  57. void (*private_free_recsrc)(struct snd_mixer_oss *mixer);
  58. struct mutex reg_mutex;
  59. struct snd_info_entry *proc_entry;
  60. int oss_dev_alloc;
  61. /* --- */
  62. int oss_recsrc;
  63. };
  64. struct snd_mixer_oss_file {
  65. struct snd_card *card;
  66. struct snd_mixer_oss *mixer;
  67. };
  68. int snd_mixer_oss_ioctl_card(struct snd_card *card,
  69. unsigned int cmd, unsigned long arg);
  70. #endif /* CONFIG_SND_MIXER_OSS */
  71. #endif /* __SOUND_MIXER_OSS_H */