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>
This commit is contained in:
Sudheer Papothi 2016-02-03 01:47:36 +05:30 committed by David Keitel
parent 30ea49ab98
commit f1b365a43b

View file

@ -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);
}