Commit ac4b320
UPSTREAM: ASoC: es8328: Let device auto detect ratios in slave mode
In master mode, SCLK and LRCLK signals are generated by the CODEC when
any of the ADC/DAC are enabled. SCLK is derived from MCLK via a
programmable division set by BLK_DIV, LRCLK is derived from MCLK via
another programmable division set by ADCFsRatio/DACFsRatio.
In slave mode, SCLK and LRCLK signals are received as inputs and
supplied externally. LRCLK and SCLK must be synchronously derived from
MCLK with specific rates. The device can auto detect MCLK/LRCLK ratio
according to a predefined table. LRCLK/SCLK ratio is usually 64 (SCLK =
64 * LRCLK)
This commits adds support to let to device auto detect and decide which
ratio to use. The mclkdiv2 and BCLK_DIV ratio and put to zero.
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit ae884ae)
Change-Id: I195d5c3fc9f8b3032c5f0a1c767da696de22fb9b
Signed-off-by: Chris Zhong <zyw@rock-chips.com>1 parent 912f574 commit ac4b320
1 file changed
Lines changed: 25 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
469 | 470 | | |
470 | 471 | | |
471 | 472 | | |
472 | | - | |
| 473 | + | |
473 | 474 | | |
474 | 475 | | |
475 | 476 | | |
| |||
488 | 489 | | |
489 | 490 | | |
490 | 491 | | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | 492 | | |
497 | 493 | | |
498 | 494 | | |
499 | 495 | | |
500 | 496 | | |
501 | | - | |
502 | | - | |
503 | | - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
504 | 502 | | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
509 | 518 | | |
510 | 519 | | |
511 | | - | |
512 | 520 | | |
513 | 521 | | |
514 | 522 | | |
| |||
586 | 594 | | |
587 | 595 | | |
588 | 596 | | |
| 597 | + | |
589 | 598 | | |
590 | 599 | | |
591 | 600 | | |
| |||
595 | 604 | | |
596 | 605 | | |
597 | 606 | | |
| 607 | + | |
598 | 608 | | |
599 | 609 | | |
600 | 610 | | |
601 | 611 | | |
602 | 612 | | |
| 613 | + | |
603 | 614 | | |
604 | 615 | | |
605 | 616 | | |
| |||
0 commit comments