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