Lines Matching +full:off +full:- +full:chip
1 // SPDX-License-Identifier: GPL-2.0-or-later
19 snd_pmac_burgundy_busy_wait(struct snd_pmac *chip) in snd_pmac_burgundy_busy_wait() argument
22 while ((in_le32(&chip->awacs->codec_ctrl) & MASK_NEWECMD) && timeout--) in snd_pmac_burgundy_busy_wait()
29 snd_pmac_burgundy_extend_wait(struct snd_pmac *chip) in snd_pmac_burgundy_extend_wait() argument
33 while (!(in_le32(&chip->awacs->codec_stat) & MASK_EXTEND) && timeout--) in snd_pmac_burgundy_extend_wait()
38 while ((in_le32(&chip->awacs->codec_stat) & MASK_EXTEND) && timeout--) in snd_pmac_burgundy_extend_wait()
45 snd_pmac_burgundy_wcw(struct snd_pmac *chip, unsigned addr, unsigned val) in snd_pmac_burgundy_wcw() argument
47 out_le32(&chip->awacs->codec_ctrl, addr + 0x200c00 + (val & 0xff)); in snd_pmac_burgundy_wcw()
48 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_wcw()
49 out_le32(&chip->awacs->codec_ctrl, addr + 0x200d00 +((val>>8) & 0xff)); in snd_pmac_burgundy_wcw()
50 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_wcw()
51 out_le32(&chip->awacs->codec_ctrl, addr + 0x200e00 +((val>>16) & 0xff)); in snd_pmac_burgundy_wcw()
52 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_wcw()
53 out_le32(&chip->awacs->codec_ctrl, addr + 0x200f00 +((val>>24) & 0xff)); in snd_pmac_burgundy_wcw()
54 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_wcw()
58 snd_pmac_burgundy_rcw(struct snd_pmac *chip, unsigned addr) in snd_pmac_burgundy_rcw() argument
63 spin_lock_irqsave(&chip->reg_lock, flags); in snd_pmac_burgundy_rcw()
65 out_le32(&chip->awacs->codec_ctrl, addr + 0x100000); in snd_pmac_burgundy_rcw()
66 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_rcw()
67 snd_pmac_burgundy_extend_wait(chip); in snd_pmac_burgundy_rcw()
68 val += (in_le32(&chip->awacs->codec_stat) >> 4) & 0xff; in snd_pmac_burgundy_rcw()
70 out_le32(&chip->awacs->codec_ctrl, addr + 0x100100); in snd_pmac_burgundy_rcw()
71 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_rcw()
72 snd_pmac_burgundy_extend_wait(chip); in snd_pmac_burgundy_rcw()
73 val += ((in_le32(&chip->awacs->codec_stat)>>4) & 0xff) <<8; in snd_pmac_burgundy_rcw()
75 out_le32(&chip->awacs->codec_ctrl, addr + 0x100200); in snd_pmac_burgundy_rcw()
76 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_rcw()
77 snd_pmac_burgundy_extend_wait(chip); in snd_pmac_burgundy_rcw()
78 val += ((in_le32(&chip->awacs->codec_stat)>>4) & 0xff) <<16; in snd_pmac_burgundy_rcw()
80 out_le32(&chip->awacs->codec_ctrl, addr + 0x100300); in snd_pmac_burgundy_rcw()
81 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_rcw()
82 snd_pmac_burgundy_extend_wait(chip); in snd_pmac_burgundy_rcw()
83 val += ((in_le32(&chip->awacs->codec_stat)>>4) & 0xff) <<24; in snd_pmac_burgundy_rcw()
85 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_pmac_burgundy_rcw()
91 snd_pmac_burgundy_wcb(struct snd_pmac *chip, unsigned int addr, in snd_pmac_burgundy_wcb() argument
94 out_le32(&chip->awacs->codec_ctrl, addr + 0x300000 + (val & 0xff)); in snd_pmac_burgundy_wcb()
95 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_wcb()
99 snd_pmac_burgundy_rcb(struct snd_pmac *chip, unsigned int addr) in snd_pmac_burgundy_rcb() argument
104 spin_lock_irqsave(&chip->reg_lock, flags); in snd_pmac_burgundy_rcb()
106 out_le32(&chip->awacs->codec_ctrl, addr + 0x100000); in snd_pmac_burgundy_rcb()
107 snd_pmac_burgundy_busy_wait(chip); in snd_pmac_burgundy_rcb()
108 snd_pmac_burgundy_extend_wait(chip); in snd_pmac_burgundy_rcb()
109 val += (in_le32(&chip->awacs->codec_stat) >> 4) & 0xff; in snd_pmac_burgundy_rcb()
111 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_pmac_burgundy_rcb()
120 * Burgundy volume: 0 - 100, stereo, word reg
123 snd_pmac_burgundy_write_volume(struct snd_pmac *chip, unsigned int address, in snd_pmac_burgundy_write_volume() argument
130 return; /* -EINVAL */ in snd_pmac_burgundy_write_volume()
138 snd_pmac_burgundy_wcw(chip, address, hardvolume); in snd_pmac_burgundy_write_volume()
142 snd_pmac_burgundy_read_volume(struct snd_pmac *chip, unsigned int address, in snd_pmac_burgundy_read_volume() argument
147 wvolume = snd_pmac_burgundy_rcw(chip, address); in snd_pmac_burgundy_read_volume()
151 volume[0] -= BURGUNDY_VOLUME_OFFSET; in snd_pmac_burgundy_read_volume()
156 volume[1] -= BURGUNDY_VOLUME_OFFSET; in snd_pmac_burgundy_read_volume()
164 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_pmac_burgundy_info_volume()
165 uinfo->count = 2; in snd_pmac_burgundy_info_volume()
166 uinfo->value.integer.min = 0; in snd_pmac_burgundy_info_volume()
167 uinfo->value.integer.max = 100; in snd_pmac_burgundy_info_volume()
174 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_get_volume() local
175 unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); in snd_pmac_burgundy_get_volume()
176 int shift = (kcontrol->private_value >> 8) & 0xff; in snd_pmac_burgundy_get_volume()
177 snd_pmac_burgundy_read_volume(chip, addr, in snd_pmac_burgundy_get_volume()
178 ucontrol->value.integer.value, shift); in snd_pmac_burgundy_get_volume()
185 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_put_volume() local
186 unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); in snd_pmac_burgundy_put_volume()
187 int shift = (kcontrol->private_value >> 8) & 0xff; in snd_pmac_burgundy_put_volume()
190 snd_pmac_burgundy_write_volume(chip, addr, in snd_pmac_burgundy_put_volume()
191 ucontrol->value.integer.value, shift); in snd_pmac_burgundy_put_volume()
192 snd_pmac_burgundy_read_volume(chip, addr, nvoices, shift); in snd_pmac_burgundy_put_volume()
193 return (nvoices[0] != ucontrol->value.integer.value[0] || in snd_pmac_burgundy_put_volume()
194 nvoices[1] != ucontrol->value.integer.value[1]); in snd_pmac_burgundy_put_volume()
205 * Burgundy volume: 0 - 100, stereo, 2-byte reg
208 snd_pmac_burgundy_write_volume_2b(struct snd_pmac *chip, unsigned int address, in snd_pmac_burgundy_write_volume_2b() argument
209 long *volume, int off) in snd_pmac_burgundy_write_volume_2b() argument
213 off |= off << 2; in snd_pmac_burgundy_write_volume_2b()
217 snd_pmac_burgundy_wcb(chip, address + off, lvolume); in snd_pmac_burgundy_write_volume_2b()
218 snd_pmac_burgundy_wcb(chip, address + off + 0x500, rvolume); in snd_pmac_burgundy_write_volume_2b()
222 snd_pmac_burgundy_read_volume_2b(struct snd_pmac *chip, unsigned int address, in snd_pmac_burgundy_read_volume_2b() argument
223 long *volume, int off) in snd_pmac_burgundy_read_volume_2b() argument
225 volume[0] = snd_pmac_burgundy_rcb(chip, address + off); in snd_pmac_burgundy_read_volume_2b()
227 volume[0] -= BURGUNDY_VOLUME_OFFSET; in snd_pmac_burgundy_read_volume_2b()
230 volume[1] = snd_pmac_burgundy_rcb(chip, address + off + 0x100); in snd_pmac_burgundy_read_volume_2b()
232 volume[1] -= BURGUNDY_VOLUME_OFFSET; in snd_pmac_burgundy_read_volume_2b()
240 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_pmac_burgundy_info_volume_2b()
241 uinfo->count = 2; in snd_pmac_burgundy_info_volume_2b()
242 uinfo->value.integer.min = 0; in snd_pmac_burgundy_info_volume_2b()
243 uinfo->value.integer.max = 100; in snd_pmac_burgundy_info_volume_2b()
250 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_get_volume_2b() local
251 unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); in snd_pmac_burgundy_get_volume_2b()
252 int off = kcontrol->private_value & 0x300; in snd_pmac_burgundy_get_volume_2b() local
253 snd_pmac_burgundy_read_volume_2b(chip, addr, in snd_pmac_burgundy_get_volume_2b()
254 ucontrol->value.integer.value, off); in snd_pmac_burgundy_get_volume_2b()
261 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_put_volume_2b() local
262 unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); in snd_pmac_burgundy_put_volume_2b()
263 int off = kcontrol->private_value & 0x300; in snd_pmac_burgundy_put_volume_2b() local
266 snd_pmac_burgundy_write_volume_2b(chip, addr, in snd_pmac_burgundy_put_volume_2b()
267 ucontrol->value.integer.value, off); in snd_pmac_burgundy_put_volume_2b()
268 snd_pmac_burgundy_read_volume_2b(chip, addr, nvoices, off); in snd_pmac_burgundy_put_volume_2b()
269 return (nvoices[0] != ucontrol->value.integer.value[0] || in snd_pmac_burgundy_put_volume_2b()
270 nvoices[1] != ucontrol->value.integer.value[1]); in snd_pmac_burgundy_put_volume_2b()
273 #define BURGUNDY_VOLUME_2B(xname, xindex, addr, off) \ argument
278 .private_value = ((ADDR2BASE(addr) & 0xff) | ((off) << 8)) }
281 * Burgundy gain/attenuation: 0 - 15, mono/stereo, byte reg
286 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_info_gain()
287 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_pmac_burgundy_info_gain()
288 uinfo->count = stereo + 1; in snd_pmac_burgundy_info_gain()
289 uinfo->value.integer.min = 0; in snd_pmac_burgundy_info_gain()
290 uinfo->value.integer.max = 15; in snd_pmac_burgundy_info_gain()
297 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_get_gain() local
298 unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); in snd_pmac_burgundy_get_gain()
299 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_get_gain()
300 int atten = (kcontrol->private_value >> 25) & 1; in snd_pmac_burgundy_get_gain()
303 oval = snd_pmac_burgundy_rcb(chip, addr); in snd_pmac_burgundy_get_gain()
306 ucontrol->value.integer.value[0] = oval & 0xf; in snd_pmac_burgundy_get_gain()
308 ucontrol->value.integer.value[1] = (oval >> 4) & 0xf; in snd_pmac_burgundy_get_gain()
315 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_put_gain() local
316 unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); in snd_pmac_burgundy_put_gain()
317 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_put_gain()
318 int atten = (kcontrol->private_value >> 25) & 1; in snd_pmac_burgundy_put_gain()
321 oval = snd_pmac_burgundy_rcb(chip, addr); in snd_pmac_burgundy_put_gain()
324 val = ucontrol->value.integer.value[0]; in snd_pmac_burgundy_put_gain()
326 val |= ucontrol->value.integer.value[1] << 4; in snd_pmac_burgundy_put_gain()
328 val |= ucontrol->value.integer.value[0] << 4; in snd_pmac_burgundy_put_gain()
331 snd_pmac_burgundy_wcb(chip, addr, val); in snd_pmac_burgundy_put_gain()
348 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_info_switch_w()
349 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; in snd_pmac_burgundy_info_switch_w()
350 uinfo->count = stereo + 1; in snd_pmac_burgundy_info_switch_w()
351 uinfo->value.integer.min = 0; in snd_pmac_burgundy_info_switch_w()
352 uinfo->value.integer.max = 1; in snd_pmac_burgundy_info_switch_w()
359 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_get_switch_w() local
360 unsigned int addr = BASE2ADDR((kcontrol->private_value >> 16) & 0xff); in snd_pmac_burgundy_get_switch_w()
361 int lmask = 1 << (kcontrol->private_value & 0xff); in snd_pmac_burgundy_get_switch_w()
362 int rmask = 1 << ((kcontrol->private_value >> 8) & 0xff); in snd_pmac_burgundy_get_switch_w()
363 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_get_switch_w()
364 int val = snd_pmac_burgundy_rcw(chip, addr); in snd_pmac_burgundy_get_switch_w()
365 ucontrol->value.integer.value[0] = (val & lmask) ? 1 : 0; in snd_pmac_burgundy_get_switch_w()
367 ucontrol->value.integer.value[1] = (val & rmask) ? 1 : 0; in snd_pmac_burgundy_get_switch_w()
374 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_put_switch_w() local
375 unsigned int addr = BASE2ADDR((kcontrol->private_value >> 16) & 0xff); in snd_pmac_burgundy_put_switch_w()
376 int lmask = 1 << (kcontrol->private_value & 0xff); in snd_pmac_burgundy_put_switch_w()
377 int rmask = 1 << ((kcontrol->private_value >> 8) & 0xff); in snd_pmac_burgundy_put_switch_w()
378 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_put_switch_w()
380 oval = snd_pmac_burgundy_rcw(chip, addr); in snd_pmac_burgundy_put_switch_w()
382 if (ucontrol->value.integer.value[0]) in snd_pmac_burgundy_put_switch_w()
384 if (stereo && ucontrol->value.integer.value[1]) in snd_pmac_burgundy_put_switch_w()
386 snd_pmac_burgundy_wcw(chip, addr, val); in snd_pmac_burgundy_put_switch_w()
404 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_info_switch_b()
405 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; in snd_pmac_burgundy_info_switch_b()
406 uinfo->count = stereo + 1; in snd_pmac_burgundy_info_switch_b()
407 uinfo->value.integer.min = 0; in snd_pmac_burgundy_info_switch_b()
408 uinfo->value.integer.max = 1; in snd_pmac_burgundy_info_switch_b()
415 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_get_switch_b() local
416 unsigned int addr = BASE2ADDR((kcontrol->private_value >> 16) & 0xff); in snd_pmac_burgundy_get_switch_b()
417 int lmask = kcontrol->private_value & 0xff; in snd_pmac_burgundy_get_switch_b()
418 int rmask = (kcontrol->private_value >> 8) & 0xff; in snd_pmac_burgundy_get_switch_b()
419 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_get_switch_b()
420 int val = snd_pmac_burgundy_rcb(chip, addr); in snd_pmac_burgundy_get_switch_b()
421 ucontrol->value.integer.value[0] = (val & lmask) ? 1 : 0; in snd_pmac_burgundy_get_switch_b()
423 ucontrol->value.integer.value[1] = (val & rmask) ? 1 : 0; in snd_pmac_burgundy_get_switch_b()
430 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); in snd_pmac_burgundy_put_switch_b() local
431 unsigned int addr = BASE2ADDR((kcontrol->private_value >> 16) & 0xff); in snd_pmac_burgundy_put_switch_b()
432 int lmask = kcontrol->private_value & 0xff; in snd_pmac_burgundy_put_switch_b()
433 int rmask = (kcontrol->private_value >> 8) & 0xff; in snd_pmac_burgundy_put_switch_b()
434 int stereo = (kcontrol->private_value >> 24) & 1; in snd_pmac_burgundy_put_switch_b()
436 oval = snd_pmac_burgundy_rcb(chip, addr); in snd_pmac_burgundy_put_switch_b()
438 if (ucontrol->value.integer.value[0]) in snd_pmac_burgundy_put_switch_b()
440 if (stereo && ucontrol->value.integer.value[1]) in snd_pmac_burgundy_put_switch_b()
442 snd_pmac_burgundy_wcb(chip, addr, val); in snd_pmac_burgundy_put_switch_b()
561 * auto-mute stuffs
563 static int snd_pmac_burgundy_detect_headphone(struct snd_pmac *chip) in snd_pmac_burgundy_detect_headphone() argument
565 return (in_le32(&chip->awacs->codec_stat) & chip->hp_stat_mask) ? 1 : 0; in snd_pmac_burgundy_detect_headphone()
568 static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_notify) in snd_pmac_burgundy_update_automute() argument
570 if (chip->auto_mute) { in snd_pmac_burgundy_update_automute()
573 reg = oreg = snd_pmac_burgundy_rcb(chip, in snd_pmac_burgundy_update_automute()
579 if (snd_pmac_burgundy_detect_headphone(chip)) in snd_pmac_burgundy_update_automute()
589 snd_pmac_burgundy_wcb(chip, in snd_pmac_burgundy_update_automute()
592 snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, in snd_pmac_burgundy_update_automute()
593 &chip->master_sw_ctl->id); in snd_pmac_burgundy_update_automute()
594 snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, in snd_pmac_burgundy_update_automute()
595 &chip->speaker_sw_ctl->id); in snd_pmac_burgundy_update_automute()
596 snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, in snd_pmac_burgundy_update_automute()
597 &chip->hp_detect_ctl->id); in snd_pmac_burgundy_update_automute()
607 int snd_pmac_burgundy_init(struct snd_pmac *chip) in snd_pmac_burgundy_init() argument
612 /* Checks to see the chip is alive and kicking */ in snd_pmac_burgundy_init()
613 if ((in_le32(&chip->awacs->codec_ctrl) & MASK_ERRCODE) == 0xf0000) { in snd_pmac_burgundy_init()
614 printk(KERN_WARNING "pmac burgundy: disabled by MacOS :-(\n"); in snd_pmac_burgundy_init()
618 snd_pmac_burgundy_wcw(chip, MASK_ADDR_BURGUNDY_OUTPUTENABLES, in snd_pmac_burgundy_init()
620 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES, in snd_pmac_burgundy_init()
622 snd_pmac_burgundy_wcw(chip, MASK_ADDR_BURGUNDY_OUTPUTSELECTS, in snd_pmac_burgundy_init()
625 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_INPSEL21, in snd_pmac_burgundy_init()
627 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_INPSEL3, in snd_pmac_burgundy_init()
630 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_GAINCD, in snd_pmac_burgundy_init()
632 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_GAINLINE, in snd_pmac_burgundy_init()
634 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_GAINMIC, in snd_pmac_burgundy_init()
636 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_GAINMODEM, in snd_pmac_burgundy_init()
639 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_ATTENSPEAKER, in snd_pmac_burgundy_init()
641 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_ATTENLINEOUT, in snd_pmac_burgundy_init()
643 snd_pmac_burgundy_wcb(chip, MASK_ADDR_BURGUNDY_ATTENHP, in snd_pmac_burgundy_init()
646 snd_pmac_burgundy_wcw(chip, MASK_ADDR_BURGUNDY_MASTER_VOLUME, in snd_pmac_burgundy_init()
648 snd_pmac_burgundy_wcw(chip, MASK_ADDR_BURGUNDY_VOLCD, in snd_pmac_burgundy_init()
650 snd_pmac_burgundy_wcw(chip, MASK_ADDR_BURGUNDY_VOLLINE, in snd_pmac_burgundy_init()
652 snd_pmac_burgundy_wcw(chip, MASK_ADDR_BURGUNDY_VOLMIC, in snd_pmac_burgundy_init()
655 if (chip->hp_stat_mask == 0) { in snd_pmac_burgundy_init()
656 /* set headphone-jack detection bit */ in snd_pmac_burgundy_init()
658 chip->hp_stat_mask = BURGUNDY_HPDETECT_IMAC_UPPER in snd_pmac_burgundy_init()
662 chip->hp_stat_mask = BURGUNDY_HPDETECT_PMAC_BACK; in snd_pmac_burgundy_init()
667 strcpy(chip->card->mixername, "PowerMac Burgundy"); in snd_pmac_burgundy_init()
670 err = snd_ctl_add(chip->card, in snd_pmac_burgundy_init()
671 snd_ctl_new1(&snd_pmac_burgundy_mixers[i], chip)); in snd_pmac_burgundy_init()
677 err = snd_ctl_add(chip->card, in snd_pmac_burgundy_init()
679 : &snd_pmac_burgundy_mixers_pmac[i], chip)); in snd_pmac_burgundy_init()
683 chip->master_sw_ctl = snd_ctl_new1(imac in snd_pmac_burgundy_init()
685 : &snd_pmac_burgundy_master_sw_pmac, chip); in snd_pmac_burgundy_init()
686 err = snd_ctl_add(chip->card, chip->master_sw_ctl); in snd_pmac_burgundy_init()
689 chip->master_sw_ctl = snd_ctl_new1(imac in snd_pmac_burgundy_init()
691 : &snd_pmac_burgundy_line_sw_pmac, chip); in snd_pmac_burgundy_init()
692 err = snd_ctl_add(chip->card, chip->master_sw_ctl); in snd_pmac_burgundy_init()
696 chip->master_sw_ctl = snd_ctl_new1( in snd_pmac_burgundy_init()
697 &snd_pmac_burgundy_hp_sw_imac, chip); in snd_pmac_burgundy_init()
698 err = snd_ctl_add(chip->card, chip->master_sw_ctl); in snd_pmac_burgundy_init()
702 chip->speaker_sw_ctl = snd_ctl_new1(imac in snd_pmac_burgundy_init()
704 : &snd_pmac_burgundy_speaker_sw_pmac, chip); in snd_pmac_burgundy_init()
705 err = snd_ctl_add(chip->card, chip->speaker_sw_ctl); in snd_pmac_burgundy_init()
709 err = snd_pmac_add_automute(chip); in snd_pmac_burgundy_init()
713 chip->detect_headphone = snd_pmac_burgundy_detect_headphone; in snd_pmac_burgundy_init()
714 chip->update_automute = snd_pmac_burgundy_update_automute; in snd_pmac_burgundy_init()
715 snd_pmac_burgundy_update_automute(chip, 0); /* update the status only */ in snd_pmac_burgundy_init()