blob: 110d5dc3a2bed878815abc5abf3c03a17a31e43e [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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
Linus Torvalds1da177e2005-04-16 15:20:36 -070018#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
33enum uda1341_onoff {
34 OFF=0,
35 ON,
36};
37
Linus Torvalds1da177e2005-04-16 15:20:36 -070038enum uda1341_format {
39 I2S=0,
40 LSB16,
41 LSB18,
42 LSB20,
43 MSB,
44 LSB16MSB,
45 LSB18MSB,
46 LSB20MSB,
47};
48
Linus Torvalds1da177e2005-04-16 15:20:36 -070049enum uda1341_fs {
50 F512=0,
51 F384,
52 F256,
53 Funused,
54};
55
Linus Torvalds1da177e2005-04-16 15:20:36 -070056enum uda1341_peak {
57 BEFORE=0,
58 AFTER,
59};
60
Linus Torvalds1da177e2005-04-16 15:20:36 -070061enum uda1341_filter {
62 FLAT=0,
63 MIN,
64 MIN2,
65 MAX,
66};
67
Linus Torvalds1da177e2005-04-16 15:20:36 -070068enum uda1341_mixer {
69 DOUBLE,
70 LINE,
71 MIC,
72 MIXER,
73};
74
Linus Torvalds1da177e2005-04-16 15:20:36 -070075enum uda1341_deemp {
76 NONE,
77 D32,
78 D44,
79 D48,
80};
81
Linus Torvalds1da177e2005-04-16 15:20:36 -070082enum 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
113enum 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
Takashi Iwai97f02e02005-11-17 14:17:19 +0100120int __init snd_chip_uda1341_mixer_new(struct snd_card *card, struct l3_client **clnt);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700121
122/*
123 * Local variables:
124 * indent-tabs-mode: t
125 * End:
126 */