/sound/pci/oxygen/ |
D | oxygen_io.c | 27 u8 oxygen_read8(struct oxygen *chip, unsigned int reg) in oxygen_read8() argument 29 return inb(chip->addr + reg); in oxygen_read8() 33 u16 oxygen_read16(struct oxygen *chip, unsigned int reg) in oxygen_read16() argument 35 return inw(chip->addr + reg); in oxygen_read16() 39 u32 oxygen_read32(struct oxygen *chip, unsigned int reg) in oxygen_read32() argument 41 return inl(chip->addr + reg); in oxygen_read32() 45 void oxygen_write8(struct oxygen *chip, unsigned int reg, u8 value) in oxygen_write8() argument 47 outb(value, chip->addr + reg); in oxygen_write8() 48 chip->saved_registers._8[reg] = value; in oxygen_write8() 52 void oxygen_write16(struct oxygen *chip, unsigned int reg, u16 value) in oxygen_write16() argument [all …]
|
D | oxygen.h | 84 unsigned int reg, unsigned int mute); 157 u8 oxygen_read8(struct oxygen *chip, unsigned int reg); 158 u16 oxygen_read16(struct oxygen *chip, unsigned int reg); 159 u32 oxygen_read32(struct oxygen *chip, unsigned int reg); 160 void oxygen_write8(struct oxygen *chip, unsigned int reg, u8 value); 161 void oxygen_write16(struct oxygen *chip, unsigned int reg, u16 value); 162 void oxygen_write32(struct oxygen *chip, unsigned int reg, u32 value); 163 void oxygen_write8_masked(struct oxygen *chip, unsigned int reg, 165 void oxygen_write16_masked(struct oxygen *chip, unsigned int reg, 167 void oxygen_write32_masked(struct oxygen *chip, unsigned int reg, [all …]
|
/sound/pci/ |
D | azt3328.c | 319 snd_azf3328_io_reg_setb(unsigned reg, u8 mask, int do_set) in snd_azf3328_io_reg_setb() argument 321 u8 prev = inb(reg), new; in snd_azf3328_io_reg_setb() 326 outb(new, reg); in snd_azf3328_io_reg_setb() 334 snd_azf3328_codec_outb(const struct snd_azf3328 *chip, unsigned reg, u8 value) in snd_azf3328_codec_outb() argument 336 outb(value, chip->codec_io + reg); in snd_azf3328_codec_outb() 340 snd_azf3328_codec_inb(const struct snd_azf3328 *chip, unsigned reg) in snd_azf3328_codec_inb() argument 342 return inb(chip->codec_io + reg); in snd_azf3328_codec_inb() 346 snd_azf3328_codec_outw(const struct snd_azf3328 *chip, unsigned reg, u16 value) in snd_azf3328_codec_outw() argument 348 outw(value, chip->codec_io + reg); in snd_azf3328_codec_outw() 352 snd_azf3328_codec_inw(const struct snd_azf3328 *chip, unsigned reg) in snd_azf3328_codec_inw() argument [all …]
|
D | ad1889.c | 84 u16 reg; /* reg setup */ member 113 ad1889_readw(struct snd_ad1889 *chip, unsigned reg) in ad1889_readw() argument 115 return readw(chip->iobase + reg); in ad1889_readw() 119 ad1889_writew(struct snd_ad1889 *chip, unsigned reg, u16 val) in ad1889_writew() argument 121 writew(val, chip->iobase + reg); in ad1889_writew() 125 ad1889_readl(struct snd_ad1889 *chip, unsigned reg) in ad1889_readl() argument 127 return readl(chip->iobase + reg); in ad1889_readl() 131 ad1889_writel(struct snd_ad1889 *chip, unsigned reg, u32 val) in ad1889_writel() argument 133 writel(val, chip->iobase + reg); in ad1889_writel() 200 u16 reg; in ad1889_channel_reset() local [all …]
|
D | fm801.c | 76 #define FM801_REG(chip, reg) (chip->port + FM801_##reg) argument 217 static int snd_fm801_update_bits(struct fm801 *chip, unsigned short reg, in snd_fm801_update_bits() argument 225 old = inw(chip->port + reg); in snd_fm801_update_bits() 229 outw(new, chip->port + reg); in snd_fm801_update_bits() 235 unsigned short reg, in snd_fm801_codec_write() argument 255 outw(reg | (ac97->addr << FM801_AC97_ADDR_SHIFT), FM801_REG(chip, AC97_CMD)); in snd_fm801_codec_write() 267 static unsigned short snd_fm801_codec_read(struct snd_ac97 *ac97, unsigned short reg) in snd_fm801_codec_read() argument 285 outw(reg | (ac97->addr << FM801_AC97_ADDR_SHIFT) | FM801_AC97_READ, in snd_fm801_codec_read() 725 unsigned short reg; in snd_fm801_tea575x_256pcs_write() local 729 reg = inw(FM801_REG(chip, GPIO_CTRL)); in snd_fm801_tea575x_256pcs_write() [all …]
|
/sound/soc/codecs/ |
D | wm9713.c | 39 unsigned int reg); 41 unsigned int reg, unsigned int val); 628 unsigned int reg) in ac97_read() argument 632 if (reg == AC97_RESET || reg == AC97_GPIO_STATUS || in ac97_read() 633 reg == AC97_VENDOR_ID1 || reg == AC97_VENDOR_ID2 || in ac97_read() 634 reg == AC97_CD) in ac97_read() 635 return soc_ac97_ops.read(codec->ac97, reg); in ac97_read() 637 reg = reg >> 1; in ac97_read() 639 if (reg > (ARRAY_SIZE(wm9713_reg))) in ac97_read() 642 return cache[reg]; in ac97_read() [all …]
|
D | wm8580.c | 200 unsigned int reg) in wm8580_read_reg_cache() argument 203 BUG_ON(reg > ARRAY_SIZE(wm8580_reg)); in wm8580_read_reg_cache() 204 return cache[reg]; in wm8580_read_reg_cache() 211 unsigned int reg, unsigned int value) in wm8580_write_reg_cache() argument 215 cache[reg] = value; in wm8580_write_reg_cache() 221 static int wm8580_write(struct snd_soc_codec *codec, unsigned int reg, in wm8580_write() argument 226 BUG_ON(reg > ARRAY_SIZE(wm8580_reg)); in wm8580_write() 231 switch (reg) { in wm8580_write() 236 if (value == wm8580_read_reg_cache(codec, reg)) in wm8580_write() 244 data[0] = (reg << 1) | ((value >> 8) & 0x0001); in wm8580_write() [all …]
|
D | wm8900.c | 189 unsigned int reg) in wm8900_read_reg_cache() argument 193 BUG_ON(reg >= WM8900_MAXREG); in wm8900_read_reg_cache() 195 if (reg == WM8900_REG_ID) in wm8900_read_reg_cache() 198 return cache[reg]; in wm8900_read_reg_cache() 205 u16 reg, unsigned int value) in wm8900_write_reg_cache() argument 209 BUG_ON(reg >= WM8900_MAXREG); in wm8900_write_reg_cache() 211 cache[reg] = value; in wm8900_write_reg_cache() 217 static int wm8900_write(struct snd_soc_codec *codec, unsigned int reg, in wm8900_write() argument 222 if (value == wm8900_read_reg_cache(codec, reg)) in wm8900_write() 229 data[0] = reg; in wm8900_write() [all …]
|
D | tlv320aic26.c | 49 unsigned int reg) in aic26_reg_read() argument 57 if (reg >= AIC26_NUM_REGS) { in aic26_reg_read() 64 cmd = AIC26_READ_COMMAND_WORD(reg); in aic26_reg_read() 75 cache[reg] = value; in aic26_reg_read() 80 unsigned int reg) in aic26_reg_read_cache() argument 84 if (reg >= AIC26_NUM_REGS) { in aic26_reg_read_cache() 89 return cache[reg]; in aic26_reg_read_cache() 92 static int aic26_reg_write(struct snd_soc_codec *codec, unsigned int reg, in aic26_reg_write() argument 101 if (reg >= AIC26_NUM_REGS) { in aic26_reg_write() 108 cmd = AIC26_WRITE_COMMAND_WORD(reg); in aic26_reg_write() [all …]
|
D | tlv320aic3x.c | 98 unsigned int reg) in aic3x_read_reg_cache() argument 101 if (reg >= AIC3X_CACHEREGNUM) in aic3x_read_reg_cache() 103 return cache[reg]; in aic3x_read_reg_cache() 110 u8 reg, u8 value) in aic3x_write_reg_cache() argument 113 if (reg >= AIC3X_CACHEREGNUM) in aic3x_write_reg_cache() 115 cache[reg] = value; in aic3x_write_reg_cache() 121 static int aic3x_write(struct snd_soc_codec *codec, unsigned int reg, in aic3x_write() argument 130 data[0] = reg & 0xff; in aic3x_write() 143 static int aic3x_read(struct snd_soc_codec *codec, unsigned int reg, in aic3x_read() argument 146 *value = reg & 0xff; in aic3x_read() [all …]
|
D | wm8903.c | 231 unsigned int reg) in wm8903_read_reg_cache() argument 235 BUG_ON(reg >= ARRAY_SIZE(wm8903_reg_defaults)); in wm8903_read_reg_cache() 237 return cache[reg]; in wm8903_read_reg_cache() 240 static unsigned int wm8903_hw_read(struct snd_soc_codec *codec, u8 reg) in wm8903_hw_read() argument 251 xfer[0].buf = ® in wm8903_hw_read() 269 unsigned int reg) in wm8903_read() argument 271 switch (reg) { in wm8903_read() 276 return wm8903_hw_read(codec, reg); in wm8903_read() 279 return wm8903_read_reg_cache(codec, reg); in wm8903_read() 284 u16 reg, unsigned int value) in wm8903_write_reg_cache() argument [all …]
|
D | wm8990.c | 115 unsigned int reg) in wm8990_read_reg_cache() argument 118 BUG_ON(reg > (ARRAY_SIZE(wm8990_reg)) - 1); in wm8990_read_reg_cache() 119 return cache[reg]; in wm8990_read_reg_cache() 126 unsigned int reg, unsigned int value) in wm8990_write_reg_cache() argument 131 if (reg == 0 || reg > ARRAY_SIZE(wm8990_reg) - 1) in wm8990_write_reg_cache() 134 cache[reg] = value; in wm8990_write_reg_cache() 140 static int wm8990_write(struct snd_soc_codec *codec, unsigned int reg, in wm8990_write() argument 145 data[0] = reg & 0xFF; in wm8990_write() 149 wm8990_write_reg_cache(codec, reg, value); in wm8990_write() 181 int reg = mc->reg; in wm899x_outpga_put_volsw_vu() local [all …]
|
D | tlv320aic23.c | 54 *codec, unsigned int reg) in tlv320aic23_read_reg_cache() argument 57 if (reg >= ARRAY_SIZE(tlv320aic23_reg)) in tlv320aic23_read_reg_cache() 59 return cache[reg]; in tlv320aic23_read_reg_cache() 66 u8 reg, u16 value) in tlv320aic23_write_reg_cache() argument 69 if (reg >= ARRAY_SIZE(tlv320aic23_reg)) in tlv320aic23_write_reg_cache() 71 cache[reg] = value; in tlv320aic23_write_reg_cache() 77 static int tlv320aic23_write(struct snd_soc_codec *codec, unsigned int reg, in tlv320aic23_write() argument 88 if ((reg < 0 || reg > 9) && (reg != 15)) { in tlv320aic23_write() 89 printk(KERN_WARNING "%s Invalid register R%d\n", __func__, reg); in tlv320aic23_write() 93 data[0] = (reg << 1) | (value >> 8 & 0x01); in tlv320aic23_write() [all …]
|
D | cs4270.c | 317 unsigned int reg) in cs4270_read_reg_cache() argument 321 if ((reg < CS4270_FIRSTREG) || (reg > CS4270_LASTREG)) in cs4270_read_reg_cache() 324 return cache[reg - CS4270_FIRSTREG]; in cs4270_read_reg_cache() 337 static int cs4270_i2c_write(struct snd_soc_codec *codec, unsigned int reg, in cs4270_i2c_write() argument 342 if ((reg < CS4270_FIRSTREG) || (reg > CS4270_LASTREG)) in cs4270_i2c_write() 346 if (cache[reg - CS4270_FIRSTREG] != value) { in cs4270_i2c_write() 348 if (i2c_smbus_write_byte_data(client, reg, value)) { in cs4270_i2c_write() 354 cache[reg - CS4270_FIRSTREG] = value; in cs4270_i2c_write() 380 int reg; in cs4270_hw_params() local 410 reg = snd_soc_read(codec, CS4270_MODE); in cs4270_hw_params() [all …]
|
/sound/synth/emux/ |
D | emux_proc.c | 70 vp->reg.parm.moddelay, in snd_emux_proc_info_read() 71 vp->reg.parm.modatkhld, in snd_emux_proc_info_read() 72 vp->reg.parm.moddcysus, in snd_emux_proc_info_read() 73 vp->reg.parm.modrelease); in snd_emux_proc_info_read() 75 vp->reg.parm.voldelay, in snd_emux_proc_info_read() 76 vp->reg.parm.volatkhld, in snd_emux_proc_info_read() 77 vp->reg.parm.voldcysus, in snd_emux_proc_info_read() 78 vp->reg.parm.volrelease); in snd_emux_proc_info_read() 80 vp->reg.parm.lfo1delay, in snd_emux_proc_info_read() 81 vp->reg.parm.lfo2delay, in snd_emux_proc_info_read() [all …]
|
/sound/isa/gus/ |
D | gus_io.c | 46 static inline void __snd_gf1_ctrl_stop(struct snd_gus_card * gus, unsigned char reg) in __snd_gf1_ctrl_stop() argument 50 outb(reg | 0x80, gus->gf1.reg_regsel); in __snd_gf1_ctrl_stop() 54 outb(reg, gus->gf1.reg_regsel); in __snd_gf1_ctrl_stop() 61 unsigned char reg, in __snd_gf1_write8() argument 64 outb(reg, gus->gf1.reg_regsel); in __snd_gf1_write8() 71 unsigned char reg) in __snd_gf1_look8() argument 73 outb(reg, gus->gf1.reg_regsel); in __snd_gf1_look8() 79 unsigned char reg, unsigned int data) in __snd_gf1_write16() argument 81 outb(reg, gus->gf1.reg_regsel); in __snd_gf1_write16() 88 unsigned char reg) in __snd_gf1_look16() argument [all …]
|
/sound/i2c/other/ |
D | ak4114.c | 41 static void reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char val) in reg_write() argument 43 ak4114->write(ak4114->private_data, reg, val); in reg_write() 44 if (reg <= AK4114_REG_INT1_MASK) in reg_write() 45 ak4114->regmap[reg] = val; in reg_write() 46 else if (reg >= AK4114_REG_TXCSB0 && reg <= AK4114_REG_TXCSB4) in reg_write() 47 ak4114->txcsb[reg-AK4114_REG_TXCSB0] = val; in reg_write() 50 static inline unsigned char reg_read(struct ak4114 *ak4114, unsigned char reg) in reg_read() argument 52 return ak4114->read(ak4114->private_data, reg); in reg_read() 89 unsigned char reg; in snd_ak4114_create() local 104 for (reg = 0; reg < 7; reg++) in snd_ak4114_create() [all …]
|
/sound/pci/emu10k1/ |
D | io.c | 34 unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn) in snd_emu10k1_ptr_read() argument 41 regptr = ((reg << 16) & mask) | (chn & PTR_CHANNELNUM_MASK); in snd_emu10k1_ptr_read() 43 if (reg & 0xff000000) { in snd_emu10k1_ptr_read() 46 size = (reg >> 24) & 0x3f; in snd_emu10k1_ptr_read() 47 offset = (reg >> 16) & 0x1f; in snd_emu10k1_ptr_read() 67 void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned in… in snd_emu10k1_ptr_write() argument 79 regptr = ((reg << 16) & mask) | (chn & PTR_CHANNELNUM_MASK); in snd_emu10k1_ptr_write() 81 if (reg & 0xff000000) { in snd_emu10k1_ptr_write() 84 size = (reg >> 24) & 0x3f; in snd_emu10k1_ptr_write() 85 offset = (reg >> 16) & 0x1f; in snd_emu10k1_ptr_write() [all …]
|
D | emu10k1_callback.c | 133 dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease; in release_voice() 135 dcysusv = 0x8000 | (unsigned char)vp->reg.parm.volrelease | DCYSUSV_CHANNELENABLE_MASK; in release_voice() 206 snd_emu10k1_ptr_write(hw, TREMFRQ, vp->ch, vp->reg.parm.tremfrq); in update_voice() 266 (vp->reg.sample_mode & SNDRV_SFNT_SAMPLE_SINGLESHOT)) { in lookup_voices() 268 if (val >= vp->reg.loopstart) in lookup_voices() 342 vp->reg.start += mapped_offset; in start_voice() 343 vp->reg.end += mapped_offset; in start_voice() 344 vp->reg.loopstart += mapped_offset; in start_voice() 345 vp->reg.loopend += mapped_offset; in start_voice() 370 snd_emu10k1_ptr_write(hw, ENVVAL, ch, vp->reg.parm.moddelay); in start_voice() [all …]
|
/sound/i2c/l3/ |
D | uda1341.c | 141 int (*write) (struct l3_client *uda1341, unsigned short reg, unsigned short val); 142 int (*read) (struct l3_client *uda1341, unsigned short reg); 169 static int snd_uda1341_codec_write(struct l3_client *clnt, unsigned short reg, unsigned short val) in snd_uda1341_codec_write() argument 175 uda->regs[reg] = val; in snd_uda1341_codec_write() 178 if (IS_DATA0(reg)) { in snd_uda1341_codec_write() 180 } else if (IS_DATA1(reg)) { in snd_uda1341_codec_write() 182 } else if (IS_STATUS(reg)) { in snd_uda1341_codec_write() 184 } else if (IS_EXTEND(reg)) { in snd_uda1341_codec_write() 185 buf[0] |= (reg - ext0) & 0x7; //EXT address in snd_uda1341_codec_write() 194 static int snd_uda1341_codec_read(struct l3_client *clnt, unsigned short reg) in snd_uda1341_codec_read() argument [all …]
|
/sound/pci/ac97/ |
D | ac97_codec.c | 211 static int snd_ac97_valid_reg(struct snd_ac97 *ac97, unsigned short reg) in snd_ac97_valid_reg() argument 217 if (reg <= 0x1c || reg == 0x20 || reg == 0x26 || reg >= 0x7c) in snd_ac97_valid_reg() 223 if (reg >= 0x3a && reg <= 0x6e) /* 0x59 */ in snd_ac97_valid_reg() 230 if (reg == 0x5a) in snd_ac97_valid_reg() 232 if (reg >= 0x3c && reg <= 0x6e) /* 0x59 */ in snd_ac97_valid_reg() 242 if (reg <= 0x3a || reg >= 0x5a) in snd_ac97_valid_reg() 261 void snd_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short value) in snd_ac97_write() argument 263 if (!snd_ac97_valid_reg(ac97, reg)) in snd_ac97_write() 267 if (reg == AC97_MASTER || reg == AC97_HEADPHONE) in snd_ac97_write() 270 ac97->bus->ops->write(ac97, reg, value); in snd_ac97_write() [all …]
|
D | ac97_patch.h | 25 #define AC97_SINGLE_VALUE(reg,shift,mask,invert) \ argument 26 ((reg) | ((shift) << 8) | ((shift) << 12) | ((mask) << 16) | \ 28 #define AC97_PAGE_SINGLE_VALUE(reg,shift,mask,invert,page) \ argument 29 (AC97_SINGLE_VALUE(reg,shift,mask,invert) | (1<<25) | ((page) << 26)) 30 #define AC97_SINGLE(xname, reg, shift, mask, invert) \ argument 34 .private_value = AC97_SINGLE_VALUE(reg, shift, mask, invert) } 35 #define AC97_PAGE_SINGLE(xname, reg, shift, mask, invert, page) \ argument 39 .private_value = AC97_PAGE_SINGLE_VALUE(reg, shift, mask, invert, page) } 40 #define AC97_DOUBLE(xname, reg, shift_left, shift_right, mask, invert) \ argument 44 ….private_value = (reg) | ((shift_left) << 8) | ((shift_right) << 12) | ((mask) << 16) | ((invert) … [all …]
|
/sound/isa/cs423x/ |
D | cs4236_lib.c | 125 unsigned char reg, unsigned char val) in snd_cs4236_ctrl_out() argument 127 outb(reg, chip->cport + 3); in snd_cs4236_ctrl_out() 128 outb(chip->cimage[reg] = val, chip->cport + 4); in snd_cs4236_ctrl_out() 131 static unsigned char snd_cs4236_ctrl_in(struct snd_wss *chip, unsigned char reg) in snd_cs4236_ctrl_in() argument 133 outb(reg, chip->cport + 3); in snd_cs4236_ctrl_in() 224 int reg; in snd_cs4236_suspend() local 228 for (reg = 0; reg < 32; reg++) in snd_cs4236_suspend() 229 chip->image[reg] = snd_wss_in(chip, reg); in snd_cs4236_suspend() 230 for (reg = 0; reg < 18; reg++) in snd_cs4236_suspend() 231 chip->eimage[reg] = snd_cs4236_ext_in(chip, CS4236_I23VAL(reg)); in snd_cs4236_suspend() [all …]
|
/sound/pci/ice1712/ |
D | wtm.c | 44 static inline void stac9460_put(struct snd_ice1712 *ice, int reg, in stac9460_put() argument 47 snd_vt1724_write_i2c(ice, STAC9460_I2C_ADDR, reg, val); in stac9460_put() 50 static inline unsigned char stac9460_get(struct snd_ice1712 *ice, int reg) in stac9460_get() argument 52 return snd_vt1724_read_i2c(ice, STAC9460_I2C_ADDR, reg); in stac9460_get() 58 static inline void stac9460_2_put(struct snd_ice1712 *ice, int reg, in stac9460_2_put() argument 61 snd_vt1724_write_i2c(ice, STAC9460_2_I2C_ADDR, reg, val); in stac9460_2_put() 64 static inline unsigned char stac9460_2_get(struct snd_ice1712 *ice, int reg) in stac9460_2_get() argument 66 return snd_vt1724_read_i2c(ice, STAC9460_2_I2C_ADDR, reg); in stac9460_2_get() 242 int i, reg, id; in stac9460_adc_mute_put() local 248 reg = STAC946X_MIC_L_VOLUME + i; in stac9460_adc_mute_put() [all …]
|
/sound/drivers/ |
D | ml403-ac97cr.c | 271 #define LM4550_RF_OK(reg) (lm4550_regfile[reg / 2].flag & LM4550_REG_OK) argument 831 snd_ml403_ac97cr_codec_read(struct snd_ac97 *ac97, unsigned short reg) argument 841 if (!LM4550_RF_OK(reg)) { 844 "ignored!\n", reg); 848 if ((lm4550_regfile[reg / 2].flag & 850 !(lm4550_regfile[reg / 2].flag & LM4550_REG_NOSHADOW)) { 851 if (lm4550_regfile[reg / 2].flag & LM4550_REG_FAKEREAD) { 854 reg, lm4550_regfile[reg / 2].def, 855 lm4550_regfile[reg / 2].def); 856 return lm4550_regfile[reg / 2].def; [all …]
|