ASoC: fsl_sai: add sai master mode support
authorZidan Wang <[email protected]>
Mon, 11 May 2015 10:24:41 +0000 (18:24 +0800)
committerMark Brown <[email protected]>
Tue, 12 May 2015 18:43:51 +0000 (19:43 +0100)
commitc3ecef21c3f26bf4737fc0887964127accfa8a0e
treeab1286cbed64158c8ab405885bd0c5bf444ab953
parentb787f68c36d49bb1d9236f403813641efa74a031
ASoC: fsl_sai: add sai master mode support

When sai works on master mode, set its bit clock and frame clock.

SAI has 4 MCLK source, bus clock, MCLK1, MCLK2 and MCLK3. fsl_sai_set_bclk
will select proper MCLK source, then calculate and set the bit clock divider.

After fsl_sai_set_bclk, enable the selected mclk in hw_params(), and add
hw_free() to disable the mclk.

Signed-off-by: Zidan Wang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
sound/soc/fsl/fsl_sai.c
sound/soc/fsl/fsl_sai.h