asoc: wcd939x: add support to update power modes on wcd-usbss
Get the wcd939x power mode of from mixer ctls and configure same power mode to wcd-usbss. Change-Id: I9dc8fe586f7e7608da542b0986bb7c605fc552d4 Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
This commit is contained in:

committato da
Gerrit - the friendly Code Review server

parent
eca579a553
commit
2a86f48992
@@ -29,6 +29,9 @@
|
||||
#include "asoc/bolero-slave-internal.h"
|
||||
#include "wcd939x-reg-masks.h"
|
||||
#include "wcd939x-reg-shifts.h"
|
||||
#if IS_ENABLED(CONFIG_QCOM_WCD_USBSS_I2C)
|
||||
#include <linux/soc/qcom/wcd939x-i2c.h>
|
||||
#endif
|
||||
|
||||
|
||||
#define NUM_SWRS_DT_PARAMS 5
|
||||
@@ -3116,6 +3119,22 @@ static int wcd939x_rx_hph_mode_put(struct snd_kcontrol *kcontrol,
|
||||
mode_val = CLS_H_ULP;
|
||||
}
|
||||
wcd939x->hph_mode = mode_val;
|
||||
|
||||
switch (mode_val) {
|
||||
case CLS_H_HIFI:
|
||||
case CLS_H_LOHIFI:
|
||||
mode_val = 0x4;
|
||||
break;
|
||||
default:
|
||||
/* set default mode to ULP */
|
||||
mode_val = 0x2;
|
||||
break;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_QCOM_WCD_USBSS_I2C)
|
||||
wcd_usbss_audio_config(NULL, WCD_USBSS_CONFIG_TYPE_POWER_MODE, mode_val);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Fai riferimento in un nuovo problema
Block a user