ASoC: Intel: Skylake: Parse nhlt and register clock device
authorSriram Periyasamy <sriramx.periyasamy@intel.com>
Wed, 22 Nov 2017 12:09:46 +0000 (17:39 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 29 Nov 2017 15:39:47 +0000 (15:39 +0000)
commitbc2bd45b1f7f35b80335367f682c0ae5b2f37911
tree0fd5a69c3c1a8431ae72c2c00b7d69e568a4f331
parent38a5882e4292d135cebabad0b56c9420dfdd80a5
ASoC: Intel: Skylake: Parse nhlt and register clock device

When NHLT endpoint is present for a SSP then we create clock for that SSP.

MCLK is consistent across endpoints and configuration for an SSP, so query
only for first endpoint for an SSP.

For SCLK/SCLKFS, the best fit is queried from the NHLT configurations which
matches the clock rate requested. Best fit is decided based on below:

1. If rate matches with multiple configurations, then the first
   configuration is selected.

2. If for a selected fs and bits_per_sample, there are multiple endpoint
   configuration match, then the configuration with max number of
   channels is selected. So, the user has to set the rate which fits
   max number of channels

So we create a platform device and pass clock information parsed as
platform data.

Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com>
Signed-off-by: Jaikrishna Nemallapudi <jaikrishnax.nemallapudi@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-i2s.h [new file with mode: 0644]
sound/soc/intel/skylake/skl-nhlt.c
sound/soc/intel/skylake/skl-ssp-clk.h [new file with mode: 0644]
sound/soc/intel/skylake/skl.c
sound/soc/intel/skylake/skl.h