diff options
author | Sanyog Kale <sanyog.r.kale@intel.com> | 2018-04-26 18:38:33 +0530 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2018-05-11 21:47:06 +0530 |
commit | 5c3eb9f7bdf1f141e051605b7b4225b1e83820a2 (patch) | |
tree | 55a8ad571469dcb5905d8c09f32610727e589fde /drivers/soundwire/bus.c | |
parent | 99b8a5d608a64254f22483f6b67a98f26d3eac8c (diff) |
soundwire: Add stream configuration APIs
Add APIs for prepare, enable, disable and de-prepare stream.
Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com>
Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/bus.c')
-rw-r--r-- | drivers/soundwire/bus.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 084bf71b2b87..dcc0ff9f0c22 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -17,6 +17,7 @@ */ int sdw_add_bus_master(struct sdw_bus *bus) { + struct sdw_master_prop *prop = NULL; int ret; if (!bus->dev) { @@ -79,9 +80,17 @@ int sdw_add_bus_master(struct sdw_bus *bus) } /* + * Initialize clock values based on Master properties. The max + * frequency is read from max_freq property. Current assumption + * is that the bus will start at highest clock frequency when + * powered on. + * * Default active bank will be 0 as out of reset the Slaves have * to start with bank 0 (Table 40 of Spec) */ + prop = &bus->prop; + bus->params.max_dr_freq = prop->max_freq * SDW_DOUBLE_RATE_FACTOR; + bus->params.curr_dr_freq = bus->params.max_dr_freq; bus->params.curr_bank = SDW_BANK0; bus->params.next_bank = SDW_BANK1; |