cregit-Linux how code gets into the kernel

Release 4.8 sound/ppc/burgundy.c

Directory: sound/ppc
/*
 * PMac Burgundy lowlevel functions
 *
 * Copyright (c) by Takashi Iwai <tiwai@suse.de>
 * code based on dmasound.c.
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

#include <linux/io.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <sound/core.h>
#include "pmac.h"
#include "burgundy.h"


/* Waits for busy flag to clear */

static inline void snd_pmac_burgundy_busy_wait(struct snd_pmac *chip) { int timeout = 50; while ((in_le32(&chip->awacs->codec_ctrl) & MASK_NEWECMD) && timeout--) udelay(1); if (timeout < 0) printk(KERN_DEBUG "burgundy_busy_wait: timeout\n"); }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela4890.57%240.00%
takashi iwaitakashi iwai23.77%120.00%
roel kluinroel kluin23.77%120.00%
jesper juhljesper juhl11.89%120.00%
Total53100.00%5100.00%


static inline void snd_pmac_burgundy_extend_wait(struct snd_pmac *chip) { int timeout; timeout = 50; while (!(in_le32(&chip->awacs->codec_stat) & MASK_EXTEND) && timeout--) udelay(1); if (timeout < 0) printk(KERN_DEBUG "burgundy_extend_wait: timeout #1\n"); timeout = 50; while ((in_le32(&chip->awacs->codec_stat) & MASK_EXTEND) && timeout--) udelay(1); if (timeout < 0) printk(KERN_DEBUG "burgundy_extend_wait: timeout #2\n"); }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela8992.71%240.00%
roel kluinroel kluin44.17%120.00%
takashi iwaitakashi iwai22.08%120.00%
jesper juhljesper juhl11.04%120.00%
Total96100.00%5100.00%


static void snd_pmac_burgundy_wcw(struct snd_pmac *chip, unsigned addr, unsigned val) { out_le32(&chip->awacs->codec_ctrl, addr + 0x200c00 + (val & 0xff)); snd_pmac_burgundy_busy_wait(chip); out_le32(&chip->awacs->codec_ctrl, addr + 0x200d00 +((val>>8) & 0xff)); snd_pmac_burgundy_busy_wait(chip); out_le32(&chip->awacs->codec_ctrl, addr + 0x200e00 +((val>>16) & 0xff)); snd_pmac_burgundy_busy_wait(chip); out_le32(&chip->awacs->codec_ctrl, addr + 0x200f00 +((val>>24) & 0xff)); snd_pmac_burgundy_busy_wait(chip); }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela12798.45%150.00%
takashi iwaitakashi iwai21.55%150.00%
Total129100.00%2100.00%


static unsigned snd_pmac_burgundy_rcw(struct snd_pmac *chip, unsigned addr) { unsigned val = 0; unsigned long flags; spin_lock_irqsave(&chip->reg_lock, flags); out_le32(&chip->awacs->codec_ctrl, addr + 0x100000); snd_pmac_burgundy_busy_wait(chip); snd_pmac_burgundy_extend_wait(chip); val += (in_le32(&chip->awacs->codec_stat) >> 4) & 0xff; out_le32(&chip->awacs->codec_ctrl, addr + 0x100100); snd_pmac_burgundy_busy_wait(chip); snd_pmac_burgundy_extend_wait(chip); val += ((in_le32(&chip->awacs->codec_stat)>>4) & 0xff) <<8; out_le32(&chip->awacs->codec_ctrl, addr + 0x100200); snd_pmac_burgundy_busy_wait(chip); snd_pmac_burgundy_extend_wait(chip); val += ((in_le32(&chip->awacs->codec_stat)>>4) & 0xff) <<16; out_le32(&chip->awacs->codec_ctrl, addr + 0x100300); snd_pmac_burgundy_busy_wait(chip); snd_pmac_burgundy_extend_wait(chip); val += ((in_le32(&chip->awacs->codec_stat)>>4) & 0xff) <<24; spin_unlock_irqrestore(&chip->reg_lock, flags); return val; }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela22499.12%150.00%
takashi iwaitakashi iwai20.88%150.00%
Total226100.00%2100.00%


