Lines Matching defs:ice

27 #define ICEREG(ice, x) ((ice)->port + ICE1712_REG_##x)
104 #define ICEDS(ice, x) ((ice)->dmapath_port + ICE1712_DS_##x)
135 #define ICEMT(ice, x) ((ice)->profi_port + ICE1712_MT_##x)
248 #define ice_has_con_ac97(ice) (!((ice)->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_NO_CON_AC97))
354 void (*set_mask)(struct snd_ice1712 *ice, unsigned int data);
355 unsigned int (*get_mask)(struct snd_ice1712 *ice);
356 void (*set_dir)(struct snd_ice1712 *ice, unsigned int data);
357 unsigned int (*get_dir)(struct snd_ice1712 *ice);
358 void (*set_data)(struct snd_ice1712 *ice, unsigned int data);
359 unsigned int (*get_data)(struct snd_ice1712 *ice);
361 void (*set_pro_rate)(struct snd_ice1712 *ice, unsigned int rate);
362 void (*i2s_mclk_changed)(struct snd_ice1712 *ice);
371 int (*is_spdif_master)(struct snd_ice1712 *ice);
372 unsigned int (*get_rate)(struct snd_ice1712 *ice);
373 void (*set_rate)(struct snd_ice1712 *ice, unsigned int rate);
374 unsigned char (*set_mclk)(struct snd_ice1712 *ice, unsigned int rate);
375 int (*set_spdif_clock)(struct snd_ice1712 *ice, int type);
376 int (*get_spdif_master_type)(struct snd_ice1712 *ice);
395 static inline void snd_ice1712_gpio_set_dir(struct snd_ice1712 *ice, unsigned int bits)
397 ice->gpio.set_dir(ice, bits);
400 static inline unsigned int snd_ice1712_gpio_get_dir(struct snd_ice1712 *ice)
402 return ice->gpio.get_dir(ice);
405 static inline void snd_ice1712_gpio_set_mask(struct snd_ice1712 *ice, unsigned int bits)
407 ice->gpio.set_mask(ice, bits);
410 static inline void snd_ice1712_gpio_write(struct snd_ice1712 *ice, unsigned int val)
412 ice->gpio.set_data(ice, val);
415 static inline unsigned int snd_ice1712_gpio_read(struct snd_ice1712 *ice)
417 return ice->gpio.get_data(ice);
425 static inline void snd_ice1712_save_gpio_status(struct snd_ice1712 *ice)
427 mutex_lock(&ice->gpio_mutex);
428 ice->gpio.saved[0] = ice->gpio.direction;
429 ice->gpio.saved[1] = ice->gpio.write_mask;
432 static inline void snd_ice1712_restore_gpio_status(struct snd_ice1712 *ice)
434 ice->gpio.set_dir(ice, ice->gpio.saved[0]);
435 ice->gpio.set_mask(ice, ice->gpio.saved[1]);
436 ice->gpio.direction = ice->gpio.saved[0];
437 ice->gpio.write_mask = ice->gpio.saved[1];
438 mutex_unlock(&ice->gpio_mutex);
453 static inline void snd_ice1712_gpio_write_bits(struct snd_ice1712 *ice,
458 ice->gpio.direction |= mask;
459 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
460 val = snd_ice1712_gpio_read(ice);
463 snd_ice1712_gpio_write(ice, val);
466 static inline int snd_ice1712_gpio_read_bits(struct snd_ice1712 *ice,
469 ice->gpio.direction &= ~mask;
470 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
471 return snd_ice1712_gpio_read(ice) & mask;
475 int snd_ice1724_get_route_val(struct snd_ice1712 *ice, int shift);
476 int snd_ice1724_put_route_val(struct snd_ice1712 *ice, unsigned int val,
479 int snd_ice1712_spdif_build_controls(struct snd_ice1712 *ice);
484 struct snd_ice1712 *ice);
485 void snd_ice1712_akm4xxx_free(struct snd_ice1712 *ice);
486 int snd_ice1712_akm4xxx_build_controls(struct snd_ice1712 *ice);
488 int snd_ice1712_init_cs8427(struct snd_ice1712 *ice, int addr);
490 static inline void snd_ice1712_write(struct snd_ice1712 *ice, u8 addr, u8 data)
492 outb(addr, ICEREG(ice, INDEX));
493 outb(data, ICEREG(ice, DATA));
496 static inline u8 snd_ice1712_read(struct snd_ice1712 *ice, u8 addr)
498 outb(addr, ICEREG(ice, INDEX));
499 return inb(ICEREG(ice, DATA));