From f1b365a43ba4aac035f17552c76df0869cf58d53 Mon Sep 17 00:00:00 2001 From: Sudheer Papothi Date: Wed, 3 Feb 2016 01:47:36 +0530 Subject: [PATCH] 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 --- drivers/soundwire/swr-wcd-ctrl.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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); }