From: Wesley Cheng <quic_wcheng@quicinc.com>
To: "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>,
srinivas.kandagatla@linaro.org, mathias.nyman@intel.com,
perex@perex.cz, conor+dt@kernel.org, corbet@lwn.net,
broonie@kernel.org, lgirdwood@gmail.com, krzk+dt@kernel.org,
Thinh.Nguyen@synopsys.com, bgoswami@quicinc.com, tiwai@suse.com,
robh@kernel.org, gregkh@linuxfoundation.org
Cc: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-sound@vger.kernel.org>, <linux-usb@vger.kernel.org>,
<linux-arm-msm@vger.kernel.org>, <linux-doc@vger.kernel.org>,
<alsa-devel@alsa-project.org>
Subject: Re: [PATCH v23 32/32] ASoC: doc: Add documentation for SOC USB
Date: Fri, 26 Jul 2024 12:52:52 -0700 [thread overview]
Message-ID: <957b3c13-e4ba-45e3-b880-7a313e48c33f@quicinc.com> (raw)
In-Reply-To: <3634f704-a496-4341-a01d-07182248eccf@quicinc.com>
Hi Pierre/Amadeusz,
On 7/8/2024 4:16 PM, Wesley Cheng wrote:
> On 7/4/2024 4:25 AM, Pierre-Louis Bossart wrote:
>>>> Just so I understand...is it really desired that userspace doesn't
>>>> have the flexibility to choose which USB device is offloaded? I know
>>>> it complicates what needs to be done, but it could be just an
>>>> additional feature that can be added later on. Again, by default, we
>>>> select the last USB headset plugged in to be enabled for offload by
>>>> default.
>>> If it chooses endpoint by itself perhaps you can send patch set without
>>> controls first? This has added benefit of less patches in series, making
>>> it easier to review and it won't block whole patch set by discussion on
>>> controls feature. Controls can be added in followup series.
>> We do need read-only controls for userspace to know that offload is
>> possible and which card/device to use. That can be done in a first step
>> assuming there's a single device plugged-in.
> I agree, some kcontrol need to be present to at least determine:
>
> 1. USB SND device is offload capable (ASoC card and PCM index)- Fetches associated (mapped) ASoC platform card and PCM index (read only)
>
> 2. ASoC platform card offload status - Current offload status (read only)
>
> Those would be the minimum kcontrols we could have at this time. I will remove the device selection part, and leave that for future discussions. Does this sound good, Amadeusz/Pierre?
So I reworked the series a bit with respects to the kcontrols that we had, and I simplified it for the next submission. I went ahead and just have a read only kcontrol residing in the USB SND device and will implement #1 above:
/ # tinymix -D 1 contents
Number of controls: 9
ctl type num name value
0 INT 2 Capture Channel Map 0, 0 (range 0->36)
1 INT 2 Playback Channel Map 0, 0 (range 0->36)
2 BOOL 1 Headset Capture Switch On
3 INT 1 Headset Capture Volume 10 (range 0->13)
4 BOOL 1 Sidetone Playback Switch On
5 INT 1 Sidetone Playback Volume 4096 (range 0->8192)
6 BOOL 1 Headset Playback Switch On
7 INT 2 Headset Playback Volume 20, 20 (range 0->24)
8 INT 2 USB Offload Playback Route PCM#0 0, 0 (range -1->255)
If there is an available audio offload path, then the value will show the card and pcm index that it is mapped to. That way the application will know which card/pcm device to open from there. In the above example, the offload path is mapped to card#0 pcm#0. If there is no offload path available, it will show -1, -1.
For now, I removed the control that allows for explicit selection of which USB card and PCM device to offload, and will take this up on a separate series as we see fit. The codebase I have now will select the last USB headset plugged in for offloading. Will clean up the changes and submit a new revision with the other feedback included as well.
Thanks
Wesley Cheng
>
>> Dealing with multiple devices and defining rules or configuration
>> options to select the offloaded device is a second-level problem.
>>
>> In most cases the only thing that will be offloaded is a headset
>> anyways, so the selection could be rather static based on a
>> vendor/system ID, all other USB devices would be ignored.
> If the USB SND offload driver (ie qc_audio_offload) isn't compiled in, then it would be disabled. Do we need some over-arching mechanism to disable the offload functionality? Although, one thing I can see if I can add is some device classification within the USB offload vendor driver.
>
> Thanks
>
> Wesley Cheng
>
next prev parent reply other threads:[~2024-07-26 19:53 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 23:57 [PATCH v23 00/32] Introduce QC USB SND audio offloading support Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 01/32] ASoC: Add SOC USB APIs for adding an USB backend Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 02/32] ASoC: dt-bindings: qcom,q6dsp-lpass-ports: Add USB_RX port Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 03/32] ASoC: qcom: qdsp6: Introduce USB AFE port to q6dsp Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 04/32] ASoC: qdsp6: q6afe: Increase APR timeout Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 05/32] ASoC: qcom: qdsp6: Add USB backend ASoC driver for Q6 Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 06/32] ALSA: usb-audio: Introduce USB SND platform op callbacks Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 07/32] ALSA: usb-audio: Export USB SND APIs for modules Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 08/32] ALSA: usb-audio: Save UAC sample size information Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 09/32] usb: dwc3: Specify maximum number of XHCI interrupters Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 10/32] usb: host: xhci-plat: Set XHCI max interrupters if property is present Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 11/32] ALSA: usb-audio: qcom: Add USB QMI definitions Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 12/32] ALSA: usb-audio: qcom: Introduce QC USB SND offloading support Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 13/32] ALSA: usb-audio: Check for support for requested audio format Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 14/32] ASoC: usb: Add PCM format check API for USB backend Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 15/32] ASoC: qcom: qdsp6: Ensure PCM format is supported by USB audio device Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 16/32] ALSA: usb-audio: Prevent starting of audio stream if in use Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 17/32] ALSA: usb-audio: Do not allow USB offload path if PCM device is " Wesley Cheng
2024-06-12 14:57 ` Amadeusz Sławiński
2024-06-10 23:57 ` [PATCH v23 18/32] ASoC: dt-bindings: Update example for enabling USB offload on SM8250 Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 19/32] ALSA: usb-audio: qcom: Populate PCM and USB chip information Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 20/32] ASoC: qcom: qdsp6: Add support to track available USB PCM devices Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 21/32] ASoC: Introduce SND kcontrols to select sound card and PCM device Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 22/32] ASoC: qcom: qdsp6: Add SOC USB offload select get/put callbacks Wesley Cheng
2024-06-10 23:57 ` [PATCH v23 23/32] ASoC: Introduce SND kcontrols to track USB offloading state Wesley Cheng
2024-06-10 23:58 ` [PATCH v23 24/32] ASoC: qcom: qdsp6: Add PCM ops to track current state Wesley Cheng
2024-06-10 23:58 ` [PATCH v23 25/32] ASoC: usb: Create SOC USB SND jack kcontrol Wesley Cheng
2024-06-10 23:58 ` [PATCH v23 26/32] ASoC: qcom: qdsp6: Add headphone jack for offload connection status Wesley Cheng
2024-06-10 23:58 ` [PATCH v23 27/32] ASoC: usb: Fetch ASoC sound card information Wesley Cheng
2024-06-10 23:58 ` [PATCH v23 28/32] ALSA: usb-audio: Add USB offloading capable kcontrol Wesley Cheng
2024-06-10 23:58 ` [PATCH v23 29/32] ALSA: usb-audio: Allow for rediscovery of connected USB SND devices Wesley Cheng
2024-06-10 23:58 ` [PATCH v23 30/32] ALSA: usb-audio: qcom: Use card and PCM index from QMI request Wesley Cheng
2024-06-10 23:58 ` [PATCH v23 31/32] ASoC: usb: Rediscover USB SND devices on USB port add Wesley Cheng
2024-06-10 23:58 ` [PATCH v23 32/32] ASoC: doc: Add documentation for SOC USB Wesley Cheng
2024-06-12 12:25 ` Bagas Sanjaya
2024-06-12 19:30 ` Wesley Cheng
2024-06-12 14:47 ` Amadeusz Sławiński
2024-06-12 19:28 ` Wesley Cheng
2024-06-13 7:46 ` Amadeusz Sławiński
2024-06-17 17:02 ` Wesley Cheng
2024-06-18 11:42 ` Amadeusz Sławiński
2024-06-18 20:52 ` Wesley Cheng
2024-06-19 7:52 ` Amadeusz Sławiński
2024-06-20 22:04 ` Wesley Cheng
2024-06-21 8:27 ` Pierre-Louis Bossart
2024-06-28 0:59 ` Wesley Cheng
2024-07-02 8:30 ` Pierre-Louis Bossart
2024-07-02 23:34 ` Wesley Cheng
2024-07-03 8:49 ` Pierre-Louis Bossart
2024-07-03 9:13 ` Amadeusz Sławiński
2024-07-03 9:50 ` Pierre-Louis Bossart
2024-07-03 22:05 ` Wesley Cheng
2024-07-04 10:01 ` Amadeusz Sławiński
2024-07-04 11:25 ` Pierre-Louis Bossart
2024-07-08 23:16 ` Wesley Cheng
2024-07-26 19:52 ` Wesley Cheng [this message]
2024-06-12 14:50 ` [PATCH v23 00/32] Introduce QC USB SND audio offloading support Amadeusz Sławiński
2024-06-12 14:59 ` Pierre-Louis Bossart
2024-06-12 19:41 ` Wesley Cheng
2024-06-12 19:38 ` Wesley Cheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=957b3c13-e4ba-45e3-b880-7a313e48c33f@quicinc.com \
--to=quic_wcheng@quicinc.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=bgoswami@quicinc.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=robh@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox