Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3649a615 authored by Meng Wang's avatar Meng Wang Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: Add AV timer changes for MSM targets



Add snapshot of avtimer changes for MSM targets. The code
is migrated from msm-3.18 kernel.

Change-Id: I7f07c6678171dfa83d5080333d57ffaf4e1d3829
Signed-off-by: default avatarSudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: default avatarBanajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: default avatarMeng Wang <mwang@codeaurora.org>
parent c60f1169
Loading
Loading
Loading
Loading
+35 −0
Original line number Original line Diff line number Diff line
* avtimer

Avtimer provides an interface for clients to enable avtimer block
on qdsp6. 64 bit AVtimer exposed by qdsp6 is used for audio and video
stream synchronization during capture and playback usecases.

Required properties:
- reg : physical address and length of avtimer register
- reg-names : AVtimer register name
  Required register resource entries are:
  "avtimer_lsb_addr" : AVtimer lsb physical address
  "avtimer_msb_addr" : AVtimer msb physical address
- compatible : Must be "qcom,avtimer"

Optional properties:
- clk-div : Divisor to divide the ticks value to get msec value.
 If the clock is at 27MHz, the ticks value read from AVTimer
 registers will have to be divided by 27, to achieve the msec value.
- clk-mult : Multiplier to multiply the ticks value in order to avoid
 a floating point operation if the clock is of decimal value.
 E.g. To get msec out of ticks from a 19.2MHz clock source, the ticks
 value will have to be divided by 19.2, which will then become a
 floating point operation. However, to avoid using a floating point
 operation, the msec can be calculated by multiplying ticks with 10
 and dividing the result by 192. i.e. msec = (ticks * 10) / 192;

Example:
	qcom,avtimer@90f7000 {
		compatible = "qcom,avtimer";
		reg = <0x90f700c 0x4>,
		      <0x90f7010 0x4>;
		reg-names = "avtimer_lsb_addr", "avtimer_msb_addr";
		qcom,clk-div = <27>;
		qcom,clk-mult = <10>;
	};