static int __devinit prodigy_hd2_init(struct snd_ice1712 *ice) { struct prodigy_hifi_spec *spec; ice->vt1720 = 0; ice->vt1724 = 1; ice->num_total_dacs = 1; ice->num_total_adcs = 1; /* HACK - use this as the SPDIF source. * don't call snd_ice1712_gpio_get/put(), otherwise it's overwritten */ ice->gpio.saved[0] = 0; ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); if (! ice->akm) return -ENOMEM; ice->akm_codecs = 1; spec = kzalloc(sizeof(*spec), GFP_KERNEL); if (!spec) return -ENOMEM; ice->spec = spec; #ifdef CONFIG_PM ice->pm_resume = &prodigy_hd2_resume; ice->pm_suspend_enabled = 1; #endif ak4396_init(ice); return 0; }
static void claro_halo_init(struct oxygen *chip) { oxygen_set_bits16(chip, OXYGEN_GPIO_CONTROL, GPIO_CLARO_DIG_COAX); oxygen_clear_bits16(chip, OXYGEN_GPIO_DATA, GPIO_CLARO_DIG_COAX); ak4396_init(chip); ak5385_init(chip); claro_enable_hp(chip); }
static void meridian_init(struct oxygen *chip) { oxygen_set_bits16(chip, OXYGEN_GPIO_CONTROL, GPIO_MERIDIAN_DIG_MASK); oxygen_write16_masked(chip, OXYGEN_GPIO_DATA, GPIO_MERIDIAN_DIG_BOARD, GPIO_MERIDIAN_DIG_MASK); ak4396_init(chip); ak5385_init(chip); }
static int prodigy_hd2_resume(struct snd_ice1712 *ice) { struct prodigy_hifi_spec *spec = ice->spec; int i; mutex_lock(&ice->gpio_mutex); ak4396_init(ice); for (i = 0; i < 2; i++) ak4396_write(ice, AK4396_LCH_ATT + i, spec->vol[i] & 0xff); mutex_unlock(&ice->gpio_mutex); return 0; }
static void claro_halo_init(struct oxygen *chip) { ak4396_init(chip); ak5385_init(chip); claro_enable_hp(chip); }
static void claro_init(struct oxygen *chip) { ak4396_init(chip); wm8785_init(chip); claro_enable_hp(chip); }
static void meridian_init(struct oxygen *chip) { ak4396_init(chip); ak5385_init(chip); }
static void generic_init(struct oxygen *chip) { ak4396_init(chip); wm8785_init(chip); }
static void stereo_output_init(struct oxygen *chip) { ak4396_init(chip); }
static void fantasia_init(struct oxygen *chip) { ak4396_init(chip); snd_component_add(chip->card, "CS5340"); }