lkml.org 
[lkml]   [2018]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] ASoC: codecs: Add support for AK4458 DAC driver
Date
Hi Mark,

> >
> > +static int ak4458_hw_params(struct snd_pcm_substream *substream,
> > +     struct snd_pcm_hw_params *params,
> > +     struct snd_soc_dai *dai)
> > +{
> > + struct snd_soc_codec *codec = dai->codec;
> > + struct ak4458_priv *ak4458 =
> > snd_soc_codec_get_drvdata(codec);
> > + u8 format;
> > + int pcm_width = max(params_physical_width(params), ak4458-
> > >slot_width);
> > +
> > +#ifdef AK4458_ACKS_USE_MANUAL_MODE
> > + u8 dfs1, dfs2;
> > +#endif
> What's this and why is it a compile time option?

This is used to set the codec in Manual Setting Mode, meaning that
the default sampling speed is set based on DFS0 and DFS1 bits. In
Auto Setting Mode, the MCLK frequency is detected automatically and
DFS bits are ignored.
This compile time option is used to know when to set the ACKS bit in
init_reg function that switches between modes.
At this moment we are only using Auto Mode and I can remove it if
you think is not necessary.

Thank you,
Cosmin
\
 
 \ /
  Last update: 2018-02-13 10:23    [W:0.085 / U:4.152 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site