uda1341.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * linux/include/linux/l3/uda1341.h
  3. *
  4. * Philips UDA1341 mixer device driver for ALSA
  5. *
  6. * Copyright (c) 2002 Tomas Kasparek <tomas.kasparek@seznam.cz>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License.
  10. *
  11. * History:
  12. *
  13. * 2002-03-13 Tomas Kasparek Initial release - based on uda1341.h from OSS
  14. * 2002-03-30 Tomas Kasparek Proc filesystem support, complete mixer and DSP
  15. * features support
  16. */
  17. #define UDA1341_ALSA_NAME "snd-uda1341"
  18. /*
  19. * Default rate set after inicialization
  20. */
  21. #define AUDIO_RATE_DEFAULT 44100
  22. /*
  23. * UDA1341 L3 address and command types
  24. */
  25. #define UDA1341_L3ADDR 5
  26. #define UDA1341_DATA0 (UDA1341_L3ADDR << 2 | 0)
  27. #define UDA1341_DATA1 (UDA1341_L3ADDR << 2 | 1)
  28. #define UDA1341_STATUS (UDA1341_L3ADDR << 2 | 2)
  29. enum uda1341_onoff {
  30. OFF=0,
  31. ON,
  32. };
  33. enum uda1341_format {
  34. I2S=0,
  35. LSB16,
  36. LSB18,
  37. LSB20,
  38. MSB,
  39. LSB16MSB,
  40. LSB18MSB,
  41. LSB20MSB,
  42. };
  43. enum uda1341_fs {
  44. F512=0,
  45. F384,
  46. F256,
  47. Funused,
  48. };
  49. enum uda1341_peak {
  50. BEFORE=0,
  51. AFTER,
  52. };
  53. enum uda1341_filter {
  54. FLAT=0,
  55. MIN,
  56. MIN2,
  57. MAX,
  58. };
  59. enum uda1341_mixer {
  60. DOUBLE,
  61. LINE,
  62. MIC,
  63. MIXER,
  64. };
  65. enum uda1341_deemp {
  66. NONE,
  67. D32,
  68. D44,
  69. D48,
  70. };
  71. enum uda1341_config {
  72. CMD_READ_REG = 0,
  73. CMD_RESET,
  74. CMD_FS,
  75. CMD_FORMAT,
  76. CMD_OGAIN,
  77. CMD_IGAIN,
  78. CMD_DAC,
  79. CMD_ADC,
  80. CMD_VOLUME,
  81. CMD_BASS,
  82. CMD_TREBBLE,
  83. CMD_PEAK,
  84. CMD_DEEMP,
  85. CMD_MUTE,
  86. CMD_FILTER,
  87. CMD_CH1,
  88. CMD_CH2,
  89. CMD_MIC,
  90. CMD_MIXER,
  91. CMD_AGC,
  92. CMD_IG,
  93. CMD_AGC_TIME,
  94. CMD_AGC_LEVEL,
  95. #ifdef CONFIG_PM
  96. CMD_SUSPEND,
  97. CMD_RESUME,
  98. #endif
  99. CMD_LAST,
  100. };
  101. enum write_through {
  102. //used in update_bits (write_cfg) to avoid l3_write - just update local copy of regs.
  103. REGS_ONLY=0,
  104. //update local regs and write value to uda1341 - do l3_write
  105. FLUSH,
  106. };
  107. int __init snd_chip_uda1341_mixer_new(struct snd_card *card, struct l3_client **clnt);
  108. /*
  109. * Local variables:
  110. * indent-tabs-mode: t
  111. * End:
  112. */