/sound/pci/ice1712/ |
D | ice1724.c | 120 static inline int stdclock_is_spdif_master(struct snd_ice1712 *ice) in stdclock_is_spdif_master() argument 122 return (inb(ICEMT1724(ice, RATE)) & VT1724_SPDIF_MASTER) ? 1 : 0; in stdclock_is_spdif_master() 128 static inline int is_pro_rate_locked(struct snd_ice1712 *ice) in is_pro_rate_locked() argument 130 return (!ice->is_spdif_master(ice)) && PRO_RATE_LOCKED; in is_pro_rate_locked() 137 static unsigned char snd_vt1724_ac97_ready(struct snd_ice1712 *ice) in snd_vt1724_ac97_ready() argument 142 old_cmd = inb(ICEMT1724(ice, AC97_CMD)); in snd_vt1724_ac97_ready() 149 dev_dbg(ice->card->dev, "snd_vt1724_ac97_ready: timeout\n"); in snd_vt1724_ac97_ready() 153 static int snd_vt1724_ac97_wait_bit(struct snd_ice1712 *ice, unsigned char bit) in snd_vt1724_ac97_wait_bit() argument 157 if ((inb(ICEMT1724(ice, AC97_CMD)) & bit) == 0) in snd_vt1724_ac97_wait_bit() 159 dev_dbg(ice->card->dev, "snd_vt1724_ac97_wait_bit: timeout\n"); in snd_vt1724_ac97_wait_bit() [all …]
|
D | ice1712.c | 115 static int snd_ice1712_build_pro_mixer(struct snd_ice1712 *ice); 116 static int snd_ice1712_build_controls(struct snd_ice1712 *ice); 127 static inline int is_spdif_master(struct snd_ice1712 *ice) in is_spdif_master() argument 129 return (inb(ICEMT(ice, RATE)) & ICE1712_SPDIF_MASTER) ? 1 : 0; in is_spdif_master() 132 static inline int is_pro_rate_locked(struct snd_ice1712 *ice) in is_pro_rate_locked() argument 134 return is_spdif_master(ice) || PRO_RATE_LOCKED; in is_pro_rate_locked() 137 static inline void snd_ice1712_ds_write(struct snd_ice1712 *ice, u8 channel, u8 addr, u32 data) in snd_ice1712_ds_write() argument 139 outb((channel << 4) | addr, ICEDS(ice, INDEX)); in snd_ice1712_ds_write() 140 outl(data, ICEDS(ice, DATA)); in snd_ice1712_ds_write() 143 static inline u32 snd_ice1712_ds_read(struct snd_ice1712 *ice, u8 channel, u8 addr) in snd_ice1712_ds_read() argument [all …]
|
D | delta.c | 47 static void ap_cs8427_write_byte(struct snd_ice1712 *ice, unsigned char data, unsigned char tmp) in ap_cs8427_write_byte() argument 55 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp); in ap_cs8427_write_byte() 58 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp); in ap_cs8427_write_byte() 64 static unsigned char ap_cs8427_read_byte(struct snd_ice1712 *ice, unsigned char tmp) in ap_cs8427_read_byte() argument 71 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp); in ap_cs8427_read_byte() 73 if (snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA) & ICE1712_DELTA_AP_DIN) in ap_cs8427_read_byte() 76 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp); in ap_cs8427_read_byte() 83 static unsigned char ap_cs8427_codec_select(struct snd_ice1712 *ice) in ap_cs8427_codec_select() argument 86 tmp = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA); in ap_cs8427_codec_select() 87 switch (ice->eeprom.subvendor) { in ap_cs8427_codec_select() [all …]
|
D | pontis.c | 81 static unsigned short wm_get(struct snd_ice1712 *ice, int reg) in wm_get() argument 84 return ((unsigned short)ice->akm[0].images[reg] << 8) | in wm_get() 85 ice->akm[0].images[reg + 1]; in wm_get() 91 static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val) in wm_put_nocache() argument 95 snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff); in wm_put_nocache() 98 static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val) in wm_put() argument 100 wm_put_nocache(ice, reg, val); in wm_put() 102 ice->akm[0].images[reg] = val >> 8; in wm_put() 103 ice->akm[0].images[reg + 1] = val; in wm_put() 125 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in wm_dac_vol_get() local [all …]
|
D | ews.c | 58 struct snd_ice1712 *ice = bus->private_data; in ewx_i2c_setlines() local 64 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp); in ewx_i2c_setlines() 70 struct snd_ice1712 *ice = bus->private_data; in ewx_i2c_getclock() local 71 return snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA) & ICE1712_EWX2496_SERIAL_CLOCK ? 1 : 0; in ewx_i2c_getclock() 76 struct snd_ice1712 *ice = bus->private_data; in ewx_i2c_getdata() local 79 snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~ICE1712_EWX2496_RW); in ewx_i2c_getdata() 80 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, 0); in ewx_i2c_getdata() 83 bit = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA) & ICE1712_EWX2496_SERIAL_DATA ? 1 : 0; in ewx_i2c_getdata() 85 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, ICE1712_EWX2496_RW); in ewx_i2c_getdata() 87 snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~ICE1712_EWX2496_SERIAL_CLOCK); in ewx_i2c_getdata() [all …]
|
D | hoontech.c | 42 static void snd_ice1712_stdsp24_gpio_write(struct snd_ice1712 *ice, unsigned char byte) in snd_ice1712_stdsp24_gpio_write() argument 46 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, byte); in snd_ice1712_stdsp24_gpio_write() 49 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, byte); in snd_ice1712_stdsp24_gpio_write() 52 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, byte); in snd_ice1712_stdsp24_gpio_write() 55 static void snd_ice1712_stdsp24_darear(struct snd_ice1712 *ice, int activate) in snd_ice1712_stdsp24_darear() argument 57 struct hoontech_spec *spec = ice->spec; in snd_ice1712_stdsp24_darear() 58 mutex_lock(&ice->gpio_mutex); in snd_ice1712_stdsp24_darear() 60 snd_ice1712_stdsp24_gpio_write(ice, spec->boxbits[0]); in snd_ice1712_stdsp24_darear() 61 mutex_unlock(&ice->gpio_mutex); in snd_ice1712_stdsp24_darear() 64 static void snd_ice1712_stdsp24_mute(struct snd_ice1712 *ice, int activate) in snd_ice1712_stdsp24_mute() argument [all …]
|
D | se.c | 116 static void se200pci_WM8740_init(struct snd_ice1712 *ice) in se200pci_WM8740_init() argument 122 static void se200pci_WM8740_set_pro_rate(struct snd_ice1712 *ice, in se200pci_WM8740_set_pro_rate() argument 133 static void se200pci_WM8766_write(struct snd_ice1712 *ice, in se200pci_WM8766_write() argument 144 snd_ice1712_save_gpio_status(ice); in se200pci_WM8766_write() 147 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction | ALL_MASK); in se200pci_WM8766_write() 148 snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask & ~ALL_MASK); in se200pci_WM8766_write() 149 bits = snd_ice1712_gpio_read(ice) & ~ALL_MASK; in se200pci_WM8766_write() 151 snd_ice1712_gpio_write(ice, bits); in se200pci_WM8766_write() 161 snd_ice1712_gpio_write(ice, bits); in se200pci_WM8766_write() 165 snd_ice1712_gpio_write(ice, bits); in se200pci_WM8766_write() [all …]
|
D | quartet.c | 47 void (*set_register)(struct snd_ice1712 *ice, unsigned int val); 48 unsigned int (*get_register)(struct snd_ice1712 *ice); 277 struct snd_ice1712 *ice = ak->private_data[0]; in qtet_akm_write() local 283 orig_dir = ice->gpio.get_dir(ice); in qtet_akm_write() 284 ice->gpio.set_dir(ice, orig_dir | GPIO_SPI_ALL); in qtet_akm_write() 286 ice->gpio.set_mask(ice, ~GPIO_SPI_ALL); in qtet_akm_write() 288 tmp = ice->gpio.get_data(ice); in qtet_akm_write() 291 ice->gpio.set_data(ice, tmp); in qtet_akm_write() 299 ice->gpio.set_data(ice, tmp); in qtet_akm_write() 308 ice->gpio.set_data(ice, tmp); in qtet_akm_write() [all …]
|
D | ice1712.h | 41 #define ICEREG(ice, x) ((ice)->port + ICE1712_REG_##x) argument 118 #define ICEDS(ice, x) ((ice)->dmapath_port + ICE1712_DS_##x) argument 149 #define ICEMT(ice, x) ((ice)->profi_port + ICE1712_MT_##x) argument 261 #define ice_has_con_ac97(ice) (!((ice)->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_NO_CON_AC97)) argument 367 void (*set_mask)(struct snd_ice1712 *ice, unsigned int data); 368 unsigned int (*get_mask)(struct snd_ice1712 *ice); 369 void (*set_dir)(struct snd_ice1712 *ice, unsigned int data); 370 unsigned int (*get_dir)(struct snd_ice1712 *ice); 371 void (*set_data)(struct snd_ice1712 *ice, unsigned int data); 372 unsigned int (*get_data)(struct snd_ice1712 *ice); [all …]
|
D | prodigy_hifi.c | 127 static unsigned short wm_get(struct snd_ice1712 *ice, int reg) in wm_get() argument 130 return ((unsigned short)ice->akm[0].images[reg] << 8) | in wm_get() 131 ice->akm[0].images[reg + 1]; in wm_get() 137 static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val) in wm_put_nocache() argument 141 snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff); in wm_put_nocache() 144 static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val) in wm_put() argument 146 wm_put_nocache(ice, reg, val); in wm_put() 148 ice->akm[0].images[reg] = val >> 8; in wm_put() 149 ice->akm[0].images[reg + 1] = val; in wm_put() 156 static void set_gpio_bit(struct snd_ice1712 *ice, unsigned int bit, int val) in set_gpio_bit() argument [all …]
|
D | revo.c | 41 static void revo_i2s_mclk_changed(struct snd_ice1712 *ice) in revo_i2s_mclk_changed() argument 44 outb(inb(ICEMT1724(ice, AC97_CMD)) | 0x80, ICEMT1724(ice, AC97_CMD)); in revo_i2s_mclk_changed() 47 outb(inb(ICEMT1724(ice, AC97_CMD)) & ~0x80, ICEMT1724(ice, AC97_CMD)); in revo_i2s_mclk_changed() 97 struct snd_ice1712 *ice = bus->private_data; in revo_i2c_start() local 98 snd_ice1712_save_gpio_status(ice); in revo_i2c_start() 103 struct snd_ice1712 *ice = bus->private_data; in revo_i2c_stop() local 104 snd_ice1712_restore_gpio_status(ice); in revo_i2c_stop() 109 struct snd_ice1712 *ice = bus->private_data; in revo_i2c_direction() local 118 ice->gpio.direction &= ~mask; in revo_i2c_direction() 119 ice->gpio.direction |= val; in revo_i2c_direction() [all …]
|
D | aureon.c | 111 static void aureon_pca9554_write(struct snd_ice1712 *ice, unsigned char reg, in aureon_pca9554_write() argument 119 tmp = snd_ice1712_gpio_read(ice); in aureon_pca9554_write() 121 snd_ice1712_gpio_set_mask(ice, ~(AUREON_SPI_MOSI|AUREON_SPI_CLK| in aureon_pca9554_write() 129 snd_ice1712_gpio_write(ice, tmp); in aureon_pca9554_write() 137 snd_ice1712_gpio_write(ice, tmp); in aureon_pca9554_write() 140 snd_ice1712_gpio_write(ice, tmp); in aureon_pca9554_write() 143 snd_ice1712_gpio_write(ice, tmp); in aureon_pca9554_write() 146 snd_ice1712_gpio_write(ice, tmp); in aureon_pca9554_write() 166 snd_ice1712_gpio_write(ice, tmp); in aureon_pca9554_write() 172 snd_ice1712_gpio_write(ice, tmp); in aureon_pca9554_write() [all …]
|
D | juli.c | 180 static void juli_spdif_in_open(struct snd_ice1712 *ice, in juli_spdif_in_open() argument 183 struct juli_spec *spec = ice->spec; in juli_spdif_in_open() 188 !ice->is_spdif_master(ice)) in juli_spdif_in_open() 212 struct snd_ice1712 *ice = ak->private_data[0]; in juli_akm_write() local 216 snd_vt1724_write_i2c(ice, AK4358_ADDR, addr, data); in juli_akm_write() 226 struct snd_ice1712 *ice = ak->private_data[0]; in juli_akm_set_rate_val() local 227 struct juli_spec *spec = ice->spec; in juli_akm_set_rate_val() 245 old_gpio = ice->gpio.get_data(ice); in juli_akm_set_rate_val() 249 ice->gpio.set_data(ice, new_gpio); in juli_akm_set_rate_val() 252 old = inb(ICEMT1724(ice, AC97_CMD)); in juli_akm_set_rate_val() [all …]
|
D | prodigy192.c | 75 static inline void stac9460_put(struct snd_ice1712 *ice, int reg, unsigned char val) in stac9460_put() argument 77 snd_vt1724_write_i2c(ice, PRODIGY192_STAC9460_ADDR, reg, val); in stac9460_put() 80 static inline unsigned char stac9460_get(struct snd_ice1712 *ice, int reg) in stac9460_get() argument 82 return snd_vt1724_read_i2c(ice, PRODIGY192_STAC9460_ADDR, reg); in stac9460_get() 92 static int stac9460_dac_mute(struct snd_ice1712 *ice, int idx, in stac9460_dac_mute() argument 97 old = stac9460_get(ice, idx); in stac9460_dac_mute() 102 stac9460_put(ice, idx, new); in stac9460_dac_mute() 110 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_dac_mute_get() local 118 val = stac9460_get(ice, idx); in stac9460_dac_mute_get() 125 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_dac_mute_put() local [all …]
|
D | phase.c | 123 static int phase22_init(struct snd_ice1712 *ice) in phase22_init() argument 129 switch (ice->eeprom.subvendor) { in phase22_init() 132 ice->num_total_dacs = 2; in phase22_init() 133 ice->num_total_adcs = 2; in phase22_init() 134 ice->vt1720 = 1; /* Envy24HT-S have 16 bit wide GPIO */ in phase22_init() 142 ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); in phase22_init() 143 ak = ice->akm; in phase22_init() 146 ice->akm_codecs = 1; in phase22_init() 147 switch (ice->eeprom.subvendor) { in phase22_init() 151 &akm_phase22_priv, ice); in phase22_init() [all …]
|
D | psc724.c | 39 struct snd_ice1712 *ice; member 121 struct snd_ice1712 *ice = spec->ice; in psc724_wm8766_write() local 125 snd_ice1712_save_gpio_status(ice); in psc724_wm8766_write() 128 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction | PSC724_SPI_MASK); in psc724_wm8766_write() 129 snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask & ~PSC724_SPI_MASK); in psc724_wm8766_write() 130 bits = snd_ice1712_gpio_read(ice) & ~PSC724_SPI_MASK; in psc724_wm8766_write() 131 snd_ice1712_gpio_write(ice, bits); in psc724_wm8766_write() 142 snd_ice1712_gpio_write(ice, bits); in psc724_wm8766_write() 146 snd_ice1712_gpio_write(ice, bits); in psc724_wm8766_write() 151 snd_ice1712_gpio_write(ice, bits); in psc724_wm8766_write() [all …]
|
D | wtm.c | 49 static inline void stac9460_put(struct snd_ice1712 *ice, int reg, in stac9460_put() argument 52 snd_vt1724_write_i2c(ice, STAC9460_I2C_ADDR, reg, val); in stac9460_put() 55 static inline unsigned char stac9460_get(struct snd_ice1712 *ice, int reg) in stac9460_get() argument 57 return snd_vt1724_read_i2c(ice, STAC9460_I2C_ADDR, reg); in stac9460_get() 63 static inline void stac9460_2_put(struct snd_ice1712 *ice, int reg, in stac9460_2_put() argument 66 snd_vt1724_write_i2c(ice, STAC9460_2_I2C_ADDR, reg, val); in stac9460_2_put() 69 static inline unsigned char stac9460_2_get(struct snd_ice1712 *ice, int reg) in stac9460_2_get() argument 71 return snd_vt1724_read_i2c(ice, STAC9460_2_I2C_ADDR, reg); in stac9460_2_get() 78 static void stac9460_dac_mute_all(struct snd_ice1712 *ice, unsigned char mute, in stac9460_dac_mute_all() argument 91 old = stac9460_get(ice, idx); in stac9460_dac_mute_all() [all …]
|
D | ak4xxx.c | 40 struct snd_ice1712 *ice = ak->private_data[0]; in snd_ice1712_akm4xxx_lock() local 42 snd_ice1712_save_gpio_status(ice); in snd_ice1712_akm4xxx_lock() 47 struct snd_ice1712 *ice = ak->private_data[0]; in snd_ice1712_akm4xxx_unlock() local 49 snd_ice1712_restore_gpio_status(ice); in snd_ice1712_akm4xxx_unlock() 62 struct snd_ice1712 *ice = ak->private_data[0]; in snd_ice1712_akm4xxx_write() local 67 tmp = snd_ice1712_gpio_read(ice); in snd_ice1712_akm4xxx_write() 75 snd_ice1712_gpio_write(ice, tmp); in snd_ice1712_akm4xxx_write() 82 snd_ice1712_gpio_write(ice, tmp); in snd_ice1712_akm4xxx_write() 92 snd_ice1712_gpio_write(ice, tmp); in snd_ice1712_akm4xxx_write() 99 snd_ice1712_gpio_write(ice, tmp); in snd_ice1712_akm4xxx_write() [all …]
|
D | amp.c | 33 static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val) in wm_put() argument 37 snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff); in wm_put() 40 static int snd_vt1724_amp_init(struct snd_ice1712 *ice) in snd_vt1724_amp_init() argument 54 ice->num_total_dacs = 6; in snd_vt1724_amp_init() 55 ice->num_total_adcs = 2; in snd_vt1724_amp_init() 60 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AV710) { in snd_vt1724_amp_init() 62 wm_put(ice, wm_inits[i], wm_inits[i+1]); in snd_vt1724_amp_init() 68 static int snd_vt1724_amp_add_controls(struct snd_ice1712 *ice) in snd_vt1724_amp_add_controls() argument 70 if (ice->ac97) in snd_vt1724_amp_add_controls() 73 snd_ac97_write_cache(ice->ac97, 0x5a, in snd_vt1724_amp_add_controls() [all …]
|
D | maya44.c | 83 struct snd_ice1712 *ice; member 90 static void wm8776_write(struct snd_ice1712 *ice, struct snd_wm8776 *wm, in wm8776_write() argument 97 snd_vt1724_write_i2c(ice, wm->addr, in wm8776_write() 106 static int wm8776_write_bits(struct snd_ice1712 *ice, struct snd_wm8776 *wm, in wm8776_write_bits() argument 112 wm8776_write(ice, wm, reg, val); in wm8776_write_bits() 222 changed |= wm8776_write_bits(chip->ice, wm, vol->regs[ch], in maya_vol_put() 225 wm8776_write_bits(chip->ice, wm, WM8776_REG_ADC_MUX, in maya_vol_put() 274 changed = wm8776_write_bits(chip->ice, wm, in maya_sw_put() 297 static int maya_set_gpio_bits(struct snd_ice1712 *ice, unsigned int mask, in maya_set_gpio_bits() argument 301 data = snd_ice1712_gpio_read(ice); in maya_set_gpio_bits() [all …]
|
D | vt1720_mobo.c | 34 static int k8x800_init(struct snd_ice1712 *ice) in k8x800_init() argument 36 ice->vt1720 = 1; in k8x800_init() 39 ice->num_total_dacs = 6; in k8x800_init() 40 ice->num_total_adcs = 2; in k8x800_init() 48 static int k8x800_add_controls(struct snd_ice1712 *ice) in k8x800_add_controls() argument
|
D | envy24ht.h | 53 #define ICEREG1724(ice, x) ((ice)->port + VT1724_REG_##x) argument 131 #define ICEMT1724(ice, x) ((ice)->profi_port + VT1724_MT_##x) argument 217 unsigned char snd_vt1724_read_i2c(struct snd_ice1712 *ice, unsigned char dev, unsigned char addr); 218 void snd_vt1724_write_i2c(struct snd_ice1712 *ice, unsigned char dev, unsigned char addr, unsigned …
|