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