Loading asoc/codecs/bolero/tx-macro.c +0 −6 Original line number Diff line number Diff line Loading @@ -496,8 +496,6 @@ static void tx_macro_tx_hpf_corner_freq_callback(struct work_struct *work) hpf_cut_off_freq << 5); snd_soc_component_update_bits(component, hpf_gate_reg, 0x03, 0x02); /* Minimum 1 clk cycle delay is required as per HW spec */ usleep_range(1000, 1010); snd_soc_component_update_bits(component, hpf_gate_reg, 0x03, 0x01); } else { Loading Loading @@ -993,10 +991,6 @@ static int tx_macro_enable_dec(struct snd_soc_dapm_widget *w, if (!is_amic_enabled(component, decimator)) snd_soc_component_update_bits(component, hpf_gate_reg, 0x03, 0x00); /* * Minimum 1 clk cycle delay is required as per HW spec */ usleep_range(1000, 1010); snd_soc_component_update_bits(component, hpf_gate_reg, 0x03, 0x01); /* Loading asoc/codecs/wcd938x/wcd938x.c +10 −10 Original line number Diff line number Diff line Loading @@ -777,7 +777,7 @@ static int wcd938x_codec_enable_hphr_pa(struct snd_soc_dapm_widget *w, usleep_range(100, 110); set_bit(HPH_PA_DELAY, &wcd938x->status_mask); snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL1, 0x17, 0x13); WCD938X_DIGITAL_PDM_WD_CTL1, 0x07, 0x03); break; case SND_SOC_DAPM_POST_PMU: /* Loading Loading @@ -857,7 +857,7 @@ static int wcd938x_codec_enable_hphr_pa(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, WCD938X_ANA_HPH, 0x10, 0x00); snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL1, 0x17, 0x00); WCD938X_DIGITAL_PDM_WD_CTL1, 0x07, 0x00); wcd_cls_h_fsm(component, &wcd938x->clsh_info, WCD_CLSH_EVENT_POST_PA, WCD_CLSH_STATE_HPHR, Loading Loading @@ -913,7 +913,7 @@ static int wcd938x_codec_enable_hphl_pa(struct snd_soc_dapm_widget *w, usleep_range(100, 110); set_bit(HPH_PA_DELAY, &wcd938x->status_mask); snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL0, 0x17, 0x13); WCD938X_DIGITAL_PDM_WD_CTL0, 0x07, 0x03); break; case SND_SOC_DAPM_POST_PMU: /* Loading Loading @@ -993,7 +993,7 @@ static int wcd938x_codec_enable_hphl_pa(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, WCD938X_ANA_HPH, 0x20, 0x00); snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL0, 0x17, 0x00); WCD938X_DIGITAL_PDM_WD_CTL0, 0x07, 0x00); wcd_cls_h_fsm(component, &wcd938x->clsh_info, WCD_CLSH_EVENT_POST_PA, WCD_CLSH_STATE_HPHL, Loading Loading @@ -1026,7 +1026,7 @@ static int wcd938x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w, wcd938x->rx_swr_dev->dev_num, true); snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL2, 0x05, 0x05); WCD938X_DIGITAL_PDM_WD_CTL2, 0x01, 0x01); break; case SND_SOC_DAPM_POST_PMU: /* 1 msec delay as per HW requirement */ Loading Loading @@ -1054,7 +1054,7 @@ static int wcd938x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w, /* 1 msec delay as per HW requirement */ usleep_range(1000, 1010); snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL2, 0x05, 0x00); WCD938X_DIGITAL_PDM_WD_CTL2, 0x01, 0x00); wcd_cls_h_fsm(component, &wcd938x->clsh_info, WCD_CLSH_EVENT_POST_PA, WCD_CLSH_STATE_AUX, Loading Loading @@ -1098,11 +1098,11 @@ static int wcd938x_codec_enable_ear_pa(struct snd_soc_dapm_widget *w, if (wcd938x->ear_rx_path & EAR_RX_PATH_AUX) snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL2, 0x05, 0x05); 0x01, 0x01); else snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL0, 0x17, 0x13); 0x07, 0x03); if (!wcd938x->comp1_enable) snd_soc_component_update_bits(component, WCD938X_ANA_EAR_COMPANDER_CTL, 0x80, 0x80); Loading Loading @@ -1157,11 +1157,11 @@ static int wcd938x_codec_enable_ear_pa(struct snd_soc_dapm_widget *w, if (wcd938x->ear_rx_path & EAR_RX_PATH_AUX) snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL2, 0x05, 0x00); 0x01, 0x00); else snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL0, 0x17, 0x00); 0x07, 0x00); wcd_cls_h_fsm(component, &wcd938x->clsh_info, WCD_CLSH_EVENT_POST_PA, WCD_CLSH_STATE_EAR, Loading asoc/codecs/wsa883x/wsa883x.c +6 −1 Original line number Diff line number Diff line Loading @@ -238,8 +238,13 @@ static ssize_t swr_slave_reg_show(struct swr_device *pdev, char __user *ubuf, if (!is_swr_slave_reg_readable(i)) continue; swr_read(pdev, pdev->dev_num, i, ®_val, 1); len = snprintf(tmp_buf, 25, "0x%.3x: 0x%.2x\n", i, len = snprintf(tmp_buf, sizeof(tmp_buf), "0x%.3x: 0x%.2x\n", i, (reg_val & 0xFF)); if (len < 0) { pr_err("%s: fail to fill the buffer\n", __func__); total = -EFAULT; goto copy_err; } if ((total + len) >= count - 1) break; if (copy_to_user((ubuf + total), tmp_buf, len)) { Loading asoc/kona.c +23 −8 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include "asoc/wcd-mbhc-v2.h" #include "codecs/wcd938x/wcd938x-mbhc.h" #include "codecs/wsa881x.h" #include "codecs/wsa883x/wsa883x.h" #include "codecs/wcd938x/wcd938x.h" #include "codecs/bolero/bolero-cdc.h" #include <dt-bindings/sound/audio-codec-port-types.h> Loading Loading @@ -7570,6 +7571,11 @@ static int msm_wsa881x_init(struct snd_soc_component *component) if (!strcmp(component->name_prefix, "SpkrLeft")) { dev_dbg(component->dev, "%s: setting left ch map to codec %s\n", __func__, component->name); if (strnstr(component->name, "wsa883x", sizeof(component->name))) wsa883x_set_channel_map(component, &spkleft_ports[0], WSA881X_MAX_SWR_PORTS, &ch_mask[0], &ch_rate[0], &spkleft_port_types[0]); else wsa881x_set_channel_map(component, &spkleft_ports[0], WSA881X_MAX_SWR_PORTS, &ch_mask[0], &ch_rate[0], &spkleft_port_types[0]); Loading @@ -7580,6 +7586,11 @@ static int msm_wsa881x_init(struct snd_soc_component *component) } else if (!strcmp(component->name_prefix, "SpkrRight")) { dev_dbg(component->dev, "%s: setting right ch map to codec %s\n", __func__, component->name); if (strnstr(component->name, "wsa883x", sizeof(component->name))) wsa883x_set_channel_map(component, &spkright_ports[0], WSA881X_MAX_SWR_PORTS, &ch_mask[0], &ch_rate[0], &spkright_port_types[0]); else wsa881x_set_channel_map(component, &spkright_ports[0], WSA881X_MAX_SWR_PORTS, &ch_mask[0], &ch_rate[0], &spkright_port_types[0]); Loading @@ -7605,6 +7616,10 @@ static int msm_wsa881x_init(struct snd_soc_component *component) } pdata->codec_root = entry; } if (strnstr(component->name, "wsa883x", sizeof(component->name))) wsa883x_codec_info_create_codec_entry(pdata->codec_root, component); else wsa881x_codec_info_create_codec_entry(pdata->codec_root, component); err: Loading include/uapi/linux/msm_audio_calibration.h +2 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ enum { ADM_LSM_TOPOLOGY_CAL_TYPE, ADM_LSM_AUDPROC_CAL_TYPE, ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE, ADM_AUDPROC_PERSISTENT_CAL_TYPE, MAX_CAL_TYPES, }; Loading @@ -117,6 +118,7 @@ enum { #define ADM_LSM_TOPOLOGY_CAL_TYPE ADM_LSM_TOPOLOGY_CAL_TYPE #define ADM_LSM_AUDPROC_CAL_TYPE ADM_LSM_AUDPROC_CAL_TYPE #define ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE #define ADM_AUDPROC_PERSISTENT_CAL_TYPE ADM_AUDPROC_PERSISTENT_CAL_TYPE #define LSM_CAL_TYPES #define TOPOLOGY_SPECIFIC_CHANNEL_INFO Loading Loading
asoc/codecs/bolero/tx-macro.c +0 −6 Original line number Diff line number Diff line Loading @@ -496,8 +496,6 @@ static void tx_macro_tx_hpf_corner_freq_callback(struct work_struct *work) hpf_cut_off_freq << 5); snd_soc_component_update_bits(component, hpf_gate_reg, 0x03, 0x02); /* Minimum 1 clk cycle delay is required as per HW spec */ usleep_range(1000, 1010); snd_soc_component_update_bits(component, hpf_gate_reg, 0x03, 0x01); } else { Loading Loading @@ -993,10 +991,6 @@ static int tx_macro_enable_dec(struct snd_soc_dapm_widget *w, if (!is_amic_enabled(component, decimator)) snd_soc_component_update_bits(component, hpf_gate_reg, 0x03, 0x00); /* * Minimum 1 clk cycle delay is required as per HW spec */ usleep_range(1000, 1010); snd_soc_component_update_bits(component, hpf_gate_reg, 0x03, 0x01); /* Loading
asoc/codecs/wcd938x/wcd938x.c +10 −10 Original line number Diff line number Diff line Loading @@ -777,7 +777,7 @@ static int wcd938x_codec_enable_hphr_pa(struct snd_soc_dapm_widget *w, usleep_range(100, 110); set_bit(HPH_PA_DELAY, &wcd938x->status_mask); snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL1, 0x17, 0x13); WCD938X_DIGITAL_PDM_WD_CTL1, 0x07, 0x03); break; case SND_SOC_DAPM_POST_PMU: /* Loading Loading @@ -857,7 +857,7 @@ static int wcd938x_codec_enable_hphr_pa(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, WCD938X_ANA_HPH, 0x10, 0x00); snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL1, 0x17, 0x00); WCD938X_DIGITAL_PDM_WD_CTL1, 0x07, 0x00); wcd_cls_h_fsm(component, &wcd938x->clsh_info, WCD_CLSH_EVENT_POST_PA, WCD_CLSH_STATE_HPHR, Loading Loading @@ -913,7 +913,7 @@ static int wcd938x_codec_enable_hphl_pa(struct snd_soc_dapm_widget *w, usleep_range(100, 110); set_bit(HPH_PA_DELAY, &wcd938x->status_mask); snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL0, 0x17, 0x13); WCD938X_DIGITAL_PDM_WD_CTL0, 0x07, 0x03); break; case SND_SOC_DAPM_POST_PMU: /* Loading Loading @@ -993,7 +993,7 @@ static int wcd938x_codec_enable_hphl_pa(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, WCD938X_ANA_HPH, 0x20, 0x00); snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL0, 0x17, 0x00); WCD938X_DIGITAL_PDM_WD_CTL0, 0x07, 0x00); wcd_cls_h_fsm(component, &wcd938x->clsh_info, WCD_CLSH_EVENT_POST_PA, WCD_CLSH_STATE_HPHL, Loading Loading @@ -1026,7 +1026,7 @@ static int wcd938x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w, wcd938x->rx_swr_dev->dev_num, true); snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL2, 0x05, 0x05); WCD938X_DIGITAL_PDM_WD_CTL2, 0x01, 0x01); break; case SND_SOC_DAPM_POST_PMU: /* 1 msec delay as per HW requirement */ Loading Loading @@ -1054,7 +1054,7 @@ static int wcd938x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w, /* 1 msec delay as per HW requirement */ usleep_range(1000, 1010); snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL2, 0x05, 0x00); WCD938X_DIGITAL_PDM_WD_CTL2, 0x01, 0x00); wcd_cls_h_fsm(component, &wcd938x->clsh_info, WCD_CLSH_EVENT_POST_PA, WCD_CLSH_STATE_AUX, Loading Loading @@ -1098,11 +1098,11 @@ static int wcd938x_codec_enable_ear_pa(struct snd_soc_dapm_widget *w, if (wcd938x->ear_rx_path & EAR_RX_PATH_AUX) snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL2, 0x05, 0x05); 0x01, 0x01); else snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL0, 0x17, 0x13); 0x07, 0x03); if (!wcd938x->comp1_enable) snd_soc_component_update_bits(component, WCD938X_ANA_EAR_COMPANDER_CTL, 0x80, 0x80); Loading Loading @@ -1157,11 +1157,11 @@ static int wcd938x_codec_enable_ear_pa(struct snd_soc_dapm_widget *w, if (wcd938x->ear_rx_path & EAR_RX_PATH_AUX) snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL2, 0x05, 0x00); 0x01, 0x00); else snd_soc_component_update_bits(component, WCD938X_DIGITAL_PDM_WD_CTL0, 0x17, 0x00); 0x07, 0x00); wcd_cls_h_fsm(component, &wcd938x->clsh_info, WCD_CLSH_EVENT_POST_PA, WCD_CLSH_STATE_EAR, Loading
asoc/codecs/wsa883x/wsa883x.c +6 −1 Original line number Diff line number Diff line Loading @@ -238,8 +238,13 @@ static ssize_t swr_slave_reg_show(struct swr_device *pdev, char __user *ubuf, if (!is_swr_slave_reg_readable(i)) continue; swr_read(pdev, pdev->dev_num, i, ®_val, 1); len = snprintf(tmp_buf, 25, "0x%.3x: 0x%.2x\n", i, len = snprintf(tmp_buf, sizeof(tmp_buf), "0x%.3x: 0x%.2x\n", i, (reg_val & 0xFF)); if (len < 0) { pr_err("%s: fail to fill the buffer\n", __func__); total = -EFAULT; goto copy_err; } if ((total + len) >= count - 1) break; if (copy_to_user((ubuf + total), tmp_buf, len)) { Loading
asoc/kona.c +23 −8 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include "asoc/wcd-mbhc-v2.h" #include "codecs/wcd938x/wcd938x-mbhc.h" #include "codecs/wsa881x.h" #include "codecs/wsa883x/wsa883x.h" #include "codecs/wcd938x/wcd938x.h" #include "codecs/bolero/bolero-cdc.h" #include <dt-bindings/sound/audio-codec-port-types.h> Loading Loading @@ -7570,6 +7571,11 @@ static int msm_wsa881x_init(struct snd_soc_component *component) if (!strcmp(component->name_prefix, "SpkrLeft")) { dev_dbg(component->dev, "%s: setting left ch map to codec %s\n", __func__, component->name); if (strnstr(component->name, "wsa883x", sizeof(component->name))) wsa883x_set_channel_map(component, &spkleft_ports[0], WSA881X_MAX_SWR_PORTS, &ch_mask[0], &ch_rate[0], &spkleft_port_types[0]); else wsa881x_set_channel_map(component, &spkleft_ports[0], WSA881X_MAX_SWR_PORTS, &ch_mask[0], &ch_rate[0], &spkleft_port_types[0]); Loading @@ -7580,6 +7586,11 @@ static int msm_wsa881x_init(struct snd_soc_component *component) } else if (!strcmp(component->name_prefix, "SpkrRight")) { dev_dbg(component->dev, "%s: setting right ch map to codec %s\n", __func__, component->name); if (strnstr(component->name, "wsa883x", sizeof(component->name))) wsa883x_set_channel_map(component, &spkright_ports[0], WSA881X_MAX_SWR_PORTS, &ch_mask[0], &ch_rate[0], &spkright_port_types[0]); else wsa881x_set_channel_map(component, &spkright_ports[0], WSA881X_MAX_SWR_PORTS, &ch_mask[0], &ch_rate[0], &spkright_port_types[0]); Loading @@ -7605,6 +7616,10 @@ static int msm_wsa881x_init(struct snd_soc_component *component) } pdata->codec_root = entry; } if (strnstr(component->name, "wsa883x", sizeof(component->name))) wsa883x_codec_info_create_codec_entry(pdata->codec_root, component); else wsa881x_codec_info_create_codec_entry(pdata->codec_root, component); err: Loading
include/uapi/linux/msm_audio_calibration.h +2 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ enum { ADM_LSM_TOPOLOGY_CAL_TYPE, ADM_LSM_AUDPROC_CAL_TYPE, ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE, ADM_AUDPROC_PERSISTENT_CAL_TYPE, MAX_CAL_TYPES, }; Loading @@ -117,6 +118,7 @@ enum { #define ADM_LSM_TOPOLOGY_CAL_TYPE ADM_LSM_TOPOLOGY_CAL_TYPE #define ADM_LSM_AUDPROC_CAL_TYPE ADM_LSM_AUDPROC_CAL_TYPE #define ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE #define ADM_AUDPROC_PERSISTENT_CAL_TYPE ADM_AUDPROC_PERSISTENT_CAL_TYPE #define LSM_CAL_TYPES #define TOPOLOGY_SPECIFIC_CHANNEL_INFO Loading