static void snd_pmac_burgundy_wcb(struct snd_pmac *chip, unsigned int addr, unsigned int val) { out_le32(&chip->awacs->codec_ctrl, addr + 0x300000 + (val & 0xff)); snd_pmac_burgundy_busy_wait(chip); }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela4295.45%150.00%
takashi iwaitakashi iwai24.55%150.00%
Total44100.00%2100.00%


static unsigned snd_pmac_burgundy_rcb(struct snd_pmac *chip, unsigned int addr) { unsigned val = 0; unsigned long flags; spin_lock_irqsave(&chip->reg_lock, flags); out_le32(&chip->awacs->codec_ctrl, addr + 0x100000); snd_pmac_burgundy_busy_wait(chip); snd_pmac_burgundy_extend_wait(chip); val += (in_le32(&chip->awacs->codec_stat) >> 4) & 0xff; spin_unlock_irqrestore(&chip->reg_lock, flags); return val; }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela8797.75%150.00%
takashi iwaitakashi iwai22.25%150.00%
Total89100.00%2100.00%

#define BASE2ADDR(base) ((base) << 12) #define ADDR2BASE(addr) ((addr) >> 12) /* * Burgundy volume: 0 - 100, stereo, word reg */
static void snd_pmac_burgundy_write_volume(struct snd_pmac *chip, unsigned int address, long *volume, int shift) { int hardvolume, lvolume, rvolume; if (volume[0] < 0 || volume[0] > 100 || volume[1] < 0 || volume[1] > 100) return; /* -EINVAL */ lvolume = volume[0] ? volume[0] + BURGUNDY_VOLUME_OFFSET : 0; rvolume = volume[1] ? volume[1] + BURGUNDY_VOLUME_OFFSET : 0; hardvolume = lvolume + (rvolume << shift); if (shift == 8) hardvolume |= hardvolume << 16; snd_pmac_burgundy_wcw(chip, address, hardvolume); }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela9072.58%133.33%
takashi iwaitakashi iwai3427.42%266.67%
Total124100.00%3100.00%


static void snd_pmac_burgundy_read_volume(struct snd_pmac *chip, unsigned int address, long *volume, int shift) { int wvolume; wvolume = snd_pmac_burgundy_rcw(chip, address); volume[0] = wvolume & 0xff; if (volume[0] >= BURGUNDY_VOLUME_OFFSET) volume[0] -= BURGUNDY_VOLUME_OFFSET; else volume[0] = 0; volume[1] = (wvolume >> shift) & 0xff; if (volume[1] >= BURGUNDY_VOLUME_OFFSET) volume[1] -= BURGUNDY_VOLUME_OFFSET; else volume[1] = 0; }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela10298.08%150.00%
takashi iwaitakashi iwai21.92%150.00%
Total104100.00%2100.00%


static int snd_pmac_burgundy_info_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; uinfo->value.integer.min = 0; uinfo->value.integer.max = 100; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela4792.16%150.00%
takashi iwaitakashi iwai47.84%150.00%
Total51100.00%2100.00%


static int snd_pmac_burgundy_get_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); int shift = (kcontrol->private_value >> 8) & 0xff; snd_pmac_burgundy_read_volume(chip, addr, ucontrol->value.integer.value, shift); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela6691.67%150.00%
takashi iwaitakashi iwai68.33%150.00%
Total72100.00%2100.00%


static int snd_pmac_burgundy_put_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); int shift = (kcontrol->private_value >> 8) & 0xff; long nvoices[2]; snd_pmac_burgundy_write_volume(chip, addr, ucontrol->value.integer.value, shift); snd_pmac_burgundy_read_volume(chip, addr, nvoices, shift); return (nvoices[0] != ucontrol->value.integer.value[0] || nvoices[1] != ucontrol->value.integer.value[1]); }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela11595.04%150.00%
takashi iwaitakashi iwai64.96%150.00%
Total121100.00%2100.00%

#define BURGUNDY_VOLUME_W(xname, xindex, addr, shift) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex,\ .info = snd_pmac_burgundy_info_volume,\ .get = snd_pmac_burgundy_get_volume,\ .put = snd_pmac_burgundy_put_volume,\ .private_value = ((ADDR2BASE(addr) & 0xff) | ((shift) << 8)) } /* * Burgundy volume: 0 - 100, stereo, 2-byte reg */
static void snd_pmac_burgundy_write_volume_2b(struct snd_pmac *chip, unsigned int address, long *volume, int off) { int lvolume, rvolume; off |= off << 2; lvolume = volume[0] ? volume[0] + BURGUNDY_VOLUME_OFFSET : 0; rvolume = volume[1] ? volume[1] + BURGUNDY_VOLUME_OFFSET : 0; snd_pmac_burgundy_wcb(chip, address + off, lvolume); snd_pmac_burgundy_wcb(chip, address + off + 0x500, rvolume); }

