Sugar Zhang a67a9be17e ASoC: rockchip: sai: Add support for clk compensation
This patch introduces a method to handle clk drift and compensation.

e.g:

&sai0 {
	rockchip,mclk-calibrate;
	clocks = <&cru MCLK_SAI0>, <&cru HCLK_SAI0>, <&cru PLL_HPLL>;
	clock-names = "mclk", "hclk", "mclk_root";
};

/# amixer -c 0 controls | grep PPM
numid=1,iface=PCM,name='SAI0 PCM Clk Compensation In PPM'

/# amixer -c 0 cget numid=1
numid=1,iface=PCM,name='SAI0 PCM Clk Compensation In PPM'
; type=INTEGER,access=rw------,values=1,min=-1000,max=1000,step=1
: values=0

/# arecord -D hw:0,0 --period-size=1024 --buffer-size=4096 -r
16000 -c 2 -f s16_le /dev/zero &

/# amixer -- cset numid=1 -10
numid=1,iface=PCM,name='SAI0 PCM Clk Compensation In PPM'
; type=INTEGER,access=rw------,values=1,min=-1000,max=1000,step=1
: values=-10

/# amixer -- cset numid=1 10
numid=1,iface=PCM,name='SAI0 PCM Clk Compensation In PPM'
; type=INTEGER,access=rw------,values=1,min=-1000,max=1000,step=1
: values=10

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Id4b299052651f7fd291f118edce6ac334002e100
2024-06-20 11:11:12 +08:00
2024-06-17 11:25:35 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2024-01-25 15:27:52 -08:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%