Lines Matching +full:op +full:- +full:panel

1 // SPDX-License-Identifier: GPL-2.0-only
11 * ------------
18 * SPI 0 -> CS4245
21 * I²S 1 -> CS4245
22 * I²S 2 -> CS4361 (center/LFE)
23 * I²S 3 -> CS4361 (surround)
24 * I²S 4 -> CS4361 (front)
26 * I²S ADC 1 <- CS4245
28 * GPIO 3 <- ?
29 * GPIO 4 <- headphone detect
30 * GPIO 5 -> enable ADC analog circuit for the left channel
31 * GPIO 6 -> enable ADC analog circuit for the right channel
32 * GPIO 7 -> switch green rear output jack between CS4245 and the first
34 * GPIO 8 -> enable output to speakers
38 * input 0 <- mic
39 * input 1 <- aux
40 * input 2 <- front mic
41 * input 4 <- line
42 * DAC out -> headphones
43 * aux out -> front panel headphones
59 struct dg *data = chip->model_data; in cs4245_write_spi()
64 packet |= data->cs4245_shadow[reg]; in cs4245_write_spi()
76 struct dg *data = chip->model_data; in cs4245_read_spi()
95 data->cs4245_shadow[addr] = oxygen_read8(chip, OXYGEN_SPI_DATA1); in cs4245_read_spi()
100 int cs4245_shadow_control(struct oxygen *chip, enum cs4245_shadow_operation op) in cs4245_shadow_control() argument
102 struct dg *data = chip->model_data; in cs4245_shadow_control()
106 for (addr = 1; addr < ARRAY_SIZE(data->cs4245_shadow); addr++) { in cs4245_shadow_control()
107 ret = (op == CS4245_SAVE_TO_SHADOW ? in cs4245_shadow_control()
118 struct dg *data = chip->model_data; in cs4245_init()
128 data->cs4245_shadow[CS4245_POWER_CTRL] = 0; in cs4245_init()
129 data->cs4245_shadow[CS4245_SIGNAL_SEL] = in cs4245_init()
131 data->cs4245_shadow[CS4245_DAC_CTRL_1] = in cs4245_init()
133 data->cs4245_shadow[CS4245_DAC_CTRL_2] = in cs4245_init()
135 data->cs4245_shadow[CS4245_ADC_CTRL] = in cs4245_init()
137 data->cs4245_shadow[CS4245_ANALOG_IN] = in cs4245_init()
139 data->cs4245_shadow[CS4245_PGA_B_CTRL] = 0; in cs4245_init()
140 data->cs4245_shadow[CS4245_PGA_A_CTRL] = 0; in cs4245_init()
141 data->cs4245_shadow[CS4245_DAC_A_CTRL] = 8; in cs4245_init()
142 data->cs4245_shadow[CS4245_DAC_B_CTRL] = 8; in cs4245_init()
145 snd_component_add(chip->card, "CS4245"); in cs4245_init()
150 struct dg *data = chip->model_data; in dg_init()
152 data->output_sel = PLAYBACK_DST_HP_FP; in dg_init()
153 data->input_sel = CAPTURE_SRC_MIC; in dg_init()
158 /* anti-pop delay, wait some time before enabling the output */ in dg_init()
184 struct dg *data = chip->model_data; in set_cs4245_dac_params()
188 dac_ctrl = data->cs4245_shadow[CS4245_DAC_CTRL_1] & ~CS4245_DAC_FM_MASK; in set_cs4245_dac_params()
189 mclk_freq = data->cs4245_shadow[CS4245_MCLK_FREQ] & ~CS4245_MCLK1_MASK; in set_cs4245_dac_params()
200 data->cs4245_shadow[CS4245_DAC_CTRL_1] = dac_ctrl; in set_cs4245_dac_params()
201 data->cs4245_shadow[CS4245_MCLK_FREQ] = mclk_freq; in set_cs4245_dac_params()
209 struct dg *data = chip->model_data; in set_cs4245_adc_params()
213 adc_ctrl = data->cs4245_shadow[CS4245_ADC_CTRL] & ~CS4245_ADC_FM_MASK; in set_cs4245_adc_params()
214 mclk_freq = data->cs4245_shadow[CS4245_MCLK_FREQ] & ~CS4245_MCLK2_MASK; in set_cs4245_adc_params()
225 data->cs4245_shadow[CS4245_ADC_CTRL] = adc_ctrl; in set_cs4245_adc_params()
226 data->cs4245_shadow[CS4245_MCLK_FREQ] = mclk_freq; in set_cs4245_adc_params()
237 return (value << (shift_to - shift_from)) & mask; in shift_bits()
239 return (value >> (shift_from - shift_to)) & mask; in shift_bits()
245 struct dg *data = chip->model_data; in adjust_dg_dac_routing()
247 switch (data->output_sel) { in adjust_dg_dac_routing()
277 struct dg *data = chip->model_data; in dump_cs4245_registers()
282 for (addr = 1; addr < ARRAY_SIZE(data->cs4245_shadow); addr++) in dump_cs4245_registers()
283 snd_iprintf(buffer, " %02x", data->cs4245_shadow[addr]); in dump_cs4245_registers()