Contributors

PersonTokensPropCommitsCommitProp
risto suominenristo suominen89100.00%1100.00%
Total89100.00%1100.00%


static void snd_pmac_burgundy_read_volume_2b(struct snd_pmac *chip, unsigned int address, long *volume, int off) { volume[0] = snd_pmac_burgundy_rcb(chip, address + off); if (volume[0] >= BURGUNDY_VOLUME_OFFSET) volume[0] -= BURGUNDY_VOLUME_OFFSET; else volume[0] = 0; volume[1] = snd_pmac_burgundy_rcb(chip, address + off + 0x100); if (volume[1] >= BURGUNDY_VOLUME_OFFSET) volume[1] -= BURGUNDY_VOLUME_OFFSET; else volume[1] = 0; }

Contributors

PersonTokensPropCommitsCommitProp
risto suominenristo suominen100100.00%1100.00%
Total100100.00%1100.00%


static int snd_pmac_burgundy_info_volume_2b(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; uinfo->value.integer.min = 0; uinfo->value.integer.max = 100; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela4384.31%250.00%
takashi iwaitakashi iwai47.84%125.00%
risto suominenristo suominen47.84%125.00%
Total51100.00%4100.00%


static int snd_pmac_burgundy_get_volume_2b(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); int off = kcontrol->private_value & 0x300; snd_pmac_burgundy_read_volume_2b(chip, addr, ucontrol->value.integer.value, off); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela4870.59%133.33%
risto suominenristo suominen1420.59%133.33%
takashi iwaitakashi iwai68.82%133.33%
Total68100.00%3100.00%


static int snd_pmac_burgundy_put_volume_2b(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); int off = kcontrol->private_value & 0x300; long nvoices[2]; snd_pmac_burgundy_write_volume_2b(chip, addr, ucontrol->value.integer.value, off); snd_pmac_burgundy_read_volume_2b(chip, addr, nvoices, off); return (nvoices[0] != ucontrol->value.integer.value[0] || nvoices[1] != ucontrol->value.integer.value[1]); }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela6252.99%133.33%
risto suominenristo suominen4941.88%133.33%
takashi iwaitakashi iwai65.13%133.33%
Total117100.00%3100.00%

#define BURGUNDY_VOLUME_2B(xname, xindex, addr, off) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex,\ .info = snd_pmac_burgundy_info_volume_2b,\ .get = snd_pmac_burgundy_get_volume_2b,\ .put = snd_pmac_burgundy_put_volume_2b,\ .private_value = ((ADDR2BASE(addr) & 0xff) | ((off) << 8)) } /* * Burgundy gain/attenuation: 0 - 15, mono/stereo, byte reg */
static int snd_pmac_burgundy_info_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { int stereo = (kcontrol->private_value >> 24) & 1; uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = stereo + 1; uinfo->value.integer.min = 0; uinfo->value.integer.max = 15; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela6192.42%133.33%
takashi iwaitakashi iwai46.06%133.33%
risto suominenristo suominen11.52%133.33%
Total66100.00%3100.00%


static int snd_pmac_burgundy_get_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); int stereo = (kcontrol->private_value >> 24) & 1; int atten = (kcontrol->private_value >> 25) & 1; int oval; oval = snd_pmac_burgundy_rcb(chip, addr); if (atten) oval = ~oval & 0xff; ucontrol->value.integer.value[0] = oval & 0xf; if (stereo) ucontrol->value.integer.value[1] = (oval >> 4) & 0xf; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela10077.52%133.33%
risto suominenristo suominen2317.83%133.33%
takashi iwaitakashi iwai64.65%133.33%
Total129100.00%3100.00%


