Home
last modified time | relevance | path

Searched refs:pll_div (Results 1 – 18 of 18) sorted by relevance

/sound/soc/codecs/
Dwm8580.c369 static int pll_factors(struct _pll_div *pll_div, unsigned int target, in pll_factors() argument
384 pll_div->freqmode = post_table[i].freqmode; in pll_factors()
385 pll_div->postscale = post_table[i].postscale; in pll_factors()
401 pll_div->prescale = 1; in pll_factors()
404 pll_div->prescale = 0; in pll_factors()
412 pll_div->n = Ndiv; in pll_factors()
420 pll_div->k = K; in pll_factors()
423 pll_div->n, pll_div->k, pll_div->prescale, pll_div->freqmode, in pll_factors()
424 pll_div->postscale); in pll_factors()
436 struct _pll_div pll_div; in wm8580_set_dai_pll() local
[all …]
Dwm8804.c322 struct pll_div { struct
347 static int pll_factors(struct pll_div *pll_div, unsigned int target, in pll_factors() argument
362 pll_div->freqmode = post_table[i].freqmode; in pll_factors()
363 pll_div->mclkdiv = post_table[i].mclkdiv; in pll_factors()
375 pll_div->prescale = 0; in pll_factors()
379 pll_div->prescale = 1; in pll_factors()
388 pll_div->n = Ndiv; in pll_factors()
399 pll_div->k = K; in pll_factors()
420 struct pll_div pll_div; in wm8804_set_pll() local
422 ret = pll_factors(&pll_div, freq_out, freq_in, in wm8804_set_pll()
[all …]
Dwm9713.c725 struct _pll_div *pll_div, unsigned int source) in pll_factors() argument
736 pll_div->divsel = 1; in pll_factors()
740 pll_div->divctl = 1; in pll_factors()
742 pll_div->divctl = 0; in pll_factors()
745 pll_div->divsel = 0; in pll_factors()
746 pll_div->divctl = 0; in pll_factors()
753 pll_div->lf = 1; in pll_factors()
756 pll_div->lf = 0; in pll_factors()
764 pll_div->n = Ndiv; in pll_factors()
779 pll_div->k = K; in pll_factors()
[all …]
Dwm8940.c522 static struct pll_ pll_div; variable
537 pll_div.pre_scale = 0; in pll_factors()
542 pll_div.pre_scale = 3; in pll_factors()
547 pll_div.pre_scale = 2; in pll_factors()
550 pll_div.pre_scale = 1; in pll_factors()
557 pll_div.n = Ndiv; in pll_factors()
572 pll_div.k = K; in pll_factors()
597 if (pll_div.k) in wm8940_set_dai_pll()
599 (pll_div.pre_scale << 4) | pll_div.n | (1 << 6)); in wm8940_set_dai_pll()
602 (pll_div.pre_scale << 4) | pll_div.n); in wm8940_set_dai_pll()
[all …]
Dwm8974.c279 static void pll_factors(struct pll_ *pll_div, in pll_factors() argument
291 pll_div->pre_div = 1; in pll_factors()
294 pll_div->pre_div = 0; in pll_factors()
301 pll_div->n = Ndiv; in pll_factors()
316 pll_div->k = K; in pll_factors()
323 struct pll_ pll_div; in wm8974_set_dai_pll() local
337 pll_factors(&pll_div, freq_out, freq_in); in wm8974_set_dai_pll()
339 snd_soc_write(codec, WM8974_PLLN, (pll_div.pre_div << 4) | pll_div.n); in wm8974_set_dai_pll()
340 snd_soc_write(codec, WM8974_PLLK1, pll_div.k >> 18); in wm8974_set_dai_pll()
341 snd_soc_write(codec, WM8974_PLLK2, (pll_div.k >> 9) & 0x1ff); in wm8974_set_dai_pll()
[all …]
Dwm8978.c412 struct wm8978_pll_div *pll_div, unsigned int target, unsigned int source) in pll_factors() argument
420 pll_div->div2 = 1; in pll_factors()
423 pll_div->div2 = 0; in pll_factors()
431 pll_div->n = n_div; in pll_factors()
439 pll_div->k = k; in pll_factors()
477 struct wm8978_pll_div pll_div; in wm8978_configure_pll() local
539 pll_factors(codec, &pll_div, f2, wm8978->f_mclk); in wm8978_configure_pll()
542 __func__, pll_div.n, pll_div.k, pll_div.div2); in wm8978_configure_pll()
547 snd_soc_write(codec, WM8978_PLL_N, (pll_div.div2 << 4) | pll_div.n); in wm8978_configure_pll()
548 snd_soc_write(codec, WM8978_PLL_K1, pll_div.k >> 18); in wm8978_configure_pll()
[all …]
Dwm8510.c274 static struct pll_ pll_div; variable
288 pll_div.pre_div = 1; in pll_factors()
291 pll_div.pre_div = 0; in pll_factors()
298 pll_div.n = Ndiv; in pll_factors()
313 pll_div.k = K; in pll_factors()
335 snd_soc_write(codec, WM8510_PLLN, (pll_div.pre_div << 4) | pll_div.n); in wm8510_set_dai_pll()
336 snd_soc_write(codec, WM8510_PLLK1, pll_div.k >> 18); in wm8510_set_dai_pll()
337 snd_soc_write(codec, WM8510_PLLK2, (pll_div.k >> 9) & 0x1ff); in wm8510_set_dai_pll()
338 snd_soc_write(codec, WM8510_PLLK3, pll_div.k & 0x1ff); in wm8510_set_dai_pll()
Dwm8983.c746 struct pll_div { struct
753 static int pll_factors(struct pll_div *pll_div, unsigned int target, in pll_factors() argument
759 pll_div->div2 = 0; in pll_factors()
763 pll_div->div2 = 1; in pll_factors()
772 pll_div->n = Ndiv; in pll_factors()
783 pll_div->k = K; in pll_factors()
793 struct pll_div pll_div; in wm8983_set_pll() local
802 ret = pll_factors(&pll_div, freq_out * 4 * 2, freq_in); in wm8983_set_pll()
812 (pll_div.div2 << WM8983_PLL_PRESCALE_SHIFT) in wm8983_set_pll()
813 | pll_div.n); in wm8983_set_pll()
[all …]
Dwm8985.c777 struct pll_div { struct
784 static int pll_factors(struct pll_div *pll_div, unsigned int target, in pll_factors() argument
790 pll_div->div2 = 0; in pll_factors()
794 pll_div->div2 = 1; in pll_factors()
803 pll_div->n = Ndiv; in pll_factors()
814 pll_div->k = K; in pll_factors()
825 struct pll_div pll_div; in wm8985_set_pll() local
833 ret = pll_factors(&pll_div, freq_out * 4 * 2, freq_in); in wm8985_set_pll()
839 (pll_div.div2 << WM8985_PLL_PRESCALE_SHIFT) in wm8985_set_pll()
840 | pll_div.n); in wm8985_set_pll()
[all …]
Dwm8960.c1033 struct _pll_div *pll_div) in pll_factors() argument
1046 pll_div->pre_div = 1; in pll_factors()
1049 pll_div->pre_div = 0; in pll_factors()
1056 pll_div->n = Ndiv; in pll_factors()
1071 pll_div->k = K; in pll_factors()
1074 pll_div->n, pll_div->k, pll_div->pre_div); in pll_factors()
1083 static struct _pll_div pll_div; in wm8960_set_pll() local
1087 ret = pll_factors(freq_in, freq_out, &pll_div); in wm8960_set_pll()
1101 reg |= pll_div.pre_div << 4; in wm8960_set_pll()
1102 reg |= pll_div.n; in wm8960_set_pll()
[all …]
Dwm8990.c897 static void pll_factors(struct _pll_div *pll_div, unsigned int target, in pll_factors() argument
907 pll_div->div2 = 1; in pll_factors()
910 pll_div->div2 = 0; in pll_factors()
916 pll_div->n = Ndiv; in pll_factors()
931 pll_div->k = K; in pll_factors()
938 struct _pll_div pll_div; in wm8990_set_dai_pll() local
941 pll_factors(&pll_div, freq_out * 4, freq_in); in wm8990_set_dai_pll()
952 snd_soc_write(codec, WM8990_PLL1, pll_div.n | WM8990_SDM | in wm8990_set_dai_pll()
953 (pll_div.div2?WM8990_PRESCALE:0)); in wm8990_set_dai_pll()
954 snd_soc_write(codec, WM8990_PLL2, (u8)(pll_div.k>>8)); in wm8990_set_dai_pll()
[all …]
Dwm8991.c879 static void pll_factors(struct _pll_div *pll_div, unsigned int target, in pll_factors() argument
889 pll_div->div2 = 1; in pll_factors()
892 pll_div->div2 = 0; in pll_factors()
898 pll_div->n = Ndiv; in pll_factors()
913 pll_div->k = K; in pll_factors()
921 struct _pll_div pll_div; in wm8991_set_dai_pll() local
924 pll_factors(&pll_div, freq_out * 4, freq_in); in wm8991_set_dai_pll()
936 snd_soc_write(codec, WM8991_PLL1, pll_div.n | WM8991_SDM | in wm8991_set_dai_pll()
937 (pll_div.div2 ? WM8991_PRESCALE : 0)); in wm8991_set_dai_pll()
938 snd_soc_write(codec, WM8991_PLL2, (u8)(pll_div.k>>8)); in wm8991_set_dai_pll()
[all …]
Dwm8753.c707 static void pll_factors(struct _pll_div *pll_div, unsigned int target, in pll_factors() argument
716 pll_div->div2 = 1; in pll_factors()
719 pll_div->div2 = 0; in pll_factors()
725 pll_div->n = Ndiv; in pll_factors()
740 pll_div->k = K; in pll_factors()
770 struct _pll_div pll_div; in wm8753_set_dai_pll() local
772 pll_factors(&pll_div, freq_out * 8, freq_in); in wm8753_set_dai_pll()
776 value = (pll_div.n << 5) + ((pll_div.k & 0x3c0000) >> 18); in wm8753_set_dai_pll()
780 value = (pll_div.k & 0x03fe00) >> 9; in wm8753_set_dai_pll()
784 value = pll_div.k & 0x0001ff; in wm8753_set_dai_pll()
[all …]
Dalc5632.c685 int gbl_clk = 0, pll_div = 0; in alc5632_set_dai_pll() local
713 pll_div = codec_master_pll_div[i].regvalue; in alc5632_set_dai_pll()
724 pll_div = codec_slave_pll_div[i].regvalue; in alc5632_set_dai_pll()
735 pll_div = codec_slave_pll_div[i].regvalue; in alc5632_set_dai_pll()
744 if (!pll_div) in alc5632_set_dai_pll()
750 snd_soc_write(codec, ALC5632_PLL1_CTRL, pll_div); in alc5632_set_dai_pll()
Dalc5623.c530 int gbl_clk = 0, pll_div = 0; in alc5623_set_dai_pll() local
555 pll_div = codec_master_pll_div[i].regvalue; in alc5623_set_dai_pll()
566 pll_div = codec_slave_pll_div[i].regvalue; in alc5623_set_dai_pll()
575 if (!pll_div) in alc5623_set_dai_pll()
579 snd_soc_write(codec, ALC5623_PLL_CTRL, pll_div); in alc5623_set_dai_pll()
Drt5631.c1217 struct pll_div { struct
1223 static const struct pll_div codec_master_pll_div[] = { argument
1260 static const struct pll_div codec_slave_pll_div[] = {
Dda7210.c216 struct pll_div { struct
226 static const struct pll_div da7210_pll_div[] = { argument
Dda9055.c243 struct pll_div { struct
253 static const struct pll_div da9055_pll_div[] = { argument