sound: usb: Update QMI indication message
Following updates required to sync with remote client QMI messaging for audio service:- 1) Add usb core id in disconnect indication to support multi instance of remote client. Update uaudio_disconnect_cb() to send usb core id. 3) Add USB_AUDIO_DEVICE_SPEED_SUPER_PLUS_V01 in to usb device speed enum list. Update get_speed_info() API to reflect the same. Change-Id: I2501c037e519454a4f84ec3c1ab9e423eb771544 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
parent
9c1d883952
commit
97097e7616
3 changed files with 28 additions and 1 deletions
|
@ -81,6 +81,7 @@ struct uaudio_dev {
|
|||
/* audio control interface */
|
||||
struct usb_host_interface *ctrl_intf;
|
||||
unsigned int card_num;
|
||||
unsigned int usb_core_id;
|
||||
atomic_t in_use;
|
||||
struct kref kref;
|
||||
wait_queue_head_t disconnect_wq;
|
||||
|
@ -182,6 +183,8 @@ get_speed_info(enum usb_device_speed udev_speed)
|
|||
return USB_AUDIO_DEVICE_SPEED_HIGH_V01;
|
||||
case USB_SPEED_SUPER:
|
||||
return USB_AUDIO_DEVICE_SPEED_SUPER_V01;
|
||||
case USB_SPEED_SUPER_PLUS:
|
||||
return USB_AUDIO_DEVICE_SPEED_SUPER_PLUS_V01;
|
||||
default:
|
||||
pr_err("%s: udev speed %d\n", __func__, udev_speed);
|
||||
return USB_AUDIO_DEVICE_SPEED_INVALID_V01;
|
||||
|
@ -675,6 +678,7 @@ skip_sync:
|
|||
}
|
||||
|
||||
uadev[card_num].card_num = card_num;
|
||||
uadev[card_num].usb_core_id = resp->controller_num;
|
||||
|
||||
/* cache intf specific info to use it for unmap and free xfer buf */
|
||||
uadev[card_num].info[info_idx].data_xfer_ring_va = tr_data_va;
|
||||
|
@ -795,6 +799,8 @@ static void uaudio_disconnect_cb(struct snd_usb_audio *chip)
|
|||
pr_debug("%s: sending qmi indication disconnect\n", __func__);
|
||||
disconnect_ind.dev_event = USB_AUDIO_DEV_DISCONNECT_V01;
|
||||
disconnect_ind.slot_id = dev->udev->slot_id;
|
||||
disconnect_ind.controller_num = dev->usb_core_id;
|
||||
disconnect_ind.controller_num_valid = 1;
|
||||
ret = qmi_send_ind(svc->uaudio_svc_hdl, svc->curr_conn,
|
||||
&uaudio_stream_ind_desc, &disconnect_ind,
|
||||
sizeof(disconnect_ind));
|
||||
|
|
|
@ -865,6 +865,24 @@ struct elem_info qmi_uaudio_stream_ind_msg_v01_ei[] = {
|
|||
.offset = offsetof(struct qmi_uaudio_stream_ind_msg_v01,
|
||||
interrupter_num),
|
||||
},
|
||||
{
|
||||
.data_type = QMI_OPT_FLAG,
|
||||
.elem_len = 1,
|
||||
.elem_size = sizeof(uint8_t),
|
||||
.is_array = NO_ARRAY,
|
||||
.tlv_type = 0x19,
|
||||
.offset = offsetof(struct qmi_uaudio_stream_ind_msg_v01,
|
||||
controller_num_valid),
|
||||
},
|
||||
{
|
||||
.data_type = QMI_UNSIGNED_1_BYTE,
|
||||
.elem_len = 1,
|
||||
.elem_size = sizeof(uint8_t),
|
||||
.is_array = NO_ARRAY,
|
||||
.tlv_type = 0x19,
|
||||
.offset = offsetof(struct qmi_uaudio_stream_ind_msg_v01,
|
||||
controller_num),
|
||||
},
|
||||
{
|
||||
.data_type = QMI_EOTI,
|
||||
.is_array = NO_ARRAY,
|
||||
|
|
|
@ -84,6 +84,7 @@ enum usb_audio_device_speed_enum_v01 {
|
|||
USB_AUDIO_DEVICE_SPEED_FULL_V01 = 2,
|
||||
USB_AUDIO_DEVICE_SPEED_HIGH_V01 = 3,
|
||||
USB_AUDIO_DEVICE_SPEED_SUPER_V01 = 4,
|
||||
USB_AUDIO_DEVICE_SPEED_SUPER_PLUS_V01 = 5,
|
||||
USB_AUDIO_DEVICE_SPEED_ENUM_MAX_VAL_V01 = INT_MAX,
|
||||
};
|
||||
|
||||
|
@ -157,8 +158,10 @@ struct qmi_uaudio_stream_ind_msg_v01 {
|
|||
struct apps_mem_info_v01 xhci_mem_info;
|
||||
uint8_t interrupter_num_valid;
|
||||
uint8_t interrupter_num;
|
||||
uint8_t controller_num_valid;
|
||||
uint8_t controller_num;
|
||||
};
|
||||
#define QMI_UAUDIO_STREAM_IND_MSG_V01_MAX_MSG_LEN 177
|
||||
#define QMI_UAUDIO_STREAM_IND_MSG_V01_MAX_MSG_LEN 181
|
||||
extern struct elem_info qmi_uaudio_stream_ind_msg_v01_ei[];
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue