FROMGIT: ASoC: da7219: Add recalc_rate function to return DAI clock rate

By making MCLK parent of DAI clocks, when querying the rate of the
clock the rate returned is now given from the parent clock so
gives the MCLK rate rather than 0 as previously returned. This is
a bit misleading, and actually there's no major reason why we can't
at least return the DAI WCLK rate, as set in HW, so that's what we
now do.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit a58943abcb08cfbe6c36648602d796c5834ee8a9
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git)
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>

BUG=b:119926436
TEST=cras_test_client --capture_f <file> --duration_seconds 1
	cras_test_client --playback_f <file>
	=> No "pop" or "bo" sound at start of capture.

Change-Id: If2839b994e8c6dac9f142483c0990f652da523a9
Reviewed-on: https://chromium-review.googlesource.com/1404656
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Akshu Agrawal <akshu.agrawal@amd.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1446574
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
2 files changed