summaryrefslogtreecommitdiff
path: root/taia.c
blob: 4d02dd9fbdd4f65ef439f6be1895151ff476510d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdbool.h>

#include "taia.h"

static const struct taia tolerance_taia = {
	.sec.x = 0,
	.nano = 700000000ULL,
	.atto = 0,
};

bool taia_looks_good(struct taia *arr_taia, struct taia *pkt_taia)
{
	bool good = false;
	struct taia tmp;

	if (taia_less(arr_taia, pkt_taia)) {
		taia_sub(&tmp, pkt_taia, arr_taia);
		if (taia_less(&tmp, &tolerance_taia))
			good = true;
	} else {
		taia_sub(&tmp, arr_taia, pkt_taia);
		if (taia_less(&tmp, &tolerance_taia))
			good = true;
	}

	return good;
}
authorMans Rullgard <mans@mansr.com>2016-01-25 12:36:43 +0000 committerMark Brown <broonie@kernel.org>2016-01-25 15:50:05 +0000 commit51b2bb3f2568e6d9d81a001d38b8d70c2ba4af99 (patch) tree109b339a097cc34446f01b63119fbce9c5906450 /Documentation/i2c parent92e963f50fc74041b5e9e744c330dca48e04f08d (diff)
ASoC: wm8974: configure pll and mclk divider automatically
This adds a set_sysclk() DAI op so the card driver can set the input clock frequency. If this is done, the pll and mclk divider are configured to produce the required 256x fs clock when the sample rate is set by hw_params(). These additions make the codec work with the simple-card driver. Card drivers calling set_pll() and set_clkdiv() directly are unaffected. Signed-off-by: Mans Rullgard <mans@mansr.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/i2c')