lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <34d0ce88-e006-43d3-bab3-c884c997de4c@linux.intel.com>
Date:   Tue, 17 Oct 2023 18:03:13 -0500
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Wesley Cheng <quic_wcheng@...cinc.com>, mathias.nyman@...el.com,
        gregkh@...uxfoundation.org, lgirdwood@...il.com,
        broonie@...nel.org, perex@...ex.cz, tiwai@...e.com,
        agross@...nel.org, andersson@...nel.org, konrad.dybcio@...aro.org,
        robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
        conor+dt@...nel.org, srinivas.kandagatla@...aro.org,
        bgoswami@...cinc.com, Thinh.Nguyen@...opsys.com
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        alsa-devel@...a-project.org, linux-arm-msm@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCH v9 31/34] ASoC: qcom: qdsp6: Add headphone jack for
 offload connection status



On 10/17/23 15:01, Wesley Cheng wrote:
> The headphone jack framework has a well defined infrastructure for
> notifying userspace entities through input devices.  Expose a jack device
> that carries information about if an offload capable device is connected.
> Applications can further identify specific offloading information through
> other SND kcontrols.

maybe I am mistaken but if you expose a jack, is there not a need to
implement a .set_jack callback in the component driver?

>  static void q6usb_connector_control_init(struct snd_soc_component *component)
>  {
> +	struct q6usb_port_data *data = dev_get_drvdata(component->dev);
>  	int ret;
>  
>  	ret = snd_ctl_add(component->card->snd_card,
> @@ -290,6 +293,11 @@ static void q6usb_connector_control_init(struct snd_soc_component *component)
>  				snd_ctl_new1(&q6usb_offload_dev_ctrl, component));
>  	if (ret < 0)
>  		return;
> +
> +	ret = snd_soc_card_jack_new(component->card, "USB offload",
> +					SND_JACK_HEADSET, &data->hs_jack);
> +	if (ret)
> +		return;

Also if you report a jack then usually there's a difference between
SND_JACK_HEADPHONE and SND_JACK_HEADSET - where the latter case hints at
capture support.

Clearly you don't have capture support for now, so should this be
SND_JACK_HEADPHONE ?

I must say I still don't get how this entire patchset would be used, for
playback userspace *may* use offload but for any sort of voice call then
userspace *shall* rely on the legacy USB card. Is this not a
show-stopper for CRAS or PipeWire?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