Loading Documentation/devicetree/bindings/sound/qcom-usb-audio-qmi-dev.txt 0 → 100644 +26 −0 Original line number Diff line number Diff line QTI USB Audio QMI Device USB Audio QMI device is used to attach to remote processor IOMMU and map USB Audio driver specific memory to iova to share with remote processor. Required Properties: - compatible : "qcom,usb-audio-qmi-dev" - iommus : A list of phandle and IOMMU specifier pairs that describe the IOMMU master interfaces of the device. - qcom,usb-audio-stream-id : Stream id is prepended to iova before passing iova to remote processor. This allows remote processor to access iova. - qcom,usb-audio-intr-num : Interrupter number for external sub system destination. Example: usb_audio_qmi_dev { compatible = "qcom,usb-audio-qmi-dev"; iommus = <&lpass_q6_smmu 12>; qcom,usb-audio-stream-id = <12>; qcom,usb-audio-intr-num = <1>; }; sound/usb/Kconfig +8 −0 Original line number Diff line number Diff line Loading @@ -162,5 +162,13 @@ config SND_BCD2000 source "sound/usb/line6/Kconfig" config SND_USB_AUDIO_QMI tristate "USB Audio QMI Service driver" depends on MSM_QMI_INTERFACE help Starts USB Audio QMI server to communicate with remote entity to perform operations like enable or disable particular audio stream on a connected USB device. endif # SND_USB sound/usb/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -29,3 +29,4 @@ obj-$(CONFIG_SND_USB_US122L) += snd-usbmidi-lib.o obj-$(CONFIG_SND) += misc/ usx2y/ caiaq/ 6fire/ hiface/ bcd2000/ obj-$(CONFIG_SND_USB_LINE6) += line6/ obj-$(CONFIG_SND_USB_AUDIO_QMI) += usb_audio_qmi_v01.o usb_audio_qmi_svc.o sound/usb/card.c +4 −2 Original line number Diff line number Diff line Loading @@ -417,6 +417,7 @@ static int snd_usb_audio_free(struct snd_usb_audio *chip) list_for_each_entry_safe(ep, n, &chip->ep_list, list) snd_usb_endpoint_free(ep); mutex_destroy(&chip->dev_lock); mutex_destroy(&chip->mutex); if (!atomic_read(&chip->shutdown)) dev_set_drvdata(&chip->dev->dev, NULL); Loading Loading @@ -476,6 +477,7 @@ static int snd_usb_audio_create(struct usb_interface *intf, } mutex_init(&chip->mutex); mutex_init(&chip->dev_lock); init_waitqueue_head(&chip->shutdown_wait); chip->index = idx; chip->dev = dev; Loading Loading @@ -761,6 +763,8 @@ static void usb_audio_disconnect(struct usb_interface *intf) return; card = chip->card; if (chip->disconnect_cb) chip->disconnect_cb(chip); mutex_lock(®ister_mutex); if (atomic_inc_return(&chip->shutdown) == 1) { Loading Loading @@ -796,8 +800,6 @@ static void usb_audio_disconnect(struct usb_interface *intf) if (chip->num_interfaces <= 0) { usb_chip[chip->index] = NULL; mutex_unlock(®ister_mutex); if (chip->disconnect_cb) chip->disconnect_cb(chip); snd_card_free_when_closed(card); } else { mutex_unlock(®ister_mutex); Loading sound/usb/stream.c +5 −0 Original line number Diff line number Diff line Loading @@ -70,9 +70,14 @@ static void snd_usb_audio_stream_free(struct snd_usb_stream *stream) static void snd_usb_audio_pcm_free(struct snd_pcm *pcm) { struct snd_usb_stream *stream = pcm->private_data; struct snd_usb_audio *chip; if (stream) { mutex_lock(&stream->chip->dev_lock); chip = stream->chip; stream->pcm = NULL; snd_usb_audio_stream_free(stream); mutex_unlock(&chip->dev_lock); } } Loading Loading
Documentation/devicetree/bindings/sound/qcom-usb-audio-qmi-dev.txt 0 → 100644 +26 −0 Original line number Diff line number Diff line QTI USB Audio QMI Device USB Audio QMI device is used to attach to remote processor IOMMU and map USB Audio driver specific memory to iova to share with remote processor. Required Properties: - compatible : "qcom,usb-audio-qmi-dev" - iommus : A list of phandle and IOMMU specifier pairs that describe the IOMMU master interfaces of the device. - qcom,usb-audio-stream-id : Stream id is prepended to iova before passing iova to remote processor. This allows remote processor to access iova. - qcom,usb-audio-intr-num : Interrupter number for external sub system destination. Example: usb_audio_qmi_dev { compatible = "qcom,usb-audio-qmi-dev"; iommus = <&lpass_q6_smmu 12>; qcom,usb-audio-stream-id = <12>; qcom,usb-audio-intr-num = <1>; };
sound/usb/Kconfig +8 −0 Original line number Diff line number Diff line Loading @@ -162,5 +162,13 @@ config SND_BCD2000 source "sound/usb/line6/Kconfig" config SND_USB_AUDIO_QMI tristate "USB Audio QMI Service driver" depends on MSM_QMI_INTERFACE help Starts USB Audio QMI server to communicate with remote entity to perform operations like enable or disable particular audio stream on a connected USB device. endif # SND_USB
sound/usb/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -29,3 +29,4 @@ obj-$(CONFIG_SND_USB_US122L) += snd-usbmidi-lib.o obj-$(CONFIG_SND) += misc/ usx2y/ caiaq/ 6fire/ hiface/ bcd2000/ obj-$(CONFIG_SND_USB_LINE6) += line6/ obj-$(CONFIG_SND_USB_AUDIO_QMI) += usb_audio_qmi_v01.o usb_audio_qmi_svc.o
sound/usb/card.c +4 −2 Original line number Diff line number Diff line Loading @@ -417,6 +417,7 @@ static int snd_usb_audio_free(struct snd_usb_audio *chip) list_for_each_entry_safe(ep, n, &chip->ep_list, list) snd_usb_endpoint_free(ep); mutex_destroy(&chip->dev_lock); mutex_destroy(&chip->mutex); if (!atomic_read(&chip->shutdown)) dev_set_drvdata(&chip->dev->dev, NULL); Loading Loading @@ -476,6 +477,7 @@ static int snd_usb_audio_create(struct usb_interface *intf, } mutex_init(&chip->mutex); mutex_init(&chip->dev_lock); init_waitqueue_head(&chip->shutdown_wait); chip->index = idx; chip->dev = dev; Loading Loading @@ -761,6 +763,8 @@ static void usb_audio_disconnect(struct usb_interface *intf) return; card = chip->card; if (chip->disconnect_cb) chip->disconnect_cb(chip); mutex_lock(®ister_mutex); if (atomic_inc_return(&chip->shutdown) == 1) { Loading Loading @@ -796,8 +800,6 @@ static void usb_audio_disconnect(struct usb_interface *intf) if (chip->num_interfaces <= 0) { usb_chip[chip->index] = NULL; mutex_unlock(®ister_mutex); if (chip->disconnect_cb) chip->disconnect_cb(chip); snd_card_free_when_closed(card); } else { mutex_unlock(®ister_mutex); Loading
sound/usb/stream.c +5 −0 Original line number Diff line number Diff line Loading @@ -70,9 +70,14 @@ static void snd_usb_audio_stream_free(struct snd_usb_stream *stream) static void snd_usb_audio_pcm_free(struct snd_pcm *pcm) { struct snd_usb_stream *stream = pcm->private_data; struct snd_usb_audio *chip; if (stream) { mutex_lock(&stream->chip->dev_lock); chip = stream->chip; stream->pcm = NULL; snd_usb_audio_stream_free(stream); mutex_unlock(&chip->dev_lock); } } Loading