Merge "ASoC: msm: qdsp6v2: Add initialization and range check in q6afe"
This commit is contained in:
commit
8f808604e1
1 changed files with 6 additions and 0 deletions
|
@ -1221,6 +1221,7 @@ static int afe_send_hw_delay(u16 port_id, u32 rate)
|
|||
|
||||
pr_debug("%s:\n", __func__);
|
||||
|
||||
memset(&delay_entry, 0, sizeof(delay_entry));
|
||||
delay_entry.sample_rate = rate;
|
||||
if (afe_get_port_type(port_id) == MSM_AFE_PORT_TYPE_TX)
|
||||
ret = afe_get_cal_hw_delay(TX_DEVICE, &delay_entry);
|
||||
|
@ -2807,6 +2808,11 @@ static int q6afe_send_enc_config(u16 port_id,
|
|||
}
|
||||
memset(&config, 0, sizeof(config));
|
||||
index = q6audio_get_port_index(port_id);
|
||||
if (index < 0) {
|
||||
pr_err("%s: Invalid index number: %d\n", __func__, index);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
config.hdr.hdr_field = APR_HDR_FIELD(APR_MSG_TYPE_SEQ_CMD,
|
||||
APR_HDR_LEN(APR_HDR_SIZE), APR_PKT_VER);
|
||||
config.hdr.pkt_size = sizeof(config);
|
||||
|
|
Loading…
Add table
Reference in a new issue