static int snd_pmac_burgundy_put_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); int stereo = (kcontrol->private_value >> 24) & 1; int atten = (kcontrol->private_value >> 25) & 1; int oval, val; oval = snd_pmac_burgundy_rcb(chip, addr); if (atten) oval = ~oval & 0xff; val = ucontrol->value.integer.value[0]; if (stereo) val |= ucontrol->value.integer.value[1] << 4; else val |= ucontrol->value.integer.value[0] << 4; if (atten) val = ~val & 0xff; snd_pmac_burgundy_wcb(chip, addr, val); return val != oval; }

Contributors

PersonTokensPropCommitsCommitProp
jaroslav kyselajaroslav kysela12073.62%133.33%
risto suominenristo suominen3722.70%133.33%
takashi iwaitakashi iwai63.68%133.33%
Total163100.00%3100.00%

#define BURGUNDY_VOLUME_B(xname, xindex, addr, stereo, atten) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex,\ .info = snd_pmac_burgundy_info_gain,\ .get = snd_pmac_burgundy_get_gain,\ .put = snd_pmac_burgundy_put_gain,\ .private_value = (ADDR2BASE(addr) | ((stereo) << 24) | ((atten) << 25)) } /* * Burgundy switch: 0/1, mono/stereo, word reg */
static int snd_pmac_burgundy_info_switch_w(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { int stereo = (kcontrol->private_value >> 24) & 1; uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = stereo + 1; uinfo->value.integer.min = 0; uinfo->value.integer.max = 1; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
risto suominenristo suominen6293.94%133.33%
jaroslav kyselajaroslav kysela34.55%133.33%
takashi iwaitakashi iwai11.52%133.33%
Total66100.00%3100.00%


static int snd_pmac_burgundy_get_switch_w(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); unsigned int addr = BASE2ADDR((kcontrol->private_value >> 16) & 0xff); int lmask = 1 << (kcontrol->private_value & 0xff); int rmask = 1 << ((kcontrol->private_value >> 8) & 0xff); int stereo = (kcontrol->private_value >> 24) & 1; int val = snd_pmac_burgundy_rcw(chip, addr); ucontrol->value.integer.value[0] = (val & lmask) ? 1 : 0; if (stereo) ucontrol->value.integer.value[1] = (val & rmask) ? 1 : 0; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
risto suominenristo suominen145100.00%1100.00%
Total145100.00%1100.00%


static int snd_pmac_burgundy_put_switch_w(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); unsigned int addr = BASE2ADDR((kcontrol->private_value >> 16) & 0xff); int lmask = 1 << (kcontrol->private_value & 0xff); int rmask = 1 << ((kcontrol->private_value >> 8) & 0xff); int stereo = (kcontrol->private_value >> 24) & 1; int val, oval; oval = snd_pmac_burgundy_rcw(chip, addr); val = oval & ~(lmask | (stereo ? rmask : 0)); if (ucontrol->value.integer.value[0]) val |= lmask; if (stereo && ucontrol->value.integer.value[1]) val |= rmask; snd_pmac_burgundy_wcw(chip, addr, val); return val != oval; }

Contributors

PersonTokensPropCommitsCommitProp
risto suominenristo suominen167100.00%1100.00%
Total167100.00%1100.00%

#define BURGUNDY_SWITCH_W(xname, xindex, addr, lbit, rbit, stereo) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex,\ .info = snd_pmac_burgundy_info_switch_w,\ .get = snd_pmac_burgundy_get_switch_w,\ .put = snd_pmac_burgundy_put_switch_w,\ .private_value = ((lbit) | ((rbit) << 8)\ | (ADDR2BASE(addr) << 16) | ((stereo) << 24)) } /* * Burgundy switch: 0/1, mono/stereo, byte reg, bit mask */
static int snd_pmac_burgundy_info_switch_b(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { int stereo = (kcontrol->private_value >> 24) & 1; uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = stereo + 1; uinfo->value.integer.min = 0; uinfo->value.integer.max = 1; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
risto suominenristo suominen66100.00%1100.00%
Total66100.00%1100.00%


static int snd_pmac_burgundy_get_switch_b(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); unsigned int addr = BASE2ADDR((kcontrol->private_value >> 16) & 0xff); int lmask = kcontrol->private_value & 0xff; int rmask = (kcontrol->private_value >> 8) & 0xff; int stereo = (kcontrol->private_value >> 24) & 1; int val = snd_pmac_burgundy_rcb(chip, addr); ucontrol->value.integer.value[0] = (val & lmask) ? 1 : 0; if (stereo) ucontrol->value.integer.value[1] = (val & rmask) ? 1 : 0; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
risto suominenristo suominen137100.00%1100.00%
Total137100.00%1100.00%


static int snd_pmac_burgundy_put_switch_b(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); unsigned int addr = BASE2ADDR((kcontrol->private_value >> 16) & 0xff); int lmask = kcontrol->private_value & 0xff; int rmask = (kcontrol->private_value >> 8) & 0xff; int stereo = (kcontrol->private_value >> 24) & 1; int val, oval; oval = snd_pmac_burgundy_rcb(chip, addr); val = oval & ~(lmask | rmask); if (ucontrol->value.integer.value[0]) val |= lmask; if (stereo && ucontrol->value.integer.value[1]) val |= rmask; snd_pmac_burgundy_wcb(chip, addr, val); return val != oval; }

Contributors

PersonTokensPropCommitsCommitProp
risto suominenristo suominen153100.00%1100.00%
Total153100.00%1100.00%

#define BURGUNDY_SWITCH_B(xname, xindex, addr, lmask, rmask, stereo) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex,\ .info = snd_pmac_burgundy_info_switch_b,\ .get = snd_pmac_burgundy_get_switch_b,\ .put = snd_pmac_burgundy_put_switch_b,\ .private_value = ((lmask) | ((rmask) << 8)\ | (ADDR2BASE(addr) << 16) | ((stereo) << 24)) } /* * Burgundy mixers */ static struct snd_kcontrol_new snd_pmac_burgundy_mixers[] = { BURGUNDY_VOLUME_W("Master Playback Volume", 0, MASK_ADDR_BURGUNDY_MASTER_VOLUME, 8), BURGUNDY_VOLUME_W("CD Capture Volume", 0, MASK_ADDR_BURGUNDY_VOLCD, 16), BURGUNDY_VOLUME_2B("Input Capture Volume", 0, MASK_ADDR_BURGUNDY_VOLMIX01, 2), BURGUNDY_VOLUME_2B("Mixer Playback Volume", 0, MASK_ADDR_BURGUNDY_VOLMIX23, 0), BURGUNDY_VOLUME_B("CD Gain Capture Volume", 0, MASK_ADDR_BURGUNDY_GAINCD, 1, 0), BURGUNDY_SWITCH_W("Master Capture Switch", 0, MASK_ADDR_BURGUNDY_OUTPUTENABLES, 24, 0, 0), BURGUNDY_SWITCH_W("CD Capture Switch", 0, MASK_ADDR_BURGUNDY_CAPTURESELECTS, 0, 16, 1), BURGUNDY_SWITCH_W("CD Playback Switch", 0, MASK_ADDR_BURGUNDY_OUTPUTSELECTS, 0, 16, 1), /* BURGUNDY_SWITCH_W("Loop Capture Switch", 0, * MASK_ADDR_BURGUNDY_CAPTURESELECTS, 8, 24, 1), * BURGUNDY_SWITCH_B("Mixer out Capture Switch", 0, * MASK_ADDR_BURGUNDY_HOSTIFAD, 0x02, 0, 0), * BURGUNDY_SWITCH_B("Mixer Capture Switch", 0, * MASK_ADDR_BURGUNDY_HOSTIFAD, 0x01, 0, 0), * BURGUNDY_SWITCH_B("PCM out Capture Switch", 0, * MASK_ADDR_BURGUNDY_HOSTIFEH, 0x02, 0, 0), */ BURGUNDY_SWITCH_B("PCM Capture Switch", 0, MASK_ADDR_BURGUNDY_HOSTIFEH, 0x01, 0, 0) }; static struct snd_kcontrol_new snd_pmac_burgundy_mixers_imac[] = { BURGUNDY_VOLUME_W("Line in Capture Volume", 0, MASK_ADDR_BURGUNDY_VOLLINE, 16), BURGUNDY_VOLUME_W("Mic Capture Volume", 0, MASK_ADDR_BURGUNDY_VOLMIC, 16), BURGUNDY_VOLUME_B("Line in Gain Capture Volume", 0, MASK_ADDR_BURGUNDY_GAINLINE, 1, 0), BURGUNDY_VOLUME_B("Mic Gain Capture Volume", 0, MASK_ADDR_BURGUNDY_GAINMIC, 1, 0), BURGUNDY_VOLUME_B("Speaker Playback Volume", 0