Loading include/sound/q6adm-v2.h +3 −3 Original line number Diff line number Diff line Loading @@ -58,9 +58,9 @@ enum { struct route_payload { unsigned int copp_idx[MAX_COPPS_PER_PORT]; unsigned int port_id[MAX_COPPS_PER_PORT]; int app_type; int acdb_dev_id; int sample_rate; int app_type[MAX_COPPS_PER_PORT]; int acdb_dev_id[MAX_COPPS_PER_PORT]; int sample_rate[MAX_COPPS_PER_PORT]; unsigned short num_copps; unsigned int session_id; }; Loading include/sound/q6afe-v2.h +3 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,8 @@ #define AFE_CLK_VERSION_V1 1 #define AFE_CLK_VERSION_V2 2 typedef int (*routing_cb)(int port); enum { /* IDX 0->4 */ IDX_PRIMARY_I2S_RX, Loading Loading @@ -363,4 +365,5 @@ int afe_send_custom_tdm_header_cfg( u16 port_id); int afe_tdm_port_start(u16 port_id, struct afe_tdm_port_config *tdm_port, u32 rate); void afe_set_routing_callback(routing_cb cb); #endif /* __Q6AFE_V2_H__ */ sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c +42 −48 Original line number Diff line number Diff line Loading @@ -3231,48 +3231,45 @@ static int msm_compr_playback_app_type_cfg_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_RX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate = 48000; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s Received out of bounds fe_id %llu\n", __func__, fe_id); return -EINVAL; } app_type = ucontrol->value.integer.value[0]; acdb_dev_id = ucontrol->value.integer.value[1]; if (ucontrol->value.integer.value[2] != 0) sample_rate = ucontrol->value.integer.value[2]; pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d session_type- %d\n", __func__, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_RX); msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_RX); pr_debug("%s: fe_id- %llu session_type- %d be_id- %d app_type- %d acdb_dev_id- %d sample_rate- %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); ret = msm_pcm_routing_reg_stream_app_type_cfg(fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); if (ret < 0) pr_err("%s: msm_pcm_routing_reg_stream_app_type_cfg failed returned %d\n", __func__, ret); return 0; return ret; } static int msm_compr_playback_app_type_cfg_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_RX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s Received out of bounds fe_id %llu\n", __func__, fe_id); ret = -EINVAL; goto done; } ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, SESSION_TYPE_RX, &app_type, &acdb_dev_id, &sample_rate); ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, session_type, be_id, &app_type, &acdb_dev_id, &sample_rate); if (ret < 0) { pr_err("%s: msm_pcm_routing_get_stream_app_type_cfg failed returned %d\n", __func__, ret); Loading @@ -3282,8 +3279,8 @@ static int msm_compr_playback_app_type_cfg_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = app_type; ucontrol->value.integer.value[1] = acdb_dev_id; ucontrol->value.integer.value[2] = sample_rate; pr_debug("%s: fedai_id %llu, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, SESSION_TYPE_RX, pr_debug("%s: fedai_id %llu, session_type %d, be_id %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); done: return ret; Loading @@ -3293,48 +3290,45 @@ static int msm_compr_capture_app_type_cfg_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_TX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate = 48000; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s Received out of bounds fe_id %llu\n", __func__, fe_id); return -EINVAL; } app_type = ucontrol->value.integer.value[0]; acdb_dev_id = ucontrol->value.integer.value[1]; if (ucontrol->value.integer.value[2] != 0) sample_rate = ucontrol->value.integer.value[2]; pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d session_type- %d\n", __func__, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); pr_debug("%s: fe_id- %llu session_type- %d be_id- %d app_type- %d acdb_dev_id- %d sample_rate- %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); ret = msm_pcm_routing_reg_stream_app_type_cfg(fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); if (ret < 0) pr_err("%s: msm_pcm_routing_reg_stream_app_type_cfg failed returned %d\n", __func__, ret); return 0; return ret; } static int msm_compr_capture_app_type_cfg_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_TX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s Received out of bounds fe_id %llu\n", __func__, fe_id); ret = -EINVAL; goto done; } ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, SESSION_TYPE_TX, &app_type, &acdb_dev_id, &sample_rate); ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, session_type, be_id, &app_type, &acdb_dev_id, &sample_rate); if (ret < 0) { pr_err("%s: msm_pcm_routing_get_stream_app_type_cfg failed returned %d\n", __func__, ret); Loading @@ -3344,8 +3338,8 @@ static int msm_compr_capture_app_type_cfg_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = app_type; ucontrol->value.integer.value[1] = acdb_dev_id; ucontrol->value.integer.value[2] = sample_rate; pr_debug("%s: fedai_id %llu, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, SESSION_TYPE_TX, pr_debug("%s: fedai_id %llu, session_type %d, be_id %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); done: return ret; Loading sound/soc/msm/qdsp6v2/msm-lsm-client.c +20 −24 Original line number Diff line number Diff line Loading @@ -2199,26 +2199,26 @@ static int msm_lsm_app_type_cfg_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_TX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if ((fe_id < MSM_FRONTEND_DAI_LSM1) || (fe_id > MSM_FRONTEND_DAI_LSM8)) { pr_err("%s: Received out of bounds fe_id %llu\n", __func__, fe_id); return -EINVAL; } app_type = ucontrol->value.integer.value[0]; acdb_dev_id = ucontrol->value.integer.value[1]; sample_rate = ucontrol->value.integer.value[2]; pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d session_type- %d\n", __func__, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); pr_debug("%s: fe_id- %llu session_type- %d be_id- %d app_type- %d acdb_dev_id- %d sample_rate- %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); ret = msm_pcm_routing_reg_stream_app_type_cfg(fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); if (ret < 0) pr_err("%s: msm_pcm_routing_reg_stream_app_type_cfg failed returned %d\n", __func__, ret); return 0; } Loading @@ -2227,21 +2227,17 @@ static int msm_lsm_app_type_cfg_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_TX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if ((fe_id < MSM_FRONTEND_DAI_LSM1) || (fe_id > MSM_FRONTEND_DAI_LSM8)) { pr_err("%s: Received out of bounds fe_id %llu\n", __func__, fe_id); return -EINVAL; } ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, SESSION_TYPE_TX, &app_type, &acdb_dev_id, &sample_rate); ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, session_type, be_id, &app_type, &acdb_dev_id, &sample_rate); if (ret < 0) { pr_err("%s: msm_pcm_routing_get_stream_app_type_cfg failed returned %d\n", __func__, ret); Loading @@ -2251,8 +2247,8 @@ static int msm_lsm_app_type_cfg_ctl_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = app_type; ucontrol->value.integer.value[1] = acdb_dev_id; ucontrol->value.integer.value[2] = sample_rate; pr_debug("%s: fedai_id %llu, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, SESSION_TYPE_TX, pr_debug("%s: fedai_id %llu, session_type %d, be_id %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); done: return ret; Loading sound/soc/msm/qdsp6v2/msm-pcm-loopback-v2.c +42 −48 Original line number Diff line number Diff line Loading @@ -557,48 +557,45 @@ static int msm_pcm_playback_app_type_cfg_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_RX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate = 48000; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s: Received out of bounds fe_id %llu\n", __func__, fe_id); return -EINVAL; } app_type = ucontrol->value.integer.value[0]; acdb_dev_id = ucontrol->value.integer.value[1]; if (ucontrol->value.integer.value[2] != 0) sample_rate = ucontrol->value.integer.value[2]; pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d session_type- %d\n", __func__, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_RX); msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_RX); pr_debug("%s: fe_id- %llu session_type- %d be_id- %d app_type- %d acdb_dev_id- %d sample_rate- %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); ret = msm_pcm_routing_reg_stream_app_type_cfg(fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); if (ret < 0) pr_err("%s: msm_pcm_routing_reg_stream_app_type_cfg failed returned %d\n", __func__, ret); return 0; return ret; } static int msm_pcm_playback_app_type_cfg_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_RX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s: Received out of bounds fe_id %llu\n", __func__, fe_id); ret = -EINVAL; goto done; } ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, SESSION_TYPE_RX, &app_type, &acdb_dev_id, &sample_rate); ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, session_type, be_id, &app_type, &acdb_dev_id, &sample_rate); if (ret < 0) { pr_err("%s: msm_pcm_routing_get_stream_app_type_cfg failed returned %d\n", __func__, ret); Loading @@ -608,8 +605,8 @@ static int msm_pcm_playback_app_type_cfg_ctl_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = app_type; ucontrol->value.integer.value[1] = acdb_dev_id; ucontrol->value.integer.value[2] = sample_rate; pr_debug("%s: fedai_id %llu, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, SESSION_TYPE_RX, pr_debug("%s: fedai_id %llu, session_type %d, be_id %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); done: return ret; Loading @@ -619,48 +616,45 @@ static int msm_pcm_capture_app_type_cfg_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_TX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate = 48000; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s: Received out of bounds fe_id %llu\n", __func__, fe_id); return -EINVAL; } app_type = ucontrol->value.integer.value[0]; acdb_dev_id = ucontrol->value.integer.value[1]; if (ucontrol->value.integer.value[2] != 0) sample_rate = ucontrol->value.integer.value[2]; pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d session_type- %d\n", __func__, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); pr_debug("%s: fe_id- %llu session_type- %d be_id- %d app_type- %d acdb_dev_id- %d sample_rate- %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); ret = msm_pcm_routing_reg_stream_app_type_cfg(fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); if (ret < 0) pr_err("%s: msm_pcm_routing_reg_stream_app_type_cfg failed returned %d\n", __func__, ret); return 0; return ret; } static int msm_pcm_capture_app_type_cfg_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_TX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s: Received out of bounds fe_id %llu\n", __func__, fe_id); ret = -EINVAL; goto done; } ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, SESSION_TYPE_TX, &app_type, &acdb_dev_id, &sample_rate); ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, session_type, be_id, &app_type, &acdb_dev_id, &sample_rate); if (ret < 0) { pr_err("%s: msm_pcm_routing_get_stream_app_type_cfg failed returned %d\n", __func__, ret); Loading @@ -670,8 +664,8 @@ static int msm_pcm_capture_app_type_cfg_ctl_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = app_type; ucontrol->value.integer.value[1] = acdb_dev_id; ucontrol->value.integer.value[2] = sample_rate; pr_debug("%s: fedai_id %llu, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, SESSION_TYPE_TX, pr_debug("%s: fedai_id %llu, session_type %d, be_id %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); done: return ret; Loading Loading
include/sound/q6adm-v2.h +3 −3 Original line number Diff line number Diff line Loading @@ -58,9 +58,9 @@ enum { struct route_payload { unsigned int copp_idx[MAX_COPPS_PER_PORT]; unsigned int port_id[MAX_COPPS_PER_PORT]; int app_type; int acdb_dev_id; int sample_rate; int app_type[MAX_COPPS_PER_PORT]; int acdb_dev_id[MAX_COPPS_PER_PORT]; int sample_rate[MAX_COPPS_PER_PORT]; unsigned short num_copps; unsigned int session_id; }; Loading
include/sound/q6afe-v2.h +3 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,8 @@ #define AFE_CLK_VERSION_V1 1 #define AFE_CLK_VERSION_V2 2 typedef int (*routing_cb)(int port); enum { /* IDX 0->4 */ IDX_PRIMARY_I2S_RX, Loading Loading @@ -363,4 +365,5 @@ int afe_send_custom_tdm_header_cfg( u16 port_id); int afe_tdm_port_start(u16 port_id, struct afe_tdm_port_config *tdm_port, u32 rate); void afe_set_routing_callback(routing_cb cb); #endif /* __Q6AFE_V2_H__ */
sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c +42 −48 Original line number Diff line number Diff line Loading @@ -3231,48 +3231,45 @@ static int msm_compr_playback_app_type_cfg_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_RX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate = 48000; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s Received out of bounds fe_id %llu\n", __func__, fe_id); return -EINVAL; } app_type = ucontrol->value.integer.value[0]; acdb_dev_id = ucontrol->value.integer.value[1]; if (ucontrol->value.integer.value[2] != 0) sample_rate = ucontrol->value.integer.value[2]; pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d session_type- %d\n", __func__, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_RX); msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_RX); pr_debug("%s: fe_id- %llu session_type- %d be_id- %d app_type- %d acdb_dev_id- %d sample_rate- %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); ret = msm_pcm_routing_reg_stream_app_type_cfg(fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); if (ret < 0) pr_err("%s: msm_pcm_routing_reg_stream_app_type_cfg failed returned %d\n", __func__, ret); return 0; return ret; } static int msm_compr_playback_app_type_cfg_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_RX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s Received out of bounds fe_id %llu\n", __func__, fe_id); ret = -EINVAL; goto done; } ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, SESSION_TYPE_RX, &app_type, &acdb_dev_id, &sample_rate); ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, session_type, be_id, &app_type, &acdb_dev_id, &sample_rate); if (ret < 0) { pr_err("%s: msm_pcm_routing_get_stream_app_type_cfg failed returned %d\n", __func__, ret); Loading @@ -3282,8 +3279,8 @@ static int msm_compr_playback_app_type_cfg_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = app_type; ucontrol->value.integer.value[1] = acdb_dev_id; ucontrol->value.integer.value[2] = sample_rate; pr_debug("%s: fedai_id %llu, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, SESSION_TYPE_RX, pr_debug("%s: fedai_id %llu, session_type %d, be_id %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); done: return ret; Loading @@ -3293,48 +3290,45 @@ static int msm_compr_capture_app_type_cfg_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_TX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate = 48000; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s Received out of bounds fe_id %llu\n", __func__, fe_id); return -EINVAL; } app_type = ucontrol->value.integer.value[0]; acdb_dev_id = ucontrol->value.integer.value[1]; if (ucontrol->value.integer.value[2] != 0) sample_rate = ucontrol->value.integer.value[2]; pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d session_type- %d\n", __func__, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); pr_debug("%s: fe_id- %llu session_type- %d be_id- %d app_type- %d acdb_dev_id- %d sample_rate- %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); ret = msm_pcm_routing_reg_stream_app_type_cfg(fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); if (ret < 0) pr_err("%s: msm_pcm_routing_reg_stream_app_type_cfg failed returned %d\n", __func__, ret); return 0; return ret; } static int msm_compr_capture_app_type_cfg_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_TX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s Received out of bounds fe_id %llu\n", __func__, fe_id); ret = -EINVAL; goto done; } ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, SESSION_TYPE_TX, &app_type, &acdb_dev_id, &sample_rate); ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, session_type, be_id, &app_type, &acdb_dev_id, &sample_rate); if (ret < 0) { pr_err("%s: msm_pcm_routing_get_stream_app_type_cfg failed returned %d\n", __func__, ret); Loading @@ -3344,8 +3338,8 @@ static int msm_compr_capture_app_type_cfg_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = app_type; ucontrol->value.integer.value[1] = acdb_dev_id; ucontrol->value.integer.value[2] = sample_rate; pr_debug("%s: fedai_id %llu, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, SESSION_TYPE_TX, pr_debug("%s: fedai_id %llu, session_type %d, be_id %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); done: return ret; Loading
sound/soc/msm/qdsp6v2/msm-lsm-client.c +20 −24 Original line number Diff line number Diff line Loading @@ -2199,26 +2199,26 @@ static int msm_lsm_app_type_cfg_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_TX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if ((fe_id < MSM_FRONTEND_DAI_LSM1) || (fe_id > MSM_FRONTEND_DAI_LSM8)) { pr_err("%s: Received out of bounds fe_id %llu\n", __func__, fe_id); return -EINVAL; } app_type = ucontrol->value.integer.value[0]; acdb_dev_id = ucontrol->value.integer.value[1]; sample_rate = ucontrol->value.integer.value[2]; pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d session_type- %d\n", __func__, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); pr_debug("%s: fe_id- %llu session_type- %d be_id- %d app_type- %d acdb_dev_id- %d sample_rate- %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); ret = msm_pcm_routing_reg_stream_app_type_cfg(fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); if (ret < 0) pr_err("%s: msm_pcm_routing_reg_stream_app_type_cfg failed returned %d\n", __func__, ret); return 0; } Loading @@ -2227,21 +2227,17 @@ static int msm_lsm_app_type_cfg_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_TX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if ((fe_id < MSM_FRONTEND_DAI_LSM1) || (fe_id > MSM_FRONTEND_DAI_LSM8)) { pr_err("%s: Received out of bounds fe_id %llu\n", __func__, fe_id); return -EINVAL; } ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, SESSION_TYPE_TX, &app_type, &acdb_dev_id, &sample_rate); ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, session_type, be_id, &app_type, &acdb_dev_id, &sample_rate); if (ret < 0) { pr_err("%s: msm_pcm_routing_get_stream_app_type_cfg failed returned %d\n", __func__, ret); Loading @@ -2251,8 +2247,8 @@ static int msm_lsm_app_type_cfg_ctl_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = app_type; ucontrol->value.integer.value[1] = acdb_dev_id; ucontrol->value.integer.value[2] = sample_rate; pr_debug("%s: fedai_id %llu, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, SESSION_TYPE_TX, pr_debug("%s: fedai_id %llu, session_type %d, be_id %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); done: return ret; Loading
sound/soc/msm/qdsp6v2/msm-pcm-loopback-v2.c +42 −48 Original line number Diff line number Diff line Loading @@ -557,48 +557,45 @@ static int msm_pcm_playback_app_type_cfg_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_RX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate = 48000; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s: Received out of bounds fe_id %llu\n", __func__, fe_id); return -EINVAL; } app_type = ucontrol->value.integer.value[0]; acdb_dev_id = ucontrol->value.integer.value[1]; if (ucontrol->value.integer.value[2] != 0) sample_rate = ucontrol->value.integer.value[2]; pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d session_type- %d\n", __func__, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_RX); msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_RX); pr_debug("%s: fe_id- %llu session_type- %d be_id- %d app_type- %d acdb_dev_id- %d sample_rate- %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); ret = msm_pcm_routing_reg_stream_app_type_cfg(fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); if (ret < 0) pr_err("%s: msm_pcm_routing_reg_stream_app_type_cfg failed returned %d\n", __func__, ret); return 0; return ret; } static int msm_pcm_playback_app_type_cfg_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_RX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s: Received out of bounds fe_id %llu\n", __func__, fe_id); ret = -EINVAL; goto done; } ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, SESSION_TYPE_RX, &app_type, &acdb_dev_id, &sample_rate); ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, session_type, be_id, &app_type, &acdb_dev_id, &sample_rate); if (ret < 0) { pr_err("%s: msm_pcm_routing_get_stream_app_type_cfg failed returned %d\n", __func__, ret); Loading @@ -608,8 +605,8 @@ static int msm_pcm_playback_app_type_cfg_ctl_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = app_type; ucontrol->value.integer.value[1] = acdb_dev_id; ucontrol->value.integer.value[2] = sample_rate; pr_debug("%s: fedai_id %llu, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, SESSION_TYPE_RX, pr_debug("%s: fedai_id %llu, session_type %d, be_id %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); done: return ret; Loading @@ -619,48 +616,45 @@ static int msm_pcm_capture_app_type_cfg_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_TX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate = 48000; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s: Received out of bounds fe_id %llu\n", __func__, fe_id); return -EINVAL; } app_type = ucontrol->value.integer.value[0]; acdb_dev_id = ucontrol->value.integer.value[1]; if (ucontrol->value.integer.value[2] != 0) sample_rate = ucontrol->value.integer.value[2]; pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d session_type- %d\n", __func__, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); pr_debug("%s: fe_id- %llu session_type- %d be_id- %d app_type- %d acdb_dev_id- %d sample_rate- %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); ret = msm_pcm_routing_reg_stream_app_type_cfg(fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); if (ret < 0) pr_err("%s: msm_pcm_routing_reg_stream_app_type_cfg failed returned %d\n", __func__, ret); return 0; return ret; } static int msm_pcm_capture_app_type_cfg_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; int session_type = SESSION_TYPE_TX; int be_id = ucontrol->value.integer.value[3]; int ret = 0; int app_type; int acdb_dev_id; int sample_rate; pr_debug("%s: fe_id- %llu\n", __func__, fe_id); if (fe_id >= MSM_FRONTEND_DAI_MAX) { pr_err("%s: Received out of bounds fe_id %llu\n", __func__, fe_id); ret = -EINVAL; goto done; } ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, SESSION_TYPE_TX, &app_type, &acdb_dev_id, &sample_rate); ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, session_type, be_id, &app_type, &acdb_dev_id, &sample_rate); if (ret < 0) { pr_err("%s: msm_pcm_routing_get_stream_app_type_cfg failed returned %d\n", __func__, ret); Loading @@ -670,8 +664,8 @@ static int msm_pcm_capture_app_type_cfg_ctl_get(struct snd_kcontrol *kcontrol, ucontrol->value.integer.value[0] = app_type; ucontrol->value.integer.value[1] = acdb_dev_id; ucontrol->value.integer.value[2] = sample_rate; pr_debug("%s: fedai_id %llu, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, SESSION_TYPE_TX, pr_debug("%s: fedai_id %llu, session_type %d, be_id %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", __func__, fe_id, session_type, be_id, app_type, acdb_dev_id, sample_rate); done: return ret; Loading