• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/sound/i2c/

Lines Matching defs:tea

88 	struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
90 snd_i2c_lock(tea->bus);
91 ucontrol->value.integer.value[0] = tea->mleft - 0x14;
92 ucontrol->value.integer.value[1] = tea->mright - 0x14;
93 snd_i2c_unlock(tea->bus);
100 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
107 snd_i2c_lock(tea->bus);
108 change = val1 != tea->mleft || val2 != tea->mright;
109 tea->mleft = val1;
110 tea->mright = val2;
112 if (tea->regs[TEA6330T_SADDR_VOLUME_LEFT] != 0) {
114 bytes[count++] = tea->regs[TEA6330T_SADDR_VOLUME_LEFT] = tea->mleft;
116 if (tea->regs[TEA6330T_SADDR_VOLUME_RIGHT] != 0) {
119 bytes[count++] = tea->regs[TEA6330T_SADDR_VOLUME_RIGHT] = tea->mright;
122 if ((err = snd_i2c_sendbytes(tea->device, bytes, count)) < 0)
125 snd_i2c_unlock(tea->bus);
139 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
141 snd_i2c_lock(tea->bus);
142 ucontrol->value.integer.value[0] = tea->regs[TEA6330T_SADDR_VOLUME_LEFT] == 0 ? 0 : 1;
143 ucontrol->value.integer.value[1] = tea->regs[TEA6330T_SADDR_VOLUME_RIGHT] == 0 ? 0 : 1;
144 snd_i2c_unlock(tea->bus);
151 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
158 snd_i2c_lock(tea->bus);
159 oval1 = tea->regs[TEA6330T_SADDR_VOLUME_LEFT] == 0 ? 0 : 1;
160 oval2 = tea->regs[TEA6330T_SADDR_VOLUME_RIGHT] == 0 ? 0 : 1;
162 tea->regs[TEA6330T_SADDR_VOLUME_LEFT] = val1 ? tea->mleft : 0;
163 tea->regs[TEA6330T_SADDR_VOLUME_RIGHT] = val2 ? tea->mright : 0;
165 bytes[1] = tea->regs[TEA6330T_SADDR_VOLUME_LEFT];
166 bytes[2] = tea->regs[TEA6330T_SADDR_VOLUME_RIGHT];
167 if ((err = snd_i2c_sendbytes(tea->device, bytes, 3)) < 0)
169 snd_i2c_unlock(tea->bus);
181 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
186 uinfo->value.integer.max = tea->max_bass;
193 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
195 ucontrol->value.integer.value[0] = tea->bass;
202 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
207 val1 = ucontrol->value.integer.value[0] % (tea->max_bass + 1);
208 snd_i2c_lock(tea->bus);
209 tea->bass = val1;
210 val1 += tea->equalizer ? 7 : 3;
211 change = tea->regs[TEA6330T_SADDR_BASS] != val1;
213 bytes[1] = tea->regs[TEA6330T_SADDR_BASS] = val1;
214 if ((err = snd_i2c_sendbytes(tea->device, bytes, 2)) < 0)
216 snd_i2c_unlock(tea->bus);
228 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
233 uinfo->value.integer.max = tea->max_treble;
240 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
242 ucontrol->value.integer.value[0] = tea->treble;
249 struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
254 val1 = ucontrol->value.integer.value[0] % (tea->max_treble + 1);
255 snd_i2c_lock(tea->bus);
256 tea->treble = val1;
258 change = tea->regs[TEA6330T_SADDR_TREBLE] != val1;
260 bytes[1] = tea->regs[TEA6330T_SADDR_TREBLE] = val1;
261 if ((err = snd_i2c_sendbytes(tea->device, bytes, 2)) < 0)
263 snd_i2c_unlock(tea->bus);
284 struct tea6330t *tea;
291 tea = kzalloc(sizeof(*tea), GFP_KERNEL);
292 if (tea == NULL)
295 kfree(tea);
298 tea->device = device;
299 tea->bus = bus;
300 tea->equalizer = equalizer;
301 tea->fader = fader;
302 device->private_data = tea;
308 tea->regs[TEA6330T_SADDR_FADER] = 0x3f;
309 tea->regs[TEA6330T_SADDR_AUDIO_SWITCH] = equalizer ? 0 : TEA6330T_EQN;
311 if (!tea->equalizer) {
312 tea->max_bass = 9;
313 tea->max_treble = 8;
315 tea->bass = 4;
317 tea->treble = 4;
319 tea->max_bass = 5;
320 tea->max_treble = 0;
322 tea->bass = 4;
324 tea->treble = 0;
326 tea->mleft = tea->mright = 0x14;
327 tea->regs[TEA6330T_SADDR_BASS] = default_bass;
328 tea->regs[TEA6330T_SADDR_TREBLE] = default_treble;
333 bytes[idx+1] = tea->regs[idx];
343 if (tea->treble == 0 && !strcmp(knew->name, "Tone Control - Treble"))
345 if ((err = snd_ctl_add(card, snd_ctl_new1(knew, tea))) < 0)