Lines Matching +full:audio +full:- +full:gain +full:- +full:db

3    Copyright Echo Digital Audio Corporation (c) 1998 - 2004
7 This file is part of Echo Digital Audio's generic driver library.
9 Echo Digital Audio's generic driver library is free software;
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
41 return -ENODEV; in init_hw()
45 dev_err(chip->card->dev, in init_hw()
46 "init_hw - could not initialize DSP comm page\n"); in init_hw()
50 chip->device_id = device_id; in init_hw()
51 chip->subdevice_id = subdevice_id; in init_hw()
52 chip->bad_board = true; in init_hw()
53 chip->dsp_code_to_load = FW_GINA20_DSP; in init_hw()
54 chip->spdif_status = GD_SPDIF_STATUS_UNDEF; in init_hw()
55 chip->clock_state = GD_CLOCK_UNDEF; in init_hw()
58 chip->asic_loaded = true; in init_hw()
59 chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL | in init_hw()
65 chip->bad_board = false; in init_hw()
74 chip->professional_spdif = false; in set_mixer_defaults()
86 clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); in detect_input_clocks()
111 return -EIO; in set_sample_rate()
128 if (chip->clock_state == clock_state) in set_sample_rate()
130 if (spdif_status == chip->spdif_status) in set_sample_rate()
133 chip->comm_page->sample_rate = cpu_to_le32(rate); in set_sample_rate()
134 chip->comm_page->gd_clock_state = clock_state; in set_sample_rate()
135 chip->comm_page->gd_spdif_status = spdif_status; in set_sample_rate()
136 chip->comm_page->gd_resampler_state = 3; /* magic number - should always be 3 */ in set_sample_rate()
138 /* Save the new audio state if it changed */ in set_sample_rate()
140 chip->clock_state = clock_state; in set_sample_rate()
142 chip->spdif_status = spdif_status; in set_sample_rate()
143 chip->sample_rate = rate; in set_sample_rate()
156 /* Reset the audio state to unknown (just in case) */ in set_input_clock()
157 chip->clock_state = GD_CLOCK_UNDEF; in set_input_clock()
158 chip->spdif_status = GD_SPDIF_STATUS_UNDEF; in set_input_clock()
159 set_sample_rate(chip, chip->sample_rate); in set_input_clock()
160 chip->input_clock = clock; in set_input_clock()
163 chip->comm_page->gd_clock_state = GD_CLOCK_SPDIFIN; in set_input_clock()
164 chip->comm_page->gd_spdif_status = GD_SPDIF_STATUS_NOCHANGE; in set_input_clock()
167 chip->clock_state = GD_CLOCK_SPDIFIN; in set_input_clock()
168 chip->input_clock = clock; in set_input_clock()
171 return -EINVAL; in set_input_clock()
179 /* Set input bus gain (one unit is 0.5dB !) */
180 static int set_input_gain(struct echoaudio *chip, u16 input, int gain) in set_input_gain() argument
183 return -EINVAL; in set_input_gain()
186 return -EIO; in set_input_gain()
188 chip->input_gain[input] = gain; in set_input_gain()
189 gain += GL20_INPUT_GAIN_MAGIC_NUMBER; in set_input_gain()
190 chip->comm_page->line_in_level[input] = gain; in set_input_gain()
200 return -EIO; in update_flags()
210 chip->comm_page->flags |= in set_professional_spdif()
213 chip->comm_page->flags &= in set_professional_spdif()
215 chip->professional_spdif = prof; in set_professional_spdif()