asoc: wsa883x: Fix speaker noise issue
Soundwire port is misconfigured and causing noise issue randomly. Ensure reset and powerup WSA speaker amp for every usecase. Change-Id: I857ff2939900ab60ec7208554e340d7d2c693fa9 Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:
1 parent
2aa9fadab4
commit
be581c2cec
1 file changed
+42
@@ -1264,6 +1264,19 @@ static int wsa883x_swr_up(struct wsa883x_priv *wsa883x)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int wsa883x_swr_device_up(struct swr_device *pdev)
|
||||
{
|
||||
struct wsa883x_priv *wsa883x;
|
||||
|
||||
wsa883x = swr_get_dev_data(pdev);
|
||||
if (!wsa883x) {
|
||||
dev_err(&pdev->dev, "%s: wsa883x is NULL\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
wsa883x_swr_up(wsa883x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wsa883x_swr_down(struct wsa883x_priv *wsa883x)
|
||||
{
|
||||
int ret;
|
||||
@@ -1275,6 +1288,19 @@ static int wsa883x_swr_down(struct wsa883x_priv *wsa883x)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int wsa883x_swr_device_down(struct swr_device *pdev)
|
||||
{
|
||||
struct wsa883x_priv *wsa883x;
|
||||
|
||||
wsa883x = swr_get_dev_data(pdev);
|
||||
if (!wsa883x) {
|
||||
dev_err(&pdev->dev, "%s: wsa883x is NULL\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
wsa883x_swr_down(wsa883x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wsa883x_swr_reset(struct wsa883x_priv *wsa883x)
|
||||
{
|
||||
u8 retry = WSA883X_NUM_RETRY;
|
||||
@@ -1292,6 +1318,19 @@ static int wsa883x_swr_reset(struct wsa883x_priv *wsa883x)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wsa883x_swr_device_reset(struct swr_device *pdev)
|
||||
{
|
||||
struct wsa883x_priv *wsa883x;
|
||||
|
||||
wsa883x = swr_get_dev_data(pdev);
|
||||
if (!wsa883x) {
|
||||
dev_err(&pdev->dev, "%s: wsa883x is NULL\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
wsa883x_swr_reset(wsa883x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wsa883x_event_notify(struct notifier_block *nb,
|
||||
unsigned long val, void *ptr)
|
||||
{
|
||||
@@ -1670,6 +1709,9 @@ static struct swr_driver wsa883x_swr_driver = {
|
||||
.probe = wsa883x_swr_probe,
|
||||
.remove = wsa883x_swr_remove,
|
||||
.id_table = wsa883x_swr_id,
|
||||
.device_up = wsa883x_swr_device_up,
|
||||
.device_down = wsa883x_swr_device_down,
|
||||
.reset_device = wsa883x_swr_device_reset,
|
||||
};
|
||||
|
||||
static int __init wsa883x_swr_init(void)
|
||||
|
||||
Reference in new issue
Block a user