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: <1a2d0962-405d-4ccf-a0da-00a624c0f3e8@linux.intel.com>
Date: Fri, 2 Aug 2024 08:32:30 +0200
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To: Wesley Cheng <quic_wcheng@...cinc.com>, srinivas.kandagatla@...aro.org,
 mathias.nyman@...el.com, perex@...ex.cz, conor+dt@...nel.org,
 corbet@....net, broonie@...nel.org, lgirdwood@...il.com, krzk+dt@...nel.org,
 Thinh.Nguyen@...opsys.com, bgoswami@...cinc.com, tiwai@...e.com,
 gregkh@...uxfoundation.org, robh@...nel.org
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
 linux-sound@...r.kernel.org, linux-usb@...r.kernel.org,
 linux-arm-msm@...r.kernel.org, linux-doc@...r.kernel.org,
 alsa-devel@...a-project.org
Subject: Re: [PATCH v24 17/34] ASoC: qcom: qdsp6: Add USB backend ASoC driver
 for Q6



On 8/2/24 01:10, Wesley Cheng wrote:
> Hi Pierre,
> 
> On 8/1/2024 1:40 AM, Pierre-Louis Bossart wrote:
>>
>>
>>> +static int q6usb_hw_params(struct snd_pcm_substream *substream,
>>> +			   struct snd_pcm_hw_params *params,
>>> +			   struct snd_soc_dai *dai)
>>> +{
>>> +	struct q6usb_port_data *data = dev_get_drvdata(dai->dev);
>>> +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
>>> +	struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
>>> +	struct q6afe_port *q6usb_afe;
>>> +	struct snd_soc_usb_device *sdev;
>>> +	int ret;
>>> +
>>> +	/* No active chip index */
>>> +	if (list_empty(&data->devices))
>>> +		return -EINVAL;
>>> +
>>> +	mutex_lock(&data->mutex);
>>> +	sdev = list_last_entry(&data->devices, struct snd_soc_usb_device, list);
>>> +
>>> +	q6usb_afe = q6afe_port_get_from_id(cpu_dai->dev, USB_RX);
>>> +	if (IS_ERR(q6usb_afe))
>>> +		goto out;
>>> +
>>> +	/* Notify audio DSP about the devices being offloaded */
>>> +	ret = afe_port_send_usb_dev_param(q6usb_afe, sdev->card_idx,
>>> +						sdev->pcm_idx);
>>> +
>>> +out:
>>> +	mutex_unlock(&data->mutex);
>>> +
>>> +	return ret;
>>> +}
>> Humm, multiple questions here
>>
>> a) is this intentional that the params are not used in a hw_params routine?
> Think this was answered in patch#34.

yes, but that really begs the question if the format check shouldn't be
added here.

>> b) if yes, could this be replaced by a .prepare callback
>>
>> c) along the same lines as b), is suspend-resume during playback
>> supported? Usually this is handled with a .prepare callback to restore
>> connections.
> 
> I don't see us supporting that throughout any of the QC based DAI drivers, so this probably isn't implemented yet.  In terms of supporting system PM suspend for this USB offload path, we're going to explicitly stop the audio stream from the USB offload driver (qc_audio_offload) before we suspend the usb device. (refer to qc_usb_audio_offload_suspend()

The system suspend-resume during playback is not enabled in all
platforms indeed, it mostly depends on what userspace does. IIRC this is
required for Chrome/CRAS and it's supported by aplay.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