sync hh.org
[hh.org.git] / include / linux / l3 / uda1341.h
blob0be1a439036ad79e509f7ee15109c0ebf4e4bc20
1 /*
2 * linux/include/linux/l3/uda1341.h
4 * Philips UDA1341 mixer device driver
6 * Copyright (c) 2000 Nicolas Pitre <nico@cam.org>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License.
12 #define UDA1341_NAME "uda1341"
14 struct uda1341_cfg {
15 unsigned int fs:16;
16 unsigned int format:3;
19 #define FMT_I2S 0
20 #define FMT_LSB16 1
21 #define FMT_LSB18 2
22 #define FMT_LSB20 3
23 #define FMT_MSB 4
24 #define FMT_LSB16MSB 5
25 #define FMT_LSB18MSB 6
26 #define FMT_LSB20MSB 7
28 #define L3_UDA1341_CONFIGURE 0x13410001
30 struct l3_gain {
31 unsigned int left:8;
32 unsigned int right:8;
33 unsigned int unused:8;
34 unsigned int channel:8;
37 #define L3_SET_VOLUME 0x13410002
38 #define L3_SET_TREBLE 0x13410003
39 #define L3_SET_BASS 0x13410004
40 #define L3_SET_GAIN 0x13410005
42 struct l3_agc {
43 unsigned int level:8;
44 unsigned int enable:1;
45 unsigned int attack:7;
46 unsigned int decay:8;
47 unsigned int channel:8;
50 #define L3_INPUT_AGC 0x13410006
52 struct uda1341;
54 int uda1341_configure(struct uda1341 *uda, struct uda1341_cfg *conf);
55 int uda1341_mixer_ctl(struct uda1341 *uda, int cmd, void *arg);
56 int uda1341_open(struct uda1341 *uda);
57 void uda1341_close(struct uda1341 *uda);
59 struct uda1341 *uda1341_attach(const char *adapter);
60 void uda1341_detach(struct uda1341 *uda);