Lines Matching +full:auto +full:- +full:mode
3 Copyright Echo Digital Audio Corporation (c) 1998 - 2004
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 MA 02111-1307, USA.
26 Translation from C++ and adaptation for use in ALSA-Driver
35 /* ASIC status check - some cards have one or two ASICs that need to be
39 defective - the external box may be disconnected or turned off. */
49 dev_err(chip->card->dev, in check_asic_status()
51 chip->asic_loaded = false; in check_asic_status()
52 return -EIO; in check_asic_status()
55 chip->asic_loaded = (asic_status == ASIC_ALREADY_LOADED); in check_asic_status()
56 return chip->asic_loaded ? 0 : -EIO; in check_asic_status()
68 /* Handle the digital input auto-mute */ in write_control_reg()
69 if (chip->digital_in_automute) in write_control_reg()
74 dev_dbg(chip->card->dev, "write_control_reg: 0x%x\n", value); in write_control_reg()
78 if (reg_value != chip->comm_page->control_register || force) { in write_control_reg()
80 return -EIO; in write_control_reg()
81 chip->comm_page->control_register = reg_value; in write_control_reg()
90 /* Gina24, Layla24, and Mona support digital input auto-mute. If the digital
91 input auto-mute is enabled, the DSP will only enable the digital inputs if
93 If the auto-mute is disabled, the digital inputs are enabled regardless of
97 dev_dbg(chip->card->dev, "set_input_auto_mute %d\n", automute); in set_input_auto_mute()
99 chip->digital_in_automute = automute; in set_input_auto_mute()
101 /* Re-set the input clock to the current value - indirectly causes in set_input_auto_mute()
102 the auto-mute flag to be sent to the DSP */ in set_input_auto_mute()
103 return set_input_clock(chip, chip->input_clock); in set_input_auto_mute()
108 /* S/PDIF coax / S/PDIF optical / ADAT - switch */
109 static int set_digital_mode(struct echoaudio *chip, u8 mode) in set_digital_mode() argument
114 if (chip->bad_board) in set_digital_mode()
115 return -EIO; in set_digital_mode()
117 /* All audio channels must be closed before changing the digital mode */ in set_digital_mode()
118 if (snd_BUG_ON(chip->pipe_alloc_mask)) in set_digital_mode()
119 return -EAGAIN; in set_digital_mode()
121 if (snd_BUG_ON(!(chip->digital_modes & (1 << mode)))) in set_digital_mode()
122 return -EINVAL; in set_digital_mode()
124 previous_mode = chip->digital_mode; in set_digital_mode()
125 err = dsp_set_digital_mode(chip, mode); in set_digital_mode()
127 /* If we successfully changed the digital mode from or to ADAT, in set_digital_mode()
130 if (err >= 0 && previous_mode != mode && in set_digital_mode()
131 (previous_mode == DIGITAL_MODE_ADAT || mode == DIGITAL_MODE_ADAT)) { in set_digital_mode()
132 spin_lock_irq(&chip->lock); in set_digital_mode()
136 chip->monitor_gain[o][i]); in set_digital_mode()
140 set_input_gain(chip, i, chip->input_gain[i]); in set_digital_mode()
145 set_output_gain(chip, o, chip->output_gain[o]); in set_digital_mode()
147 spin_unlock_irq(&chip->lock); in set_digital_mode()
162 control_reg = le32_to_cpu(chip->comm_page->control_register); in set_professional_spdif()
165 /* Set the new S/PDIF flags depending on the mode */ in set_professional_spdif()
169 /* Professional mode */ in set_professional_spdif()
172 switch (chip->sample_rate) { in set_professional_spdif()
185 /* Consumer mode */ in set_professional_spdif()
186 switch (chip->sample_rate) { in set_professional_spdif()
200 chip->professional_spdif = prof; in set_professional_spdif()
201 dev_dbg(chip->card->dev, "set_professional_spdif to %s\n", in set_professional_spdif()