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: <abc9713f-3230-4a5d-98fd-f1cb293bc26a@quicinc.com>
Date: Tue, 3 Sep 2024 14:41:53 -0700
From: Wesley Cheng <quic_wcheng@...cinc.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        <srinivas.kandagatla@...aro.org>, <mathias.nyman@...el.com>,
        <perex@...ex.cz>, <conor+dt@...nel.org>, <dmitry.torokhov@...il.com>,
        <corbet@....net>, <broonie@...nel.org>, <lgirdwood@...il.com>,
        <tiwai@...e.com>, <krzk+dt@...nel.org>, <Thinh.Nguyen@...opsys.com>,
        <bgoswami@...cinc.com>, <robh@...nel.org>,
        <gregkh@...uxfoundation.org>
CC: <linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-sound@...r.kernel.org>, <linux-input@...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 v26 22/33] ASoC: qcom: qdsp6: Add headphone jack for
 offload connection status

Hi Pierre,

On 8/30/2024 2:27 AM, Pierre-Louis Bossart wrote:
>
>>  		/* Selects the latest USB headset plugged in for offloading */
>> +		if (data->hs_jack && list_empty(&data->devices))
>> +			snd_jack_report(data->hs_jack->jack, SND_JACK_USB);
>> +
> with the list_empty check, this looks like only the first connected
> headset will be handled, not the last?

Sorry, the comment is misplaced.  It should be meant to explain:

/* Selects the latest USB headset plugged in for offloading */
list_add_tail(&sdev->list, &data->devices);

The above IF check is to say that we'll only notify the USB jack if there is an available USB audio device (capable of offloading) connected.  I guess it might make sense to notify the snd jack on every USB audio device connection.  Currently, it will notify on the first device identified (present) and the last device removed (not present).

Thanks

Wesley Cheng

>>  		list_add_tail(&sdev->list, &data->devices);
>>  	} else {
>>  		list_del(&sdev->list);
>> +
>> +		if (data->hs_jack && list_empty(&data->devices))
>> +			snd_jack_report(data->hs_jack->jack, 0);
>>  	}
>>  	mutex_unlock(&data->mutex);
>>  
>>  	return 0;
>>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