34 static int set_professional_spdif(
struct echoaudio *
chip,
char prof);
44 DE_INIT((
"init_hw() - Gina24\n"));
48 if ((err = init_dsp_comm_page(chip))) {
49 DE_INIT((
"init_hw - could not initialize DSP comm page\n"));
77 if ((err = load_firmware(chip)) < 0)
87 static int set_mixer_defaults(
struct echoaudio *chip)
92 return init_line_levels(chip);
97 static u32 detect_input_clocks(
const struct echoaudio *chip)
99 u32 clocks_from_dsp, clock_bits;
123 static int load_asic(
struct echoaudio *chip)
150 err = check_asic_status(chip);
156 err = write_control_reg(chip, control_reg,
TRUE);
158 DE_INIT((
"load_asic() done\n"));
174 DE_ACT((
"set_sample_rate: Cannot set sample rate - "
175 "clock not set to CLK_CLOCKININTERNAL\n"));
220 DE_ACT((
"set_sample_rate: %d invalid!\n", rate));
224 control_reg |=
clock;
228 DE_ACT((
"set_sample_rate: %d clock %d\n", rate, clock));
230 return write_control_reg(chip, control_reg,
FALSE);
235 static int set_input_clock(
struct echoaudio *chip,
u16 clock)
237 u32 control_reg, clocks_from_dsp;
239 DE_ACT((
"set_input_clock:\n"));
248 DE_ACT((
"Set Gina24 clock to INTERNAL\n"));
254 DE_ACT((
"Set Gina24 clock to SPDIF\n"));
264 DE_ACT((
"Set Gina24 clock to ADAT\n"));
269 DE_ACT((
"Set Gina24 clock to ESYNC\n"));
274 DE_ACT((
"Set Gina24 clock to ESYNC96\n"));
278 DE_ACT((
"Input clock 0x%x not supported for Gina24\n", clock));
283 return write_control_reg(chip, control_reg,
TRUE);
291 int err, incompatible_clock;
294 incompatible_clock =
FALSE;
300 incompatible_clock =
TRUE;
304 incompatible_clock =
TRUE;
307 DE_ACT((
"Digital mode not supported: %d\n", mode));
311 spin_lock_irq(&chip->
lock);
313 if (incompatible_clock) {
341 err = write_control_reg(chip, control_reg,
TRUE);
342 spin_unlock_irq(&chip->
lock);
348 return incompatible_clock;