• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/sound/pci/echoaudio/

Lines Matching refs:chip

32 static int set_input_clock(struct echoaudio *chip, u16 clock);
33 static int set_professional_spdif(struct echoaudio *chip, char prof);
34 static int update_flags(struct echoaudio *chip);
35 static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe,
37 static int update_vmixer_level(struct echoaudio *chip);
40 static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
47 if ((err = init_dsp_comm_page(chip))) {
52 chip->device_id = device_id;
53 chip->subdevice_id = subdevice_id;
54 chip->bad_board = TRUE;
55 chip->dsp_code_to_load = &card_fw[FW_MIA_DSP];
58 chip->asic_loaded = TRUE;
60 chip->has_midi = TRUE;
61 chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL |
64 if ((err = load_firmware(chip)) < 0)
66 chip->bad_board = FALSE;
68 if ((err = init_line_levels(chip)))
73 set_vmixer_gain(chip, 0, 0, 0);
74 set_vmixer_gain(chip, 1, 1, 0);
75 set_vmixer_gain(chip, 0, 2, 0);
76 set_vmixer_gain(chip, 1, 3, 0);
77 set_vmixer_gain(chip, 2, 4, 0);
78 set_vmixer_gain(chip, 3, 5, 0);
79 set_vmixer_gain(chip, 2, 6, 0);
80 set_vmixer_gain(chip, 3, 7, 0);
81 err = update_vmixer_level(chip);
89 static u32 detect_input_clocks(const struct echoaudio *chip)
95 clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks);
108 static int load_asic(struct echoaudio *chip)
115 static int set_sample_rate(struct echoaudio *chip, u32 rate)
141 if (chip->input_clock == ECHO_CLOCK_SPDIF)
145 if (control_reg != le32_to_cpu(chip->comm_page->control_register)) {
146 if (wait_handshake(chip))
149 chip->comm_page->sample_rate = cpu_to_le32(rate); /* ignored by the DSP */
150 chip->comm_page->control_register = cpu_to_le32(control_reg);
151 chip->sample_rate = rate;
153 clear_handshake(chip);
154 return send_vector(chip, DSP_VC_UPDATE_CLOCKS);
161 static int set_input_clock(struct echoaudio *chip, u16 clock)
167 chip->input_clock = clock;
168 return set_sample_rate(chip, chip->sample_rate);
174 static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe,
179 snd_assert(pipe < num_pipes_out(chip) &&
180 output < num_busses_out(chip), return -EINVAL);
182 if (wait_handshake(chip))
185 chip->vmixer_gain[output][pipe] = gain;
186 index = output * num_pipes_out(chip) + pipe;
187 chip->comm_page->vmixer[index] = gain;
196 static int update_vmixer_level(struct echoaudio *chip)
198 if (wait_handshake(chip))
200 clear_handshake(chip);
201 return send_vector(chip, DSP_VC_SET_VMIXER_GAIN);
207 static int update_flags(struct echoaudio *chip)
209 if (wait_handshake(chip))
211 clear_handshake(chip);
212 return send_vector(chip, DSP_VC_UPDATE_FLAGS);
217 static int set_professional_spdif(struct echoaudio *chip, char prof)
221 chip->comm_page->flags |=
224 chip->comm_page->flags &=
226 chip->professional_spdif = prof;
227 return update_flags(chip);