Re: [PATCH v2] ASoC: pcm3168a: Add option to force clock consumer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, 6 Dec 2024 14:13:14 +0000
Mark Brown <broonie@xxxxxxxxxx> 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@xxxxxxxxxxxx/
> >  
> 
> > 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






[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux