From: olivier.moysan@st.com (Olivier MOYSAN)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] dt-bindings: Document STM32 I2S bindings
Date: Thu, 27 Apr 2017 15:57:51 +0000 [thread overview]
Message-ID: <7005b06f-457c-90f4-bdf1-bed75c565063@st.com> (raw)
In-Reply-To: <20170426161553.oc5pozga53ttypyq@sirena.org.uk>
Hello Mark,
On 04/26/2017 06:15 PM, Mark Brown wrote:
> On Thu, Apr 13, 2017 at 08:01:34AM +0000, Olivier MOYSAN wrote:
>
>> 1) 2 static dais NOT exclusive
>> - dai tx
>> - dai rx
>> The IP exhibits a mode register, where you select mode TX, RX or FD.
>> There are 2 two options to manage this register.
>> option 1:
>> start first channel with mode RX or TX
>> when second channel is started, mode has to be changed to FD.
>> Transfers have to be stopped before changing configuration
>> registers, so this leads to cuts in audio stream.
>> option 2:
>> start a first channel with mode FD.
>> In this case, we may have unpredictable behavior for the stream
>> which is not already started. probably underrun/overrun.
>> So, this solution rises problem for full-duplex management.
>
>> 2) 3 static dais exclusive
>> - dai tx
>> - dai rx
>> - dai rx-tx (fd)
>> This is the current implementation.
>> The choice of the dai is done at probe time. It is provided by DT
>> through sound-dai parameter.
>> When dai fd is selected, after starting first stream, we assume that
>> second stream will be started. In this case we wait for second stream
>> to be available before enabling IP and starting transfers.
>
>> 3) 1 dynamic dai
>> - dai rx or tx or fd (according to dma conf in IP node)
>> Here the driver exposes only a single dai constructed from dma
>> configuration provided by IP DT node.
>> This allows to get ride of sound-dai parameter.
>
> None of these options reflect how normal I2S controllers present
> themselves in DT. To repeat, you should present a single bidirectional
> DAI for the single physical bidirectional I2S controller that your
> hardware has.
>
> If it's not possible to figure out a way to make the controller support
> simultaneous playback and record with the two started independently then
> the driver should just return an error if userspace tries to start the
> second direction up. This will severely limit the utility of the driver
> as Linux generally treats playback and record independently but that's
> going to apply just as much with any of the options involving multiple
> DAIs or configuration in DT. You might be able to do something with
> feeding it dummy data I guess?
>
Ok. I will implement a single bidirectional DAI in v2.
Best regards
Olivier
next prev parent reply other threads:[~2017-04-27 15:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 15:40 [PATCH 0/2] ASoC: stm32: Add I2S driver olivier moysan
2017-04-06 15:40 ` [PATCH 1/2] dt-bindings: Document STM32 I2S bindings olivier moysan
2017-04-10 19:48 ` Rob Herring
2017-04-11 14:32 ` Mark Brown
2017-04-11 15:44 ` Olivier MOYSAN
2017-04-11 21:10 ` Mark Brown
2017-04-12 8:30 ` Olivier MOYSAN
2017-04-12 11:32 ` Mark Brown
2017-04-12 12:58 ` Olivier MOYSAN
2017-04-12 15:38 ` Mark Brown
2017-04-13 8:01 ` Olivier MOYSAN
2017-04-26 16:15 ` Mark Brown
2017-04-27 15:57 ` Olivier MOYSAN [this message]
2017-04-11 16:02 ` Rob Herring
2017-04-11 20:19 ` Mark Brown
2017-04-06 15:40 ` [PATCH 2/2] ASoC: stm32: Add I2S driver olivier moysan
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=7005b06f-457c-90f4-bdf1-bed75c565063@st.com \
--to=olivier.moysan@st.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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