[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <acec443c-f9ab-4c1d-b1ab-b8620dfef77f@linaro.org>
Date: Wed, 4 Sep 2024 13:43:50 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: "Liao, Bard" <bard.liao@...el.com>,
"Liao, Bard" <yung-chuan.liao@...ux.intel.com>, Vinod Koul
<vkoul@...nel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Cc: "Kale, Sanyog R" <sanyog.r.kale@...el.com>,
Shreyas NC <shreyas.nc@...el.com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH] soundwire: stream: fix programming slave ports for
non-continous port maps
On 03/09/2024 17:17, Liao, Bard wrote:
>>>
>>> then dpn_prop[0].num = 1 and dpn_prop[1].num = 3. And we need to go
>>>
>>> throuth dpn_prop[0] and dpn_prop[1] instead of dpn_prop[1] and
>> dpn_prop[3].
>>>
>>
>> What are the source or sink ports in your case? Maybe you just generate
>> wrong mask?
>
> I checked my mask is 0xa when I do aplay and it matches the sink_ports of
> the rt722 codec.
>
>>
>> It's not only my patch which uses for_each_set_bit(). sysfs_slave_dpn
>> does the same.
>
> What sysfs_slave_dpn does is
> i = 0;
> for_each_set_bit(bit, &mask, 32) {
> if (bit == N) {
> return sprintf(buf, format_string,
> dpn[i].field);
> }
> i++;
> }
> It uses a variable "i" to represent the array index of dpn[i].
> But, it is for_each_set_bit(i, &mask, 32) in your patch and the variable "i"
> which represents each bit of the mask is used as the index of dpn_prop[i].
>
> Again, the point is that the bits of mask is not the index of the dpn_prop[]
> array.
Yes, you are right. I think I cannot achieve my initial goal of using
same dpn array with different indices. My patch should be reverted, I
believe.
I'll send a revert, sorry for the mess.
Best regards,
Krzysztof
Powered by blists - more mailing lists