/openbmc/linux/sound/soc/codecs/aw88395/ |
H A D | aw88395_device.c | 17 static int aw_dev_dsp_write_16bit(struct aw_device *aw_dev, in aw_dev_dsp_write_16bit() argument 22 ret = regmap_write(aw_dev->regmap, AW88395_DSPMADD_REG, dsp_addr); in aw_dev_dsp_write_16bit() 24 dev_err(aw_dev->dev, "%s write addr error, ret=%d", __func__, ret); in aw_dev_dsp_write_16bit() 28 ret = regmap_write(aw_dev->regmap, AW88395_DSPMDAT_REG, (u16)dsp_data); in aw_dev_dsp_write_16bit() 30 dev_err(aw_dev->dev, "%s write data error, ret=%d", __func__, ret); in aw_dev_dsp_write_16bit() 37 static int aw_dev_dsp_write_32bit(struct aw_device *aw_dev, in aw_dev_dsp_write_32bit() argument 43 ret = regmap_write(aw_dev->regmap, AW88395_DSPMADD_REG, dsp_addr); in aw_dev_dsp_write_32bit() 45 dev_err(aw_dev->dev, "%s write addr error, ret=%d", __func__, ret); in aw_dev_dsp_write_32bit() 50 ret = regmap_write(aw_dev->regmap, AW88395_DSPMDAT_REG, (u16)temp_data); in aw_dev_dsp_write_32bit() 52 dev_err(aw_dev->dev, "%s write datal error, ret=%d", __func__, ret); in aw_dev_dsp_write_32bit() [all …]
|
H A D | aw88395_lib.c | 25 static int aw_parse_bin_header(struct aw_device *aw_dev, struct aw_bin *bin); 27 static int aw_check_sum(struct aw_device *aw_dev, struct aw_bin *bin, int bin_num) in aw_check_sum() argument 42 dev_dbg(aw_dev->dev, "%s -- check_sum = %p, check_sum = 0x%x, sum_data = 0x%x", in aw_check_sum() 45 dev_err(aw_dev->dev, "%s. CheckSum Fail.bin_num=%d, CheckSum:0x%x, SumData:0x%x", in aw_check_sum() 53 static int aw_check_data_version(struct aw_device *aw_dev, struct aw_bin *bin, int bin_num) in aw_check_data_version() argument 57 dev_err(aw_dev->dev, "aw_bin_parse Unrecognized this bin data version\n"); in aw_check_data_version() 64 static int aw_check_register_num(struct aw_device *aw_dev, struct aw_bin *bin, int bin_num) in aw_check_register_num() argument 76 dev_dbg(aw_dev->dev, "%s,parse_register_num = 0x%x,check_register_num = 0x%x\n", in aw_check_register_num() 79 dev_err(aw_dev->dev, "%s parse_register_num = 0x%x,check_register_num = 0x%x\n", in aw_check_register_num() 91 static int aw_check_dsp_reg_num(struct aw_device *aw_dev, struct aw_bin *bin, int bin_num) in aw_check_dsp_reg_num() argument [all …]
|
H A D | aw88395_device.h | 177 int aw88395_init(struct aw_device **aw_dev, struct i2c_client *i2c, struct regmap *regmap); 178 int aw88395_dev_init(struct aw_device *aw_dev, struct aw_container *aw_cfg); 179 int aw88395_dev_start(struct aw_device *aw_dev); 180 int aw88395_dev_stop(struct aw_device *aw_dev); 181 int aw88395_dev_fw_update(struct aw_device *aw_dev, bool up_dsp_fw_en, bool force_up_en); 183 void aw88395_dev_set_volume(struct aw_device *aw_dev, unsigned short set_vol); 184 int aw88395_dev_get_prof_data(struct aw_device *aw_dev, int index, 186 char *aw88395_dev_get_prof_name(struct aw_device *aw_dev, int index); 187 int aw88395_dev_set_profile_index(struct aw_device *aw_dev, int index); 188 int aw88395_dev_get_profile_index(struct aw_device *aw_dev); [all …]
|
H A D | aw88395.c | 109 struct aw_device *aw_dev = aw88395->aw_pa; in aw88395_get_fade_in_time() local 111 ucontrol->value.integer.value[0] = aw_dev->fade_in_time; in aw88395_get_fade_in_time() 123 struct aw_device *aw_dev = aw88395->aw_pa; in aw88395_set_fade_in_time() local 131 if (time != aw_dev->fade_in_time) { in aw88395_set_fade_in_time() 132 aw_dev->fade_in_time = time; in aw88395_set_fade_in_time() 144 struct aw_device *aw_dev = aw88395->aw_pa; in aw88395_get_fade_out_time() local 146 ucontrol->value.integer.value[0] = aw_dev->fade_out_time; in aw88395_get_fade_out_time() 158 struct aw_device *aw_dev = aw88395->aw_pa; in aw88395_set_fade_out_time() local 165 if (time != aw_dev->fade_out_time) { in aw88395_set_fade_out_time() 166 aw_dev->fade_out_time = time; in aw88395_set_fade_out_time() [all …]
|
/openbmc/linux/sound/soc/codecs/ |
H A D | aw88261.c | 28 static void aw88261_dev_set_volume(struct aw_device *aw_dev, unsigned int value) in aw88261_dev_set_volume() argument 30 struct aw_volume_desc *vol_desc = &aw_dev->volume_desc; in aw88261_dev_set_volume() 37 regmap_read(aw_dev->regmap, AW88261_SYSCTRL2_REG, ®_value); in aw88261_dev_set_volume() 41 dev_dbg(aw_dev->dev, "value 0x%x , real_value:0x%x", value, real_value); in aw88261_dev_set_volume() 43 regmap_write(aw_dev->regmap, AW88261_SYSCTRL2_REG, real_value); in aw88261_dev_set_volume() 46 static void aw88261_dev_fade_in(struct aw_device *aw_dev) in aw88261_dev_fade_in() argument 48 struct aw_volume_desc *desc = &aw_dev->volume_desc; in aw88261_dev_fade_in() 50 int fade_step = aw_dev->fade_step; in aw88261_dev_fade_in() 53 if (fade_step == 0 || aw_dev->fade_in_time == 0) { in aw88261_dev_fade_in() 54 aw88261_dev_set_volume(aw_dev, fade_in_vol); in aw88261_dev_fade_in() [all …]
|