Lines Matching defs:tea

56 static void snd_tea6330t_set(struct tea6330t *tea,
62 snd_i2c_write(tea->bus, TEA6330T_ADDR, addr, value, 1);
84 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
86 snd_i2c_lock(tea->bus);
87 ucontrol->value.integer.value[0] = tea->mleft - 0x14;
88 ucontrol->value.integer.value[1] = tea->mright - 0x14;
89 snd_i2c_unlock(tea->bus);
96 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
103 snd_i2c_lock(tea->bus);
104 change = val1 != tea->mleft || val2 != tea->mright;
105 tea->mleft = val1;
106 tea->mright = val2;
108 if (tea->regs[TEA6330T_SADDR_VOLUME_LEFT] != 0) {
110 bytes[count++] = tea->regs[TEA6330T_SADDR_VOLUME_LEFT] = tea->mleft;
112 if (tea->regs[TEA6330T_SADDR_VOLUME_RIGHT] != 0) {
115 bytes[count++] = tea->regs[TEA6330T_SADDR_VOLUME_RIGHT] = tea->mright;
118 err = snd_i2c_sendbytes(tea->device, bytes, count);
122 snd_i2c_unlock(tea->bus);
136 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
138 snd_i2c_lock(tea->bus);
139 ucontrol->value.integer.value[0] = tea->regs[TEA6330T_SADDR_VOLUME_LEFT] == 0 ? 0 : 1;
140 ucontrol->value.integer.value[1] = tea->regs[TEA6330T_SADDR_VOLUME_RIGHT] == 0 ? 0 : 1;
141 snd_i2c_unlock(tea->bus);
148 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
155 snd_i2c_lock(tea->bus);
156 oval1 = tea->regs[TEA6330T_SADDR_VOLUME_LEFT] == 0 ? 0 : 1;
157 oval2 = tea->regs[TEA6330T_SADDR_VOLUME_RIGHT] == 0 ? 0 : 1;
159 tea->regs[TEA6330T_SADDR_VOLUME_LEFT] = val1 ? tea->mleft : 0;
160 tea->regs[TEA6330T_SADDR_VOLUME_RIGHT] = val2 ? tea->mright : 0;
162 bytes[1] = tea->regs[TEA6330T_SADDR_VOLUME_LEFT];
163 bytes[2] = tea->regs[TEA6330T_SADDR_VOLUME_RIGHT];
164 err = snd_i2c_sendbytes(tea->device, bytes, 3);
167 snd_i2c_unlock(tea->bus);
179 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
184 uinfo->value.integer.max = tea->max_bass;
191 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
193 ucontrol->value.integer.value[0] = tea->bass;
200 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
205 val1 = ucontrol->value.integer.value[0] % (tea->max_bass + 1);
206 snd_i2c_lock(tea->bus);
207 tea->bass = val1;
208 val1 += tea->equalizer ? 7 : 3;
209 change = tea->regs[TEA6330T_SADDR_BASS] != val1;
211 bytes[1] = tea->regs[TEA6330T_SADDR_BASS] = val1;
212 err = snd_i2c_sendbytes(tea->device, bytes, 2);
215 snd_i2c_unlock(tea->bus);
227 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
232 uinfo->value.integer.max = tea->max_treble;
239 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
241 ucontrol->value.integer.value[0] = tea->treble;
248 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
253 val1 = ucontrol->value.integer.value[0] % (tea->max_treble + 1);
254 snd_i2c_lock(tea->bus);
255 tea->treble = val1;
257 change = tea->regs[TEA6330T_SADDR_TREBLE] != val1;
259 bytes[1] = tea->regs[TEA6330T_SADDR_TREBLE] = val1;
260 err = snd_i2c_sendbytes(tea->device, bytes, 2);
263 snd_i2c_unlock(tea->bus);
284 struct tea6330t *tea;
291 tea = kzalloc(sizeof(*tea), GFP_KERNEL);
292 if (tea == NULL)
296 kfree(tea);
299 tea->device = device;
300 tea->bus = bus;
301 tea->equalizer = equalizer;
302 tea->fader = fader;
303 device->private_data = tea;
309 tea->regs[TEA6330T_SADDR_FADER] = 0x3f;
310 tea->regs[TEA6330T_SADDR_AUDIO_SWITCH] = equalizer ? 0 : TEA6330T_EQN;
312 if (!tea->equalizer) {
313 tea->max_bass = 9;
314 tea->max_treble = 8;
316 tea->bass = 4;
318 tea->treble = 4;
320 tea->max_bass = 5;
321 tea->max_treble = 0;
323 tea->bass = 4;
325 tea->treble = 0;
327 tea->mleft = tea->mright = 0x14;
328 tea->regs[TEA6330T_SADDR_BASS] = default_bass;
329 tea->regs[TEA6330T_SADDR_TREBLE] = default_treble;
334 bytes[idx+1] = tea->regs[idx];
346 if (tea->treble == 0 && !strcmp(knew->name, "Tone Control - Treble"))
348 err = snd_ctl_add(card, snd_ctl_new1(knew, tea));