Home
last modified time | relevance | path

Searched refs:aw_dev (Results 1 – 16 of 16) sorted by relevance

/OK3568_Linux_fs/kernel/sound/soc/codecs/aw883xx/
H A Daw_device.c38 static int aw_dev_reg_dump(struct aw_device *aw_dev) in aw_dev_reg_dump() argument
40 int reg_num = aw_dev->ops.aw_get_reg_num(); in aw_dev_reg_dump()
45 if (aw_dev->ops.aw_check_rd_access(i)) { in aw_dev_reg_dump()
46 aw_dev->ops.aw_reg_read(aw_dev, i, &reg_val); in aw_dev_reg_dump()
47 aw_dev_info(aw_dev->dev, "read: reg = 0x%02x, val = 0x%04x", in aw_dev_reg_dump()
55 static void aw_dev_fade_in(struct aw_device *aw_dev) in aw_dev_fade_in() argument
58 struct aw_volume_desc *desc = &aw_dev->volume_desc; in aw_dev_fade_in()
59 int fade_step = aw_dev->fade_step; in aw_dev_fade_in()
61 if (!aw_dev->fade_en) in aw_dev_fade_in()
65 aw_dev->ops.aw_set_volume(aw_dev, desc->init_volume); in aw_dev_fade_in()
[all …]
H A Daw_calib.c163 static void aw_run_mute_for_cali(struct aw_device *aw_dev, int8_t cali_result) in aw_run_mute_for_cali() argument
165 struct aw_mute_desc *mute_desc = &aw_dev->mute_desc; in aw_run_mute_for_cali()
167 aw_dev_dbg(aw_dev->dev, "enter"); in aw_run_mute_for_cali()
168 if (aw_dev->cali_desc.cali_check_st) { in aw_run_mute_for_cali()
170 aw_dev->ops.aw_reg_write_bits(aw_dev, mute_desc->reg, in aw_run_mute_for_cali()
173 aw_dev->ops.aw_reg_write_bits(aw_dev, mute_desc->reg, in aw_run_mute_for_cali()
178 aw_dev_info(aw_dev->dev, "cali check disable"); in aw_run_mute_for_cali()
180 aw_dev_info(aw_dev->dev, "done"); in aw_run_mute_for_cali()
183 static int aw_cali_svc_get_dev_re_range(struct aw_device *aw_dev, in aw_cali_svc_get_dev_re_range() argument
186 data_buf[RE_MIN_FLAG] = aw_dev->re_range.re_min; in aw_cali_svc_get_dev_re_range()
[all …]
H A Daw_monitor.c46 static int aw_monitor_get_chip_voltage(struct aw_device *aw_dev, in aw_monitor_get_chip_voltage() argument
51 struct aw_voltage_desc *desc = &aw_dev->voltage_desc; in aw_monitor_get_chip_voltage()
53 ret = aw_dev->ops.aw_reg_read(aw_dev, desc->reg, (uint16_t *)vol); in aw_monitor_get_chip_voltage()
55 aw_dev_err(aw_dev->dev, "read voltage failed!"); in aw_monitor_get_chip_voltage()
60 aw_dev_err(aw_dev->dev, "desc->int_bit:%d unsupported", desc->int_bit); in aw_monitor_get_chip_voltage()
68 aw_dev_info(aw_dev->dev, "chip voltage is %d", *vol); in aw_monitor_get_chip_voltage()
73 static int aw_monitor_get_chip_temperature(struct aw_device *aw_dev, int *temp) in aw_monitor_get_chip_temperature() argument
78 struct aw_temperature_desc *desc = &aw_dev->temp_desc; in aw_monitor_get_chip_temperature()
80 ret = aw_dev->ops.aw_reg_read(aw_dev, desc->reg, &reg_val); in aw_monitor_get_chip_temperature()
82 aw_dev_err(aw_dev->dev, "get temperature failed!"); in aw_monitor_get_chip_temperature()
[all …]
H A Daw_bin_parse.c504 int aw_dev_dsp_data_order(struct aw_device *aw_dev, in aw_dev_dsp_data_order() argument
510 aw_dev_dbg(aw_dev->dev, "enter"); in aw_dev_dsp_data_order()
513 aw_dev_dbg(aw_dev->dev, "data_len:%d unsupported", data_len); in aw_dev_dsp_data_order()
526 static int aw_dev_parse_raw_reg(struct aw_device *aw_dev, in aw_dev_parse_raw_reg() argument
529 aw_dev_info(aw_dev->dev, "data_size:%d enter", data_len); in aw_dev_parse_raw_reg()
539 static int aw_dev_parse_raw_dsp_cfg(struct aw_device *aw_dev, in aw_dev_parse_raw_dsp_cfg() argument
544 aw_dev_info(aw_dev->dev, "data_size:%d enter", data_len); in aw_dev_parse_raw_dsp_cfg()
546 ret = aw_dev_dsp_data_order(aw_dev, data, data_len); in aw_dev_parse_raw_dsp_cfg()
558 static int aw_dev_parse_raw_dsp_fw(struct aw_device *aw_dev, in aw_dev_parse_raw_dsp_fw() argument
563 aw_dev_info(aw_dev->dev, "data_size:%d enter", data_len); in aw_dev_parse_raw_dsp_fw()
[all …]
H A Daw_device.h108 int (*aw_i2c_writes)(struct aw_device *aw_dev, uint8_t reg_addr, uint8_t *buf, uint16_t len);
109 int (*aw_i2c_write)(struct aw_device *aw_dev, uint8_t reg_addr, uint16_t reg_data);
110 int (*aw_i2c_read)(struct aw_device *aw_dev, uint8_t reg_addr, uint16_t *reg_data);
112 int (*aw_reg_write)(struct aw_device *aw_dev, uint8_t reg_addr, uint16_t reg_data);
113 int (*aw_reg_read)(struct aw_device *aw_dev, uint8_t reg_addr, uint16_t *reg_data);
114 …int (*aw_reg_write_bits)(struct aw_device *aw_dev, uint8_t reg_addr, uint16_t mask, uint16_t reg_d…
116 …int (*aw_dsp_write)(struct aw_device *aw_dev, uint16_t dsp_addr, uint32_t reg_data, uint8_t data_t…
117 …int (*aw_dsp_read)(struct aw_device *aw_dev, uint16_t dsp_addr, uint32_t *dsp_data, uint8_t data_t…
118 …int (*aw_dsp_write_bits)(struct aw_device *aw_dev, uint16_t dsp_addr, uint16_t mask, uint16_t dsp_…
120 int (*aw_set_volume)(struct aw_device *aw_dev, uint16_t value);
[all …]
H A Daw_spin.c119 static int aw_mtk_set_spin_angle(struct aw_device *aw_dev, uint32_t spin_angle) in aw_mtk_set_spin_angle() argument
125 aw_dev_err(aw_dev->dev, "write data to dsp failed"); in aw_mtk_set_spin_angle()
153 static int aw_mtk_set_mixer_en(struct aw_device *aw_dev, uint32_t msg_id, int32_t is_enable) in aw_mtk_set_mixer_en() argument
161 aw_dev_err(aw_dev->dev, "kzalloc dsp_msg error"); in aw_mtk_set_mixer_en()
175 aw_dev_err(aw_dev->dev, " write data failed"); in aw_mtk_set_mixer_en()
237 static int aw_qcom_set_spin_angle(struct aw_device *aw_dev, in aw_qcom_set_spin_angle() argument
244 aw_dev_err(aw_dev->dev, "write spin angle to dsp failed"); in aw_qcom_set_spin_angle()
246 aw_dev_info(aw_dev->dev, "write spin angle to dsp successful"); in aw_qcom_set_spin_angle()
264 static int aw_qcom_set_mixer_en(struct aw_device *aw_dev, in aw_qcom_set_mixer_en() argument
273 aw_dev_err(aw_dev->dev, "kzalloc dsp_msg error"); in aw_qcom_set_mixer_en()
[all …]
H A Daw_init.c27 static int aw883xx_dev_i2c_writes(struct aw_device *aw_dev, in aw883xx_dev_i2c_writes() argument
30 struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data; in aw883xx_dev_i2c_writes()
35 static int aw883xx_dev_i2c_write(struct aw_device *aw_dev, in aw883xx_dev_i2c_write() argument
38 struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data; in aw883xx_dev_i2c_write()
43 static int aw883xx_dev_i2c_read(struct aw_device *aw_dev, in aw883xx_dev_i2c_read() argument
46 struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data; in aw883xx_dev_i2c_read()
52 static int aw883xx_dev_reg_read(struct aw_device *aw_dev, in aw883xx_dev_reg_read() argument
55 struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data; in aw883xx_dev_reg_read()
60 static int aw883xx_dev_reg_write(struct aw_device *aw_dev, in aw883xx_dev_reg_write() argument
63 struct aw883xx *aw883xx = (struct aw883xx *)aw_dev->private_data; in aw883xx_dev_reg_write()
[all …]
H A Daw_bin_parse.h129 int aw_dev_dsp_data_order(struct aw_device *aw_dev,
131 int aw_dev_get_prof_data(struct aw_device *aw_dev, int index,
133 char *aw_dev_get_prof_name(struct aw_device *aw_dev, int index);
134 int aw_dev_set_profile_index(struct aw_device *aw_dev, int index);
135 int aw_dev_get_profile_index(struct aw_device *aw_dev);
136 int aw_dev_check_profile_index(struct aw_device *aw_dev, int index);
137 int aw_dev_get_profile_count(struct aw_device *aw_dev);
138 int aw_dev_cfg_load(struct aw_device *aw_dev, struct aw_container *aw_cfg);
H A Daw_spin.h70 void aw_add_spin_controls(void *aw_dev);
/OK3568_Linux_fs/kernel/sound/soc/codecs/aw87xxx/
H A Daw_device.c76 static int aw_dev_get_chipid(struct aw_device *aw_dev);
83 int aw_dev_i2c_write_byte(struct aw_device *aw_dev, in aw_dev_i2c_write_byte() argument
90 ret = i2c_smbus_write_byte_data(aw_dev->i2c, reg_addr, reg_data); in aw_dev_i2c_write_byte()
92 AW_DEV_LOGE(aw_dev->dev, "i2c_write cnt=%d error=%d", in aw_dev_i2c_write_byte()
104 int aw_dev_i2c_read_byte(struct aw_device *aw_dev, in aw_dev_i2c_read_byte() argument
111 ret = i2c_smbus_read_byte_data(aw_dev->i2c, reg_addr); in aw_dev_i2c_read_byte()
113 AW_DEV_LOGE(aw_dev->dev, "i2c_read cnt=%d error=%d", in aw_dev_i2c_read_byte()
126 int aw_dev_i2c_read_msg(struct aw_device *aw_dev, in aw_dev_i2c_read_msg() argument
133 .addr = aw_dev->i2c_addr, in aw_dev_i2c_read_msg()
139 .addr = aw_dev->i2c_addr, in aw_dev_i2c_read_msg()
[all …]
H A Daw_device.h44 int (*pwr_on_func)(struct aw_device *aw_dev, struct aw_data_container *data);
45 int (*pwr_off_func)(struct aw_device *aw_dev, struct aw_data_container *data);
131 int aw_dev_i2c_write_byte(struct aw_device *aw_dev,
133 int aw_dev_i2c_read_byte(struct aw_device *aw_dev,
135 int aw_dev_i2c_read_msg(struct aw_device *aw_dev,
137 int aw_dev_i2c_write_bits(struct aw_device *aw_dev,
139 void aw_dev_soft_reset(struct aw_device *aw_dev);
140 void aw_dev_hw_pwr_ctrl(struct aw_device *aw_dev, bool enable);
141 int aw_dev_default_profile_check(struct aw_device *aw_dev,
143 int aw_dev_default_pwr_on(struct aw_device *aw_dev,
[all …]
H A Daw87xxx.c91 struct aw_device *aw_dev = &aw87xxx->aw_dev; in aw87xxx_update_off_prof() local
111 if (aw_dev->hwen_status == AW_DEV_HWEN_OFF) { in aw87xxx_update_off_prof()
114 if (aw_dev->ops.pwr_off_func) { in aw87xxx_update_off_prof()
115 ret = aw_dev->ops.pwr_off_func(aw_dev, data_container); in aw87xxx_update_off_prof()
121 ret = aw_dev_default_pwr_off(aw_dev, data_container); in aw87xxx_update_off_prof()
136 aw_dev_hw_pwr_ctrl(&aw87xxx->aw_dev, false); in aw87xxx_update_off_prof()
148 struct aw_device *aw_dev = &aw87xxx->aw_dev; in aw87xxx_update_profile() local
181 if (aw_dev->ops.pwr_on_func) { in aw87xxx_update_profile()
182 ret = aw_dev->ops.pwr_on_func(aw_dev, data_container); in aw87xxx_update_profile()
190 ret = aw_dev_default_pwr_on(aw_dev, data_container); in aw87xxx_update_profile()
[all …]
H A Daw_acf_bin.c552 uint8_t soft_off_enable = acf_info->aw_dev->soft_off_enable; in aw_parse_dev_type_v_0_0_0_1()
560 if ((acf_info->aw_dev->i2c_bus == acf_dde[i].dev_bus) && in aw_parse_dev_type_v_0_0_0_1()
561 (acf_info->aw_dev->i2c_addr == acf_dde[i].dev_addr) && in aw_parse_dev_type_v_0_0_0_1()
605 uint8_t soft_off_enable = acf_info->aw_dev->soft_off_enable; in aw_parse_default_type_v_0_0_0_1()
657 uint8_t soft_off_enable = acf_info->aw_dev->soft_off_enable; in aw_get_prof_count_v_0_0_0_1()
686 uint8_t soft_off_enable = acf_info->aw_dev->soft_off_enable; in aw_set_prof_off_info_v_0_0_0_1()
891 uint8_t soft_off_enable = acf_info->aw_dev->soft_off_enable; in aw_parse_get_dev_type_prof_count_v_1_0_0_0()
903 ((acf_info->aw_dev->i2c_bus == acf_dde[i].dev_bus) && in aw_parse_get_dev_type_prof_count_v_1_0_0_0()
904 (acf_info->aw_dev->i2c_addr == acf_dde[i].dev_addr)) && in aw_parse_get_dev_type_prof_count_v_1_0_0_0()
905 (acf_info->aw_dev->chipid == acf_dde[i].chip_id)) { in aw_parse_get_dev_type_prof_count_v_1_0_0_0()
[all …]
H A Daw_acf_bin.h170 struct aw_device *aw_dev; member
192 void aw_acf_init(struct aw_device *aw_dev, struct acf_bin_info *acf_info, int index);
H A Daw87xxx.h106 struct aw_device aw_dev; member
H A Daw_monitor.c511 ret = aw_dev_esd_reg_status_check(&aw87xxx->aw_dev); in aw_monitor_chip_esd_check_work()
626 if (monitor_hdr->monitor_switch && !(aw87xxx->aw_dev.is_rec_mode) && in aw_monitor_work_func()
633 !(aw87xxx->aw_dev.is_rec_mode) && monitor->open_dsp_en && in aw_monitor_work_func()
655 ret = aw_dev_check_reg_is_rec_mode(&aw87xxx->aw_dev); in aw_monitor_start()
662 !(aw87xxx->aw_dev.is_rec_mode) && monitor->open_dsp_en in aw_monitor_start()