From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Bastien Curutchet <bastien.curutchet@bootlin.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
herve.codina@bootlin.com, christophercordahi@nanometrics.ca
Subject: Re: [PATCH 13/13] ASoC: ti: davinci-i2s: Opitonally drive DX pin during capture streams
Date: Thu, 21 Mar 2024 20:31:33 +0200 [thread overview]
Message-ID: <e6994ff1-6c32-4dac-846a-5f4f18b2f996@gmail.com> (raw)
In-Reply-To: <5467add6-0099-4e54-a4f7-12aa149d03c7@bootlin.com>
Hi Bastien,
On 3/21/24 17:14, Bastien Curutchet wrote:
>>> I think the definition of the 'ti,drive-dx' is somehow odd. It allows
>>> you to set it to 0x1234 and the DX pin will show 0x1234 when you capture
>>> 32bit. If you capture 16bit then it will transmit 0x12 (or 0x34?), no?
>>> If you have 4 channel capture then I won't speculate what will be on the
>>> DX pin ;)
>>>
>>> Would not be better to say that the DX pin will be driven low or high
>>> during capture _and_ disable the playback support?
>>
>> After some thinking, it might be still better to use the DX pin as GPIO
>> and either have a custom machine driver which would handle it (set low
>> when a capture trigger happens) or connect it in DAPM as a supply, bias
>> or something and ASoC would handle it automagically.
>>
>> I think that would be cleaner in many ways. What do you think?
>>
> I agree, that would be cleaner. I ran a few tests to see if that would
> work on my hardware. It doesn't ... So I looked back to the schematics
> and found two reasons :
> * the DX pin needs to be in sync with the clock.
I'm not sure what this means, sync with which clock?
> * the DX pin needs to be in a high-impedance state between two frames
> so a pull-up can drive it back up. Actually, the DX pin is also
> linked to the FSR pin so it provides the frame clock to the capture
> stream.
Hrm, you are using the DX pin as FSR for the capture? Why not McBSP.FSR pin?
Looking back to the patch, one thing stood out: you are setting the
XDATDLY to 2.
You have some sort of T1 framing on the bus? The pullup will make the DX
line high in for the framing bit, right?
Or you simulate another FSR line with T1 framing DX?
The 'ti,drive-dx' sounds like a bad property for sure, you have T1
framing and driving the DX to certain level.
It is like DSP_A (1 bit delay) playing constant 0x2 ?
Can you use aplay /dev/zero and a DT property to select T1 framing for
the playback? Or that would be too coarse for timing the start of
playback and capture?
--
Péter
next prev parent reply other threads:[~2024-03-21 18:29 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-15 11:27 [PATCH 00/13] ASoC: ti: davinci-i2s: Add features to McBSP driver Bastien Curutchet
2024-03-15 11:27 ` [PATCH 01/13] ASoC: dt-bindings: davinci-mcbsp: convert McBSP bindings to yaml schema Bastien Curutchet
2024-03-17 20:04 ` Rob Herring
2024-03-15 11:27 ` [PATCH 02/13] ASoC: dt-bindings: davinci-mcbsp: Add new properties Bastien Curutchet
2024-03-17 20:06 ` Rob Herring
2024-03-15 11:27 ` [PATCH 03/13] ASoC: ti: davinci-i2s: Remove the unused clk_input_pin attribute Bastien Curutchet
2024-03-15 11:27 ` [PATCH 04/13] ASoC: ti: davinci-i2s: Replace dev_err with dev_err_probe Bastien Curutchet
2024-03-15 14:07 ` Mark Brown
2024-03-15 14:23 ` Herve Codina
2024-03-15 14:40 ` Mark Brown
2024-03-18 7:40 ` Bastien Curutchet
2024-03-18 13:28 ` Mark Brown
2024-03-15 11:27 ` [PATCH 05/13] ASoC: ti: davinci-i2s: Use external clock to drive sample rate generator Bastien Curutchet
2024-03-15 11:27 ` [PATCH 06/13] ASoC: ti: davinci-i2s: Delete unnecessary assignment Bastien Curutchet
2024-03-15 11:27 ` [PATCH 07/13] ASoC: ti: davinci-i2s: Add TDM support Bastien Curutchet
2024-03-19 15:57 ` Péter Ujfalusi
2024-03-20 7:31 ` Bastien Curutchet
2024-03-20 15:14 ` Péter Ujfalusi
2024-03-15 11:27 ` [PATCH 08/13] ASoC: ti: davinci-i2s: Add handling of BP_FC format Bastien Curutchet
2024-03-15 11:27 ` [PATCH 09/13] ASoC: ti: davinci-i2s: Enable unexpected frame pulses detection Bastien Curutchet
2024-03-15 14:09 ` Mark Brown
2024-03-15 14:45 ` Bastien Curutchet
2024-03-15 14:54 ` Mark Brown
2024-03-15 11:27 ` [PATCH 10/13] ASoC: ti: davinci-i2s: Make free-running mode optional Bastien Curutchet
2024-03-15 14:10 ` Mark Brown
2024-03-15 11:27 ` [PATCH 11/13] ASoC: ti: davinci-i2s: Add S24_LE to supported formats Bastien Curutchet
2024-03-15 11:27 ` [PATCH 12/13] ASoC: dt-bindings: davinic-mcbsp: Add the 'ti,drive-dx' property Bastien Curutchet
2024-03-17 20:10 ` Rob Herring
2024-03-19 18:02 ` Péter Ujfalusi
2024-03-20 7:46 ` Bastien Curutchet
2024-03-15 11:27 ` [PATCH 13/13] ASoC: ti: davinci-i2s: Opitonally drive DX pin during capture streams Bastien Curutchet
2024-03-19 18:29 ` Péter Ujfalusi
2024-03-20 8:52 ` Bastien Curutchet
2024-03-20 15:42 ` Péter Ujfalusi
2024-03-20 20:30 ` Péter Ujfalusi
2024-03-21 15:14 ` Bastien Curutchet
2024-03-21 18:31 ` Péter Ujfalusi [this message]
2024-03-22 8:58 ` Bastien Curutchet
2024-03-29 13:24 ` Bastien Curutchet
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=e6994ff1-6c32-4dac-846a-5f4f18b2f996@gmail.com \
--to=peter.ujfalusi@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=bastien.curutchet@bootlin.com \
--cc=broonie@kernel.org \
--cc=christophercordahi@nanometrics.ca \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=herve.codina@bootlin.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=tiwai@suse.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