Merge remote-tracking branch 'asoc/topic/pcm3168a' into asoc-next
This commit is contained in:
commit
95d7ff56d4
|
@ -299,10 +299,15 @@ static int pcm3168a_set_dai_sysclk(struct snd_soc_dai *dai,
|
||||||
int clk_id, unsigned int freq, int dir)
|
int clk_id, unsigned int freq, int dir)
|
||||||
{
|
{
|
||||||
struct pcm3168a_priv *pcm3168a = snd_soc_codec_get_drvdata(dai->codec);
|
struct pcm3168a_priv *pcm3168a = snd_soc_codec_get_drvdata(dai->codec);
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (freq > PCM1368A_MAX_SYSCLK)
|
if (freq > PCM1368A_MAX_SYSCLK)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
ret = clk_set_rate(pcm3168a->scki, freq);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
pcm3168a->sysclk = freq;
|
pcm3168a->sysclk = freq;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -395,13 +400,12 @@ static int pcm3168a_hw_params(struct snd_pcm_substream *substream,
|
||||||
struct pcm3168a_priv *pcm3168a = snd_soc_codec_get_drvdata(codec);
|
struct pcm3168a_priv *pcm3168a = snd_soc_codec_get_drvdata(codec);
|
||||||
bool tx, master_mode;
|
bool tx, master_mode;
|
||||||
u32 val, mask, shift, reg;
|
u32 val, mask, shift, reg;
|
||||||
unsigned int rate, channels, fmt, ratio, max_ratio;
|
unsigned int rate, fmt, ratio, max_ratio;
|
||||||
int i, min_frame_size;
|
int i, min_frame_size;
|
||||||
snd_pcm_format_t format;
|
snd_pcm_format_t format;
|
||||||
|
|
||||||
rate = params_rate(params);
|
rate = params_rate(params);
|
||||||
format = params_format(params);
|
format = params_format(params);
|
||||||
channels = params_channels(params);
|
|
||||||
|
|
||||||
ratio = pcm3168a->sysclk / rate;
|
ratio = pcm3168a->sysclk / rate;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue