From: Stephen Gordon <gordoste@iinet.net.au>
To: Mark Brown <broonie@kernel.org>
Cc: Shenghao Ding <shenghao-ding@ti.com>, Kevin Lu <kevin-lu@ti.com>,
Baojun Xu <baojun.xu@ti.com>, Liam Girdwood <lgirdwood@gmail.com>,
linux-sound@vger.kernel.org
Subject: Re: [PATCH v2] ASoC: pcm3168a: Add option to force clock consumer
Date: Sat, 7 Dec 2024 12:52:22 +1100 [thread overview]
Message-ID: <20241207125222.7aeedbf6@rpi5> (raw)
In-Reply-To: <3c39e10d-0d39-4343-bdec-fe3041361cc8@sirena.org.uk>
On Fri, 6 Dec 2024 14:13:14 +0000
Mark Brown <broonie@kernel.org> wrote:
> On Sat, Dec 07, 2024 at 12:16:28AM +1100, Stephen Gordon wrote:
> > On 6/12/2024 11:22 pm, Mark Brown wrote:
> > > On Fri, Dec 06, 2024 at 10:54:43PM +1100, Stephen Gordon wrote:
>
> > > > + // Force clock consumer mode if needed
> > > > + if (pcm3168a->adc_fc && dai->id == PCM3168A_DAI_ADC)
> > > > + ms = 0;
> > > > + if (pcm3168a->dac_fc && dai->id == PCM3168A_DAI_DAC)
> > > > + ms = 0;
> > > The clock consumer mode should just be configured via the standard
> > > set_dai_fmt() operation.
>
> > I did try to do this using simple_card and I documented my attempt
> > and why it seems to
> >
> > fail in this message:
>
> You should use one of the audio-graph-card bindings for anything new.
>
> You probably want to fix the formatting in your mail client, it's
> doing somet very weird line wrapping and inserting spurious blank
> lines.
>
> > https://lore.kernel.org/linux-sound/b64a630f-d71f-49ee-a5e7-ea1e3a7f8de5@iinet.net.au/
> >
>
> > Basically, simple_card appears to set the CPU as producer if you
> > don't specify a
>
> > producer. I am not sure whether this is a bug.
>
> Well, if nothing is configured it's got to pick a default?
>
> > Also, there aren't any examples I could find in the documentation
> > of DAI links with
> >
> > clock consumer on both ends, so I was wondering if it is even
> > valid.
>
> No, that's not valid. The CODEC is the clock provider here and should
> understand that. I *think* the audio graph cards can handle this case
> by having both CODEC DAIs on a single PCM but I could be
> misremembering and it may only be the DPCM cases.
Thanks for confirming that a link must have a producer on one end. The
challenge is to configure it so that the codec end of the DAI link is
a producer, but the dai_fmt on the codec's DAI gets set to consumer.
I'll try to do this using the audio graph cards.
Hopefully the formatting is better, I have changed mail clients.
Stephen
next prev parent reply other threads:[~2024-12-07 2:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 12:01 [PATCH] ASoC: pcm3168a: Add option to force clock consumer Stephen Gordon
2024-12-06 11:54 ` [PATCH v2] " Stephen Gordon
2024-12-06 12:07 ` Mark Brown
2024-12-06 12:22 ` Mark Brown
2024-12-06 13:16 ` Stephen Gordon
2024-12-06 14:13 ` Mark Brown
2024-12-07 1:52 ` Stephen Gordon [this message]
2024-12-09 1:58 ` Kuninori Morimoto
2024-12-09 12:12 ` Stephen Gordon
2024-12-10 2:40 ` Kuninori Morimoto
2024-12-12 1:54 ` Stephen Gordon
2024-12-13 5:10 ` Kuninori Morimoto
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=20241207125222.7aeedbf6@rpi5 \
--to=gordoste@iinet.net.au \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=kevin-lu@ti.com \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=shenghao-ding@ti.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