Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b2dab06 authored by Ajay Agarwal's avatar Ajay Agarwal
Browse files

Revert "sound: usb: Update QMI indication message"



This reverts commit 97097e76.

Remote QMI client does not require controller number. Delete the
support from uaudio_disconnect_cb() to send usb core id. Also
remove USB_AUDIO_DEVICE_SPEED_SUPER_PLUS_V01 from speed enum.

Change-Id: Ie000a0497d714eab361a8c30d68289e2f5c884e8
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent ea40a6c5
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -81,7 +81,6 @@ 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;
@@ -183,8 +182,6 @@ 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;
@@ -678,7 +675,6 @@ 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;
@@ -799,8 +795,6 @@ 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));
+1 −19
Original line number Diff line number Diff line
 /* Copyright (c) 2017, The Linux Foundation. All rights reserved.
 /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -865,24 +865,6 @@ 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,
+2 −5
Original line number Diff line number Diff line
 /* Copyright (c) 2017, The Linux Foundation. All rights reserved.
 /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -84,7 +84,6 @@ 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,
};

@@ -158,10 +157,8 @@ 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 181
#define QMI_UAUDIO_STREAM_IND_MSG_V01_MAX_MSG_LEN 177
extern struct elem_info qmi_uaudio_stream_ind_msg_v01_ei[];

#endif