uda1341.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. /* $Id: uda1341.h,v 1.2 2007/06/29 06:47:59 eyryu Exp $ */
  18. #define UDA1341_ALSA_NAME "snd-uda1341"
  19. /*
  20. * Default rate set after inicialization
  21. */
  22. #define AUDIO_RATE_DEFAULT 44100
  23. /*
  24. * UDA1341 L3 address and command types
  25. */
  26. #define UDA1341_L3ADDR 5
  27. #define UDA1341_DATA0 (UDA1341_L3ADDR << 2 | 0)
  28. #define UDA1341_DATA1 (UDA1341_L3ADDR << 2 | 1)
  29. #define UDA1341_STATUS (UDA1341_L3ADDR << 2 | 2)
  30. enum uda1341_onoff {
  31. OFF=0,
  32. ON,
  33. };
  34. enum uda1341_format {
  35. I2S=0,
  36. LSB16,
  37. LSB18,
  38. LSB20,
  39. MSB,
  40. LSB16MSB,
  41. LSB18MSB,
  42. LSB20MSB,
  43. };
  44. enum uda1341_fs {
  45. F512=0,
  46. F384,
  47. F256,
  48. Funused,
  49. };
  50. enum uda1341_peak {
  51. BEFORE=0,
  52. AFTER,
  53. };
  54. enum uda1341_filter {
  55. FLAT=0,
  56. MIN,
  57. MIN2,
  58. MAX,
  59. };
  60. enum uda1341_mixer {
  61. DOUBLE,
  62. LINE,
  63. MIC,
  64. MIXER,
  65. };
  66. enum uda1341_deemp {
  67. NONE,
  68. D32,
  69. D44,
  70. D48,
  71. };
  72. enum uda1341_config {
  73. CMD_READ_REG = 0,
  74. CMD_RESET,
  75. CMD_FS,
  76. CMD_FORMAT,
  77. CMD_OGAIN,
  78. CMD_IGAIN,
  79. CMD_DAC,
  80. CMD_ADC,
  81. CMD_VOLUME,
  82. CMD_BASS,
  83. CMD_TREBBLE,
  84. CMD_PEAK,
  85. CMD_DEEMP,
  86. CMD_MUTE,
  87. CMD_FILTER,
  88. CMD_CH1,
  89. CMD_CH2,
  90. CMD_MIC,
  91. CMD_MIXER,
  92. CMD_AGC,
  93. CMD_IG,
  94. CMD_AGC_TIME,
  95. CMD_AGC_LEVEL,
  96. #ifdef CONFIG_PM
  97. CMD_SUSPEND,
  98. CMD_RESUME,
  99. #endif
  100. CMD_LAST,
  101. };
  102. enum write_through {
  103. //used in update_bits (write_cfg) to avoid l3_write - just update local copy of regs.
  104. REGS_ONLY=0,
  105. //update local regs and write value to uda1341 - do l3_write
  106. FLUSH,
  107. };
  108. int __init snd_chip_uda1341_mixer_new(struct snd_card *card, struct l3_client **clnt);
  109. /*
  110. * Local variables:
  111. * indent-tabs-mode: t
  112. * End:
  113. */