summaryrefslogtreecommitdiff
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorSudheer Papothi <spapothi@codeaurora.org>2016-02-03 01:47:36 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:19:50 -0700
commitf1b365a43ba4aac035f17552c76df0869cf58d53 (patch)
tree94d1c0b330d73aca85e90e58de36625f1ddc72a0 /drivers/soundwire
parent30ea49ab98001eedd54fd4f57ae080331861cad7 (diff)
soundwire: set the group id based on number of channels
Set the group id to default when number of channels are less than or equal to one. This change will configure the group id correctly during device switch scenarios. CRs-Fixed: 961023 Change-Id: I2cb4447b36fef111ed1f9b8991b3882b8d57f6a7 Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/swr-wcd-ctrl.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/soundwire/swr-wcd-ctrl.c b/drivers/soundwire/swr-wcd-ctrl.c
index 7c5ded243fff..05a249b4e074 100644
--- a/drivers/soundwire/swr-wcd-ctrl.c
+++ b/drivers/soundwire/swr-wcd-ctrl.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1484,6 +1484,16 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data)
"%s: set num ch failed\n",
__func__);
}
+ } else {
+ list_for_each_entry(swr_dev, &mstr->devices,
+ dev_list) {
+ ret = swr_set_device_group(swr_dev,
+ SWR_GROUP_NONE);
+ if (ret)
+ dev_err(swrm->dev,
+ "%s: set num ch failed\n",
+ __func__);
+ }
}
mutex_unlock(&swrm->mlock);
}