Lines Matching +full:0 +full:x9f
29 #if 0
35 for (idx = 0; idx < 0x19; idx++)
36 printk(KERN_DEBUG "ak4531 0x%x: 0x%x\n",
62 int mask = (kcontrol->private_value >> 24) & 0xff; in snd_ak4531_info_single()
66 uinfo->value.integer.min = 0; in snd_ak4531_info_single()
68 return 0; in snd_ak4531_info_single()
74 int reg = kcontrol->private_value & 0xff; in snd_ak4531_get_single()
75 int shift = (kcontrol->private_value >> 16) & 0x07; in snd_ak4531_get_single()
76 int mask = (kcontrol->private_value >> 24) & 0xff; in snd_ak4531_get_single()
86 ucontrol->value.integer.value[0] = val; in snd_ak4531_get_single()
87 return 0; in snd_ak4531_get_single()
93 int reg = kcontrol->private_value & 0xff; in snd_ak4531_put_single()
94 int shift = (kcontrol->private_value >> 16) & 0x07; in snd_ak4531_put_single()
95 int mask = (kcontrol->private_value >> 24) & 0xff; in snd_ak4531_put_single()
100 val = ucontrol->value.integer.value[0] & mask; in snd_ak4531_put_single()
129 int mask = (kcontrol->private_value >> 24) & 0xff; in snd_ak4531_info_double()
133 uinfo->value.integer.min = 0; in snd_ak4531_info_double()
135 return 0; in snd_ak4531_info_double()
141 int left_reg = kcontrol->private_value & 0xff; in snd_ak4531_get_double()
142 int right_reg = (kcontrol->private_value >> 8) & 0xff; in snd_ak4531_get_double()
143 int left_shift = (kcontrol->private_value >> 16) & 0x07; in snd_ak4531_get_double()
144 int right_shift = (kcontrol->private_value >> 19) & 0x07; in snd_ak4531_get_double()
145 int mask = (kcontrol->private_value >> 24) & 0xff; in snd_ak4531_get_double()
157 ucontrol->value.integer.value[0] = left; in snd_ak4531_get_double()
159 return 0; in snd_ak4531_get_double()
165 int left_reg = kcontrol->private_value & 0xff; in snd_ak4531_put_double()
166 int right_reg = (kcontrol->private_value >> 8) & 0xff; in snd_ak4531_put_double()
167 int left_shift = (kcontrol->private_value >> 16) & 0x07; in snd_ak4531_put_double()
168 int right_shift = (kcontrol->private_value >> 19) & 0x07; in snd_ak4531_put_double()
169 int mask = (kcontrol->private_value >> 24) & 0xff; in snd_ak4531_put_double()
174 left = ucontrol->value.integer.value[0] & mask; in snd_ak4531_put_double()
208 uinfo->value.integer.min = 0; in snd_ak4531_info_input_sw()
210 return 0; in snd_ak4531_info_input_sw()
216 int reg1 = kcontrol->private_value & 0xff; in snd_ak4531_get_input_sw()
217 int reg2 = (kcontrol->private_value >> 8) & 0xff; in snd_ak4531_get_input_sw()
218 int left_shift = (kcontrol->private_value >> 16) & 0x0f; in snd_ak4531_get_input_sw()
219 int right_shift = (kcontrol->private_value >> 24) & 0x0f; in snd_ak4531_get_input_sw()
222 ucontrol->value.integer.value[0] = (ak4531->regs[reg1] >> left_shift) & 1; in snd_ak4531_get_input_sw()
227 return 0; in snd_ak4531_get_input_sw()
233 int reg1 = kcontrol->private_value & 0xff; in snd_ak4531_put_input_sw()
234 int reg2 = (kcontrol->private_value >> 8) & 0xff; in snd_ak4531_put_input_sw()
235 int left_shift = (kcontrol->private_value >> 16) & 0x0f; in snd_ak4531_put_input_sw()
236 int right_shift = (kcontrol->private_value >> 24) & 0x0f; in snd_ak4531_put_input_sw()
243 val1 |= (ucontrol->value.integer.value[0] & 1) << left_shift; in snd_ak4531_put_input_sw()
254 static const DECLARE_TLV_DB_SCALE(db_scale_master, -6200, 200, 0);
255 static const DECLARE_TLV_DB_SCALE(db_scale_mono, -2800, 400, 0);
256 static const DECLARE_TLV_DB_SCALE(db_scale_input, -5000, 200, 0);
260 AK4531_DOUBLE_TLV("Master Playback Switch", 0,
263 AK4531_DOUBLE("Master Playback Volume", 0, AK4531_LMASTER, AK4531_RMASTER, 0, 0, 0x1f, 1),
265 AK4531_SINGLE_TLV("Master Mono Playback Switch", 0, AK4531_MONO_OUT, 7, 1, 1,
267 AK4531_SINGLE("Master Mono Playback Volume", 0, AK4531_MONO_OUT, 0, 0x07, 1),
269 AK4531_DOUBLE("PCM Switch", 0, AK4531_LVOICE, AK4531_RVOICE, 7, 7, 1, 1),
270 AK4531_DOUBLE_TLV("PCM Volume", 0, AK4531_LVOICE, AK4531_RVOICE, 0, 0, 0x1f, 1,
272 AK4531_DOUBLE("PCM Playback Switch", 0, AK4531_OUT_SW2, AK4531_OUT_SW2, 3, 2, 1, 0),
273 AK4531_DOUBLE("PCM Capture Switch", 0, AK4531_LIN_SW2, AK4531_RIN_SW2, 2, 2, 1, 0),
276 AK4531_DOUBLE_TLV("PCM Volume", 1, AK4531_LFM, AK4531_RFM, 0, 0, 0x1f, 1,
278 AK4531_DOUBLE("PCM Playback Switch", 1, AK4531_OUT_SW1, AK4531_OUT_SW1, 6, 5, 1, 0),
281 AK4531_DOUBLE("CD Switch", 0, AK4531_LCD, AK4531_RCD, 7, 7, 1, 1),
282 AK4531_DOUBLE_TLV("CD Volume", 0, AK4531_LCD, AK4531_RCD, 0, 0, 0x1f, 1,
284 AK4531_DOUBLE("CD Playback Switch", 0, AK4531_OUT_SW1, AK4531_OUT_SW1, 2, 1, 1, 0),
285 AK4531_INPUT_SW("CD Capture Route", 0, AK4531_LIN_SW1, AK4531_RIN_SW1, 2, 1),
287 AK4531_DOUBLE("Line Switch", 0, AK4531_LLINE, AK4531_RLINE, 7, 7, 1, 1),
288 AK4531_DOUBLE_TLV("Line Volume", 0, AK4531_LLINE, AK4531_RLINE, 0, 0, 0x1f, 1,
290 AK4531_DOUBLE("Line Playback Switch", 0, AK4531_OUT_SW1, AK4531_OUT_SW1, 4, 3, 1, 0),
291 AK4531_INPUT_SW("Line Capture Route", 0, AK4531_LIN_SW1, AK4531_RIN_SW1, 4, 3),
293 AK4531_DOUBLE("Aux Switch", 0, AK4531_LAUXA, AK4531_RAUXA, 7, 7, 1, 1),
294 AK4531_DOUBLE_TLV("Aux Volume", 0, AK4531_LAUXA, AK4531_RAUXA, 0, 0, 0x1f, 1,
296 AK4531_DOUBLE("Aux Playback Switch", 0, AK4531_OUT_SW2, AK4531_OUT_SW2, 5, 4, 1, 0),
297 AK4531_INPUT_SW("Aux Capture Route", 0, AK4531_LIN_SW2, AK4531_RIN_SW2, 4, 3),
299 AK4531_SINGLE("Mono Switch", 0, AK4531_MONO1, 7, 1, 1),
300 AK4531_SINGLE_TLV("Mono Volume", 0, AK4531_MONO1, 0, 0x1f, 1, db_scale_input),
301 AK4531_SINGLE("Mono Playback Switch", 0, AK4531_OUT_SW2, 0, 1, 0),
302 AK4531_DOUBLE("Mono Capture Switch", 0, AK4531_LIN_SW2, AK4531_RIN_SW2, 0, 0, 1, 0),
305 AK4531_SINGLE_TLV("Mono Volume", 1, AK4531_MONO2, 0, 0x1f, 1, db_scale_input),
306 AK4531_SINGLE("Mono Playback Switch", 1, AK4531_OUT_SW2, 1, 1, 0),
307 AK4531_DOUBLE("Mono Capture Switch", 1, AK4531_LIN_SW2, AK4531_RIN_SW2, 1, 1, 1, 0),
309 AK4531_SINGLE_TLV("Mic Volume", 0, AK4531_MIC, 0, 0x1f, 1, db_scale_input),
310 AK4531_SINGLE("Mic Switch", 0, AK4531_MIC, 7, 1, 1),
311 AK4531_SINGLE("Mic Playback Switch", 0, AK4531_OUT_SW1, 0, 1, 0),
312 AK4531_DOUBLE("Mic Capture Switch", 0, AK4531_LIN_SW1, AK4531_RIN_SW1, 0, 0, 1, 0),
314 AK4531_DOUBLE("Mic Bypass Capture Switch", 0, AK4531_LIN_SW2, AK4531_RIN_SW2, 7, 7, 1, 0),
315 AK4531_DOUBLE("Mono1 Bypass Capture Switch", 0, AK4531_LIN_SW2, AK4531_RIN_SW2, 6, 6, 1, 0),
316 AK4531_DOUBLE("Mono2 Bypass Capture Switch", 0, AK4531_LIN_SW2, AK4531_RIN_SW2, 5, 5, 1, 0),
318 AK4531_SINGLE("AD Input Select", 0, AK4531_AD_IN, 0, 1, 0),
319 AK4531_SINGLE("Mic Boost (+30dB)", 0, AK4531_MIC_GAIN, 0, 1, 0)
329 return 0; in snd_ak4531_free()
338 static const u8 snd_ak4531_initial_map[0x19 + 1] = {
339 0x9f, /* 00: Master Volume Lch */
340 0x9f, /* 01: Master Volume Rch */
341 0x9f, /* 02: Voice Volume Lch */
342 0x9f, /* 03: Voice Volume Rch */
343 0x9f, /* 04: FM Volume Lch */
344 0x9f, /* 05: FM Volume Rch */
345 0x9f, /* 06: CD Audio Volume Lch */
346 0x9f, /* 07: CD Audio Volume Rch */
347 0x9f, /* 08: Line Volume Lch */
348 0x9f, /* 09: Line Volume Rch */
349 0x9f, /* 0a: Aux Volume Lch */
350 0x9f, /* 0b: Aux Volume Rch */
351 0x9f, /* 0c: Mono1 Volume */
352 0x9f, /* 0d: Mono2 Volume */
353 0x9f, /* 0e: Mic Volume */
354 0x87, /* 0f: Mono-out Volume */
355 0x00, /* 10: Output Mixer SW1 */
356 0x00, /* 11: Output Mixer SW2 */
357 0x00, /* 12: Lch Input Mixer SW1 */
358 0x00, /* 13: Rch Input Mixer SW1 */
359 0x00, /* 14: Lch Input Mixer SW2 */
360 0x00, /* 15: Rch Input Mixer SW2 */
361 0x00, /* 16: Reset & Power Down */
362 0x00, /* 17: Clock Select */
363 0x00, /* 18: AD Input Select */
364 0x01 /* 19: Mic Amp Setup */
388 if (err < 0) { in snd_ak4531_mixer()
393 ak4531->write(ak4531, AK4531_RESET, 0x03); /* no RST, PD */ in snd_ak4531_mixer()
395 …ak4531->write(ak4531, AK4531_CLOCK, 0x00); /* CODEC ADC and CODEC DAC use {LR,B}CLK2 and run off L… in snd_ak4531_mixer()
396 for (idx = 0; idx <= 0x19; idx++) { in snd_ak4531_mixer()
401 for (idx = 0; idx < ARRAY_SIZE(snd_ak4531_controls); idx++) { in snd_ak4531_mixer()
403 if (err < 0) { in snd_ak4531_mixer()
410 if (err < 0) { in snd_ak4531_mixer()
415 #if 0 in snd_ak4531_mixer()
420 return 0; in snd_ak4531_mixer()
430 ak4531->write(ak4531, AK4531_LMASTER, 0x9f); in snd_ak4531_suspend()
431 ak4531->write(ak4531, AK4531_RMASTER, 0x9f); in snd_ak4531_suspend()
433 ak4531->write(ak4531, AK4531_RESET, 0x01); in snd_ak4531_suspend()
441 ak4531->write(ak4531, AK4531_RESET, 0x03); in snd_ak4531_resume()
443 ak4531->write(ak4531, AK4531_CLOCK, 0x00); in snd_ak4531_resume()
445 for (idx = 0; idx <= 0x19; idx++) { in snd_ak4531_resume()
466 ak4531->regs[AK4531_MIC_GAIN] & 1 ? "+30dB" : "+0dB"); in snd_ak4531_proc_read()