Lines Matching +full:off +full:- +full:chip
1 // SPDX-License-Identifier: GPL-2.0-or-later
20 snd_pmac_burgundy_busy_wait(struct snd_pmac *chip) in snd_pmac_burgundy_busy_wait() argument
23 while ((in_le32(&chip->awacs->codec_ctrl) & MASK_NEWECMD) && timeout--) in snd_pmac_burgundy_busy_wait()
30 snd_pmac_burgundy_extend_wait(struct snd_pmac *chip) in snd_pmac_burgundy_extend_wait() argument
34 while (!(in_le32(&chip->awacs->codec_stat) & MASK_EXTEND) && timeout--) in snd_pmac_burgundy_extend_wait()
39 while ((in_le32(&chip->awacs->codec_stat) & MASK_EXTEND) && timeout--) in snd_pmac_burgundy_extend_wait()
46 snd_pmac_burgundy_wcw(struct snd_pmac *chip, unsigned addr, unsigned val) in snd_pmac_burgundy_wcw() argument
48 out_le32(&chip->awacs->codec_ctrl, addr + 0x200c00 + (val & 0xff)); in snd_pmac_burgundy_wcw()
49 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_wcw()
50 out_le32(&chip->awacs->codec_ctrl, addr + 0x200d00 +((val>>8) & 0xff)); in snd_pmac_burgundy_wcw()
51 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_wcw()
52 out_le32(&chip->awacs->codec_ctrl, addr + 0x200e00 +((val>>16) & 0xff)); in snd_pmac_burgundy_wcw()
53 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_wcw()
54 out_le32(&chip->awacs->codec_ctrl, addr + 0x200f00 +((val>>24) & 0xff)); in snd_pmac_burgundy_wcw()
55 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_wcw()
59 snd_pmac_burgundy_rcw(struct snd_pmac *chip, unsigned addr) in snd_pmac_burgundy_rcw() argument
64 spin_lock_irqsave(&chip->reg_lock, flags); in snd_pmac_burgundy_rcw()
66 out_le32(&chip->awacs->codec_ctrl, addr + 0x100000); in snd_pmac_burgundy_rcw()
67 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_rcw()
68 snd_pmac_burgundy_extend_wait(chip); in snd_pmac_burgundy_rcw()
69 val += (in_le32(&chip->awacs->codec_stat) >> 4) & 0xff; in snd_pmac_burgundy_rcw()
71 out_le32(&chip->awacs->codec_ctrl, addr + 0x100100); in snd_pmac_burgundy_rcw()
72 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_rcw()
73 snd_pmac_burgundy_extend_wait(chip); in snd_pmac_burgundy_rcw()
74 val += ((in_le32(&chip->awacs->codec_stat)>>4) & 0xff) <<8; in snd_pmac_burgundy_rcw()
76 out_le32(&chip->awacs->codec_ctrl, addr + 0x100200); in snd_pmac_burgundy_rcw()
77 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_rcw()
78 snd_pmac_burgundy_extend_wait(chip); in snd_pmac_burgundy_rcw()
79 val += ((in_le32(&chip->awacs->codec_stat)>>4) & 0xff) <<16; in snd_pmac_burgundy_rcw()
81 out_le32(&chip->awacs->codec_ctrl, addr + 0x100300); in snd_pmac_burgundy_rcw()
82 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_rcw()
83 snd_pmac_burgundy_extend_wait(chip); in snd_pmac_burgundy_rcw()
84 val += ((in_le32(&chip->awacs->codec_stat)>>4) & 0xff) <<24; in snd_pmac_burgundy_rcw()
86 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_pmac_burgundy_rcw()
92 snd_pmac_burgundy_wcb(struct snd_pmac *chip, unsigned int addr, in snd_pmac_burgundy_wcb() argument
95 out_le32(&chip->awacs->codec_ctrl, addr + 0x300000 + (val & 0xff)); in snd_pmac_burgundy_wcb()
96 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_wcb()
100 snd_pmac_burgundy_rcb(struct snd_pmac *chip, unsigned int addr) in snd_pmac_burgundy_rcb() argument
105 spin_lock_irqsave(&chip->reg_lock, flags); in snd_pmac_burgundy_rcb()
107 out_le32(&chip->awacs->codec_ctrl, addr + 0x100000); in snd_pmac_burgundy_rcb()
108 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_rcb()
109 snd_pmac_burgundy_extend_wait(chip); in snd_pmac_burgundy_rcb()
110 val += (in_le32(&chip->awacs->codec_stat) >> 4) & 0xff; in snd_pmac_burgundy_rcb()
112 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_pmac_burgundy_rcb()
121 * Burgundy volume: 0 - 100, stereo, word reg
124 snd_pmac_burgundy_write_volume(struct snd_pmac *chip, unsigned int address, in snd_pmac_burgundy_write_volume() argument
131 return; /* -EINVAL */ in snd_pmac_burgundy_write_volume()
139 snd_pmac_burgundy_wcw(chip, address, hardvolume); in snd_pmac_burgundy_write_volume()
143 snd_pmac_burgundy_read_volume(struct snd_pmac *chip, unsigned int address, in snd_pmac_burgundy_read_volume() argument
148 wvolume = snd_pmac_burgundy_rcw(chip, address); in snd_pmac_burgundy_read_volume()
152 volume[0] -= BURGUNDY_VOLUME_OFFSET; in snd_pmac_burgundy_read_volume()
157 volume[1] -= BURGUNDY_VOLUME_OFFSET; in snd_pmac_burgundy_read_volume()
165 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_pmac_burgundy_info_volume()
166 uinfo->count = 2; in snd_pmac_burgundy_info_volume()
167 uinfo->value.integer.min = 0; in snd_pmac_burgundy_info_volume()
168 uinfo->value.integer.max = 100; in snd_pmac_burgundy_info_volume()
175 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_get_volume() local
176 unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); in snd_pmac_burgundy_get_volume()
177 int shift = (kcontrol->private_value >> 8) & 0xff; in snd_pmac_burgundy_get_volume()
178 snd_pmac_burgundy_read_volume(chip, addr, in snd_pmac_burgundy_get_volume()
179 ucontrol->value.integer.value, shift); in snd_pmac_burgundy_get_volume()
186 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_put_volume() local
187 unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); in snd_pmac_burgundy_put_volume()
188 int shift = (kcontrol->private_value >> 8) & 0xff; in snd_pmac_burgundy_put_volume()
191 snd_pmac_burgundy_write_volume(chip, addr, in snd_pmac_burgundy_put_volume()
192 ucontrol->value.integer.value, shift); in snd_pmac_burgundy_put_volume()
193 snd_pmac_burgundy_read_volume(chip, addr, nvoices, shift); in snd_pmac_burgundy_put_volume()
194 return (nvoices[0] != ucontrol->value.integer.value[0] || in snd_pmac_burgundy_put_volume()
195 nvoices[1] != ucontrol->value.integer.value[1]); in snd_pmac_burgundy_put_volume()
206 * Burgundy volume: 0 - 100, stereo, 2-byte reg
209 snd_pmac_burgundy_write_volume_2b(struct snd_pmac *chip, unsigned int address, in snd_pmac_burgundy_write_volume_2b() argument
210 long *volume, int off) in snd_pmac_burgundy_write_volume_2b() argument
214 off |= off << 2; in snd_pmac_burgundy_write_volume_2b()
218 snd_pmac_burgundy_wcb(chip, address + off, lvolume); in snd_pmac_burgundy_write_volume_2b()
219 snd_pmac_burgundy_wcb(chip, address + off + 0x500, rvolume); in snd_pmac_burgundy_write_volume_2b()
223 snd_pmac_burgundy_read_volume_2b(struct snd_pmac *chip, unsigned int address, in snd_pmac_burgundy_read_volume_2b() argument
224 long *volume, int off) in snd_pmac_burgundy_read_volume_2b() argument
226 volume[0] = snd_pmac_burgundy_rcb(chip, address + off); in snd_pmac_burgundy_read_volume_2b()
228 volume[0] -= BURGUNDY_VOLUME_OFFSET; in snd_pmac_burgundy_read_volume_2b()
231 volume[1] = snd_pmac_burgundy_rcb(chip, address + off + 0x100); in snd_pmac_burgundy_read_volume_2b()
233 volume[1] -= BURGUNDY_VOLUME_OFFSET; in snd_pmac_burgundy_read_volume_2b()
241 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_pmac_burgundy_info_volume_2b()
242 uinfo->count = 2; in snd_pmac_burgundy_info_volume_2b()
243 uinfo->value.integer.min = 0; in snd_pmac_burgundy_info_volume_2b()
244 uinfo->value.integer.max = 100; in snd_pmac_burgundy_info_volume_2b()
251 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_get_volume_2b() local
252 unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); in snd_pmac_burgundy_get_volume_2b()
253 int off = kcontrol->private_value & 0x300; in snd_pmac_burgundy_get_volume_2b() local
254 snd_pmac_burgundy_read_volume_2b(chip, addr, in snd_pmac_burgundy_get_volume_2b()
255 ucontrol->value.integer.value, off); in snd_pmac_burgundy_get_volume_2b()
262 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_put_volume_2b() local
263 unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); in snd_pmac_burgundy_put_volume_2b()
264 int off = kcontrol->private_value & 0x300; in snd_pmac_burgundy_put_volume_2b() local
267 snd_pmac_burgundy_write_volume_2b(chip, addr, in snd_pmac_burgundy_put_volume_2b()
268 ucontrol->value.integer.value, off); in snd_pmac_burgundy_put_volume_2b()
269 snd_pmac_burgundy_read_volume_2b(chip, addr, nvoices, off); in snd_pmac_burgundy_put_volume_2b()
270 return (nvoices[0] != ucontrol->value.integer.value[0] || in snd_pmac_burgundy_put_volume_2b()
271 nvoices[1] != ucontrol->value.integer.value[1]); in snd_pmac_burgundy_put_volume_2b()
274 #define BURGUNDY_VOLUME_2B(xname, xindex, addr, off) \ argument
279 .private_value = ((ADDR2BASE(addr) & 0xff) | ((off) << 8)) }
282 * Burgundy gain/attenuation: 0 - 15, mono/stereo, byte reg
287 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_info_gain()
288 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_pmac_burgundy_info_gain()
289 uinfo->count = stereo + 1; in snd_pmac_burgundy_info_gain()
290 uinfo->value.integer.min = 0; in snd_pmac_burgundy_info_gain()
291 uinfo->value.integer.max = 15; in snd_pmac_burgundy_info_gain()
298 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_get_gain() local
299 unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); in snd_pmac_burgundy_get_gain()
300 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_get_gain()
301 int atten = (kcontrol->private_value >> 25) & 1; in snd_pmac_burgundy_get_gain()
304 oval = snd_pmac_burgundy_rcb(chip, addr); in snd_pmac_burgundy_get_gain()
307 ucontrol->value.integer.value[0] = oval & 0xf; in snd_pmac_burgundy_get_gain()
309 ucontrol->value.integer.value[1] = (oval >> 4) & 0xf; in snd_pmac_burgundy_get_gain()
316 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_put_gain() local
317 unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); in snd_pmac_burgundy_put_gain()
318 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_put_gain()
319 int atten = (kcontrol->private_value >> 25) & 1; in snd_pmac_burgundy_put_gain()
322 oval = snd_pmac_burgundy_rcb(chip, addr); in snd_pmac_burgundy_put_gain()
325 val = ucontrol->value.integer.value[0]; in snd_pmac_burgundy_put_gain()
327 val |= ucontrol->value.integer.value[1] << 4; in snd_pmac_burgundy_put_gain()
329 val |= ucontrol->value.integer.value[0] << 4; in snd_pmac_burgundy_put_gain()
332 snd_pmac_burgundy_wcb(chip, addr, val); in snd_pmac_burgundy_put_gain()
349 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_info_switch_w()
350 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; in snd_pmac_burgundy_info_switch_w()
351 uinfo->count = stereo + 1; in snd_pmac_burgundy_info_switch_w()
352 uinfo->value.integer.min = 0; in snd_pmac_burgundy_info_switch_w()
353 uinfo->value.integer.max = 1; in snd_pmac_burgundy_info_switch_w()
360 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_get_switch_w() local
361 unsigned int addr = BASE2ADDR((kcontrol->private_value >> 16) & 0xff); in snd_pmac_burgundy_get_switch_w()
362 int lmask = 1 << (kcontrol->private_value & 0xff); in snd_pmac_burgundy_get_switch_w()
363 int rmask = 1 << ((kcontrol->private_value >> 8) & 0xff); in snd_pmac_burgundy_get_switch_w()
364 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_get_switch_w()
365 int val = snd_pmac_burgundy_rcw(chip, addr); in snd_pmac_burgundy_get_switch_w()
366 ucontrol->value.integer.value[0] = (val & lmask) ? 1 : 0; in snd_pmac_burgundy_get_switch_w()
368 ucontrol->value.integer.value[1] = (val & rmask) ? 1 : 0; in snd_pmac_burgundy_get_switch_w()
375 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_put_switch_w() local
376 unsigned int addr = BASE2ADDR((kcontrol->private_value >> 16) & 0xff); in snd_pmac_burgundy_put_switch_w()
377 int lmask = 1 << (kcontrol->private_value & 0xff); in snd_pmac_burgundy_put_switch_w()
378 int rmask = 1 << ((kcontrol->private_value >> 8) & 0xff); in snd_pmac_burgundy_put_switch_w()
379 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_put_switch_w()
381 oval = snd_pmac_burgundy_rcw(chip, addr); in snd_pmac_burgundy_put_switch_w()
383 if (ucontrol->value.integer.value[0]) in snd_pmac_burgundy_put_switch_w()
385 if (stereo && ucontrol->value.integer.value[1]) in snd_pmac_burgundy_put_switch_w()
387 snd_pmac_burgundy_wcw(chip, addr, val); in snd_pmac_burgundy_put_switch_w()
405 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_info_switch_b()
406 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; in snd_pmac_burgundy_info_switch_b()
407 uinfo->count = stereo + 1; in snd_pmac_burgundy_info_switch_b()
408 uinfo->value.integer.min = 0; in snd_pmac_burgundy_info_switch_b()
409 uinfo->value.integer.max = 1; in snd_pmac_burgundy_info_switch_b()
416 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_get_switch_b() local
417 unsigned int addr = BASE2ADDR((kcontrol->private_value >> 16) & 0xff); in snd_pmac_burgundy_get_switch_b()
418 int lmask = kcontrol->private_value & 0xff; in snd_pmac_burgundy_get_switch_b()
419 int rmask = (kcontrol->private_value >> 8) & 0xff; in snd_pmac_burgundy_get_switch_b()
420 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_get_switch_b()
421 int val = snd_pmac_burgundy_rcb(chip, addr); in snd_pmac_burgundy_get_switch_b()
422 ucontrol->value.integer.value[0] = (val & lmask) ? 1 : 0; in snd_pmac_burgundy_get_switch_b()
424 ucontrol->value.integer.value[1] = (val & rmask) ? 1 : 0; in snd_pmac_burgundy_get_switch_b()
431 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_put_switch_b() local
432 unsigned int addr = BASE2ADDR((kcontrol->private_value >> 16) & 0xff); in snd_pmac_burgundy_put_switch_b()
433 int lmask = kcontrol->private_value & 0xff; in snd_pmac_burgundy_put_switch_b()
434 int rmask = (kcontrol->private_value >> 8) & 0xff; in snd_pmac_burgundy_put_switch_b()
435 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_put_switch_b()
437 oval = snd_pmac_burgundy_rcb(chip, addr); in snd_pmac_burgundy_put_switch_b()
439 if (ucontrol->value.integer.value[0]) in snd_pmac_burgundy_put_switch_b()
441 if (stereo && ucontrol->value.integer.value[1]) in snd_pmac_burgundy_put_switch_b()
443 snd_pmac_burgundy_wcb(chip, addr, val); in snd_pmac_burgundy_put_switch_b()
562 * auto-mute stuffs
564 static int snd_pmac_burgundy_detect_headphone(struct snd_pmac *chip) in snd_pmac_burgundy_detect_headphone() argument
566 return (in_le32(&chip->awacs->codec_stat) & chip->hp_stat_mask) ? 1 : 0; in snd_pmac_burgundy_detect_headphone()
569 static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_notify) in snd_pmac_burgundy_update_automute() argument
571 if (chip->auto_mute) { in snd_pmac_burgundy_update_automute()
574 reg = oreg = snd_pmac_burgundy_rcb(chip, in snd_pmac_burgundy_update_automute()
580 if (snd_pmac_burgundy_detect_headphone(chip)) in snd_pmac_burgundy_update_automute()
590 snd_pmac_burgundy_wcb(chip, in snd_pmac_burgundy_update_automute()
593 snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, in snd_pmac_burgundy_update_automute()
594 &chip->master_sw_ctl->id); in snd_pmac_burgundy_update_automute()
595 snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, in snd_pmac_burgundy_update_automute()
596 &chip->speaker_sw_ctl->id); in snd_pmac_burgundy_update_automute()
597 snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, in snd_pmac_burgundy_update_automute()
598 &chip->hp_detect_ctl->id); in snd_pmac_burgundy_update_automute()
608 int snd_pmac_burgundy_init(struct snd_pmac *chip) in snd_pmac_burgundy_init() argument
613 /* Checks to see the chip is alive and kicking */ in snd_pmac_burgundy_init()
614 if ((in_le32(&chip->awacs->codec_ctrl) & MASK_ERRCODE) == 0xf0000) { in snd_pmac_burgundy_init()
615 printk(KERN_WARNING "pmac burgundy: disabled by MacOS :-(\n"); in snd_pmac_burgundy_init()
619 snd_pmac_burgundy_wcw(chip, MASK_ADDR_BURGUNDY_OUTPUTENABLES, in snd_pmac_burgundy_init()
621 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES, in snd_pmac_burgundy_init()
623 snd_pmac_burgundy_wcw(chip, MASK_ADDR_BURGUNDY_OUTPUTSELECTS, in snd_pmac_burgundy_init()
626 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_INPSEL21, in snd_pmac_burgundy_init()
628 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_INPSEL3, in snd_pmac_burgundy_init()
631 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_GAINCD, in snd_pmac_burgundy_init()
633 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_GAINLINE, in snd_pmac_burgundy_init()
635 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_GAINMIC, in snd_pmac_burgundy_init()
637 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_GAINMODEM, in snd_pmac_burgundy_init()
640 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_ATTENSPEAKER, in snd_pmac_burgundy_init()
642 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_ATTENLINEOUT, in snd_pmac_burgundy_init()
644 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_ATTENHP, in snd_pmac_burgundy_init()
647 snd_pmac_burgundy_wcw(chip, MASK_ADDR_BURGUNDY_MASTER_VOLUME, in snd_pmac_burgundy_init()
649 snd_pmac_burgundy_wcw(chip, MASK_ADDR_BURGUNDY_VOLCD, in snd_pmac_burgundy_init()
651 snd_pmac_burgundy_wcw(chip, MASK_ADDR_BURGUNDY_VOLLINE, in snd_pmac_burgundy_init()
653 snd_pmac_burgundy_wcw(chip, MASK_ADDR_BURGUNDY_VOLMIC, in snd_pmac_burgundy_init()
656 if (chip->hp_stat_mask == 0) { in snd_pmac_burgundy_init()
657 /* set headphone-jack detection bit */ in snd_pmac_burgundy_init()
659 chip->hp_stat_mask = BURGUNDY_HPDETECT_IMAC_UPPER in snd_pmac_burgundy_init()
663 chip->hp_stat_mask = BURGUNDY_HPDETECT_PMAC_BACK; in snd_pmac_burgundy_init()
668 strcpy(chip->card->mixername, "PowerMac Burgundy"); in snd_pmac_burgundy_init()
671 err = snd_ctl_add(chip->card, in snd_pmac_burgundy_init()
672 snd_ctl_new1(&snd_pmac_burgundy_mixers[i], chip)); in snd_pmac_burgundy_init()
678 err = snd_ctl_add(chip->card, in snd_pmac_burgundy_init()
680 : &snd_pmac_burgundy_mixers_pmac[i], chip)); in snd_pmac_burgundy_init()
684 chip->master_sw_ctl = snd_ctl_new1(imac in snd_pmac_burgundy_init()
686 : &snd_pmac_burgundy_master_sw_pmac, chip); in snd_pmac_burgundy_init()
687 err = snd_ctl_add(chip->card, chip->master_sw_ctl); in snd_pmac_burgundy_init()
690 chip->master_sw_ctl = snd_ctl_new1(imac in snd_pmac_burgundy_init()
692 : &snd_pmac_burgundy_line_sw_pmac, chip); in snd_pmac_burgundy_init()
693 err = snd_ctl_add(chip->card, chip->master_sw_ctl); in snd_pmac_burgundy_init()
697 chip->master_sw_ctl = snd_ctl_new1( in snd_pmac_burgundy_init()
698 &snd_pmac_burgundy_hp_sw_imac, chip); in snd_pmac_burgundy_init()
699 err = snd_ctl_add(chip->card, chip->master_sw_ctl); in snd_pmac_burgundy_init()
703 chip->speaker_sw_ctl = snd_ctl_new1(imac in snd_pmac_burgundy_init()
705 : &snd_pmac_burgundy_speaker_sw_pmac, chip); in snd_pmac_burgundy_init()
706 err = snd_ctl_add(chip->card, chip->speaker_sw_ctl); in snd_pmac_burgundy_init()
710 err = snd_pmac_add_automute(chip); in snd_pmac_burgundy_init()
714 chip->detect_headphone = snd_pmac_burgundy_detect_headphone; in snd_pmac_burgundy_init()
715 chip->update_automute = snd_pmac_burgundy_update_automute; in snd_pmac_burgundy_init()
716 snd_pmac_burgundy_update_automute(chip, 0); /* update the status only */ in snd_pmac_burgundy_init()