From: <Claudiu.Beznea@microchip.com>
To: <walker.chen@starfivetech.com>, <broonie@kernel.org>
Cc: <dan.carpenter@linaro.org>, <lgirdwood@gmail.com>,
<tiwai@suse.com>, <perex@perex.cz>, <alsa-devel@alsa-project.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] ASoC: starfive: Cleanup and fix error check for JH7110 TDM
Date: Fri, 9 Jun 2023 07:50:22 +0000 [thread overview]
Message-ID: <a3e522e3-9836-426f-6f46-336eb157e1ef@microchip.com> (raw)
In-Reply-To: <7db1d08e-8310-8876-4ed8-36d6e53ab8bf@starfivetech.com>
On 08.06.2023 13:43, Walker Chen wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On 2023/6/8 18:15, Mark Brown wrote:
>> On Thu, Jun 08, 2023 at 10:15:03AM +0800, Walker Chen wrote:
>>> On 2023/6/7 19:44, Mark Brown wrote:
>>
>>>>> - (tdm->rx.wl << WL_BIT) |
>>>>> - (tdm->rx.sscale << SSCALE_BIT) |
>>>>> - (tdm->rx.sl << SL_BIT) |
>>>>> - (tdm->rx.lrj << LRJ_BIT);
>>>>> + datarx = (tdm->rxwl << 8) |
>>>>> + (tdm->rxsscale << 4) |
>>>>> + (tdm->rxsl << 2) |
>>>>> + TDM_PCMRXCR_LEFT_J;
>>
>>>> I'm not sure this change to use numbers here is a win - the _BIT
>>>> definitions look fine (I might've called them _SHIFT but whatever).
>>
>>> This is Claudiu's advice. Using the macro BIT() to replace these definition of *_BIT,
>>> it will result in big changes in the code.
>>
>> I'm questioning doing a change at all.
>>
>>> Please refer to previous comments:
>>> https://lore.kernel.org/all/143e2fa2-e85d-8036-4f74-ca250c026c1b@microchip.com/
>>
>> I can't find the comments you're referring to in there.
>
> You should see the following comments in the link above:
>
>> + #define CLKPOL_BIT 5
>> + #define TRITXEN_BIT 4
>> + #define ELM_BIT 3
>> + #define SYNCM_BIT 2
>> + #define MS_BIT 1
>
> Instead of these *_BIT defines as plain numbers you can defined them using
> BIT() macro and use macros in place instead of
>
As mentioned in [1] I sent that by accident. Please ignore it and sorry for
confusion.
[1]
https://lore.kernel.org/all/7a1a3ac3-10ec-9935-bca1-023cec6c0024@microchip.com/
prev parent reply other threads:[~2023-06-09 7:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 8:14 [PATCH v1] ASoC: starfive: Cleanup and fix error check for JH7110 TDM Walker Chen
2023-06-07 11:44 ` Mark Brown
2023-06-08 2:15 ` Walker Chen
2023-06-08 10:15 ` Mark Brown
2023-06-08 10:43 ` Walker Chen
2023-06-08 10:50 ` Mark Brown
2023-06-08 12:17 ` Walker Chen
2023-06-09 7:50 ` Claudiu.Beznea [this message]
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=a3e522e3-9836-426f-6f46-336eb157e1ef@microchip.com \
--to=claudiu.beznea@microchip.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=walker.chen@starfivetech.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