Loading include/sound/q6afe-v2.h +1 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,7 @@ int afe_pseudo_port_start_nowait(u16 port_id); int afe_pseudo_port_stop_nowait(u16 port_id); int afe_set_lpass_clock(u16 port_id, struct afe_clk_cfg *cfg); int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg); int afe_set_lpass_clk_cfg(int index, struct afe_clk_set *cfg); int afe_set_digital_codec_core_clock(u16 port_id, struct afe_digital_clk_cfg *cfg); int afe_set_lpass_internal_digital_codec_clock(u16 port_id, Loading sound/soc/msm/qdsp6v2/q6afe.c +27 −9 Original line number Diff line number Diff line Loading @@ -4150,10 +4150,9 @@ fail_cmd: return ret; } int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) int afe_set_lpass_clk_cfg(int index, struct afe_clk_set *cfg) { struct afe_lpass_clk_config_command_v2 clk_cfg; int index = 0; int ret = 0; if (!cfg) { Loading @@ -4161,11 +4160,9 @@ int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) ret = -EINVAL; return ret; } index = q6audio_get_port_index(port_id); ret = q6audio_is_digital_pcm_interface(port_id); if (ret < 0) { pr_err("%s: q6audio_is_digital_pcm_interface fail %d\n", __func__, ret); if (index < 0 || index >= AFE_MAX_PORTS) { pr_err("%s: index[%d] invalid!\n", __func__, index); return -EINVAL; } Loading Loading @@ -4206,8 +4203,8 @@ int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) atomic_set(&this_afe.status, 0); ret = apr_send_pkt(this_afe.apr, (uint32_t *) &clk_cfg); if (ret < 0) { pr_err("%s: AFE enable for port 0x%x ret %d\n", __func__, port_id, ret); pr_err("%s: AFE clk cfg failed with ret %d\n", __func__, ret); ret = -EINVAL; goto fail_cmd; } Loading @@ -4231,6 +4228,27 @@ fail_cmd: return ret; } int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) { int index = 0; int ret = 0; index = q6audio_get_port_index(port_id); ret = q6audio_is_digital_pcm_interface(port_id); if (ret < 0) { pr_err("%s: q6audio_is_digital_pcm_interface fail %d\n", __func__, ret); return -EINVAL; } ret = afe_set_lpass_clk_cfg(index, cfg); if (ret) pr_err("%s: afe_set_lpass_clk_cfg_v2 failed %d\n", __func__, ret); return ret; } int afe_set_lpass_internal_digital_codec_clock(u16 port_id, struct afe_digital_clk_cfg *cfg) { Loading Loading
include/sound/q6afe-v2.h +1 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,7 @@ int afe_pseudo_port_start_nowait(u16 port_id); int afe_pseudo_port_stop_nowait(u16 port_id); int afe_set_lpass_clock(u16 port_id, struct afe_clk_cfg *cfg); int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg); int afe_set_lpass_clk_cfg(int index, struct afe_clk_set *cfg); int afe_set_digital_codec_core_clock(u16 port_id, struct afe_digital_clk_cfg *cfg); int afe_set_lpass_internal_digital_codec_clock(u16 port_id, Loading
sound/soc/msm/qdsp6v2/q6afe.c +27 −9 Original line number Diff line number Diff line Loading @@ -4150,10 +4150,9 @@ fail_cmd: return ret; } int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) int afe_set_lpass_clk_cfg(int index, struct afe_clk_set *cfg) { struct afe_lpass_clk_config_command_v2 clk_cfg; int index = 0; int ret = 0; if (!cfg) { Loading @@ -4161,11 +4160,9 @@ int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) ret = -EINVAL; return ret; } index = q6audio_get_port_index(port_id); ret = q6audio_is_digital_pcm_interface(port_id); if (ret < 0) { pr_err("%s: q6audio_is_digital_pcm_interface fail %d\n", __func__, ret); if (index < 0 || index >= AFE_MAX_PORTS) { pr_err("%s: index[%d] invalid!\n", __func__, index); return -EINVAL; } Loading Loading @@ -4206,8 +4203,8 @@ int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) atomic_set(&this_afe.status, 0); ret = apr_send_pkt(this_afe.apr, (uint32_t *) &clk_cfg); if (ret < 0) { pr_err("%s: AFE enable for port 0x%x ret %d\n", __func__, port_id, ret); pr_err("%s: AFE clk cfg failed with ret %d\n", __func__, ret); ret = -EINVAL; goto fail_cmd; } Loading @@ -4231,6 +4228,27 @@ fail_cmd: return ret; } int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg) { int index = 0; int ret = 0; index = q6audio_get_port_index(port_id); ret = q6audio_is_digital_pcm_interface(port_id); if (ret < 0) { pr_err("%s: q6audio_is_digital_pcm_interface fail %d\n", __func__, ret); return -EINVAL; } ret = afe_set_lpass_clk_cfg(index, cfg); if (ret) pr_err("%s: afe_set_lpass_clk_cfg_v2 failed %d\n", __func__, ret); return ret; } int afe_set_lpass_internal_digital_codec_clock(u16 port_id, struct afe_digital_clk_cfg *cfg) { Loading