Merge "ASoC: shima: Resolve noise during amic record"

This commit is contained in:
qctecmdr
2020-09-03 18:06:22 -07:00
committed by Gerrit - the friendly Code Review server
2 changed files with 20 additions and 3 deletions

View File

@@ -53,8 +53,8 @@ static struct port_params tx_frame_params_default[SWR_MSTR_PORT_LEN] = {
/* TX UC1: TX1: 1ch, TX2: 2chs, TX3: 1ch(MBHC) */ /* TX UC1: TX1: 1ch, TX2: 2chs, TX3: 1ch(MBHC) */
static struct port_params tx_frame_params_shima[SWR_MSTR_PORT_LEN] = { static struct port_params tx_frame_params_shima[SWR_MSTR_PORT_LEN] = {
{3, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX1 */ {3, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0x00, 0x00}, /* TX1 */
{3, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0x00, 0x00}, /* TX2 */ {3, 2, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX2 */
{7, 2, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */ {7, 2, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */
}; };
@@ -71,6 +71,21 @@ static struct port_params tx_frame_params_0p6MHz[SWR_MSTR_PORT_LEN] = {
{1, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX2 */ {1, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX2 */
{1, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */ {1, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */
}; };
/* 4.8 MHz clock */
static struct port_params tx_frame_params_shima_4p8MHz[SWR_MSTR_PORT_LEN] = {
{3, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0x00, 0x00}, /* TX1 */
{3, 2, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX2 */
{7, 2, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */
};
/* 0.6 MHz clock */
static struct port_params tx_frame_params_shima_0p6MHz[SWR_MSTR_PORT_LEN] = {
{1, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX1 */
{1, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX2 */
{1, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */
};
static struct swr_mstr_port_map sm_port_map[] = { static struct swr_mstr_port_map sm_port_map[] = {
{TX_MACRO, SWR_UC0, tx_frame_params_default}, {TX_MACRO, SWR_UC0, tx_frame_params_default},
{TX_MACRO, SWR_UC1, tx_frame_params_4p8MHz}, {TX_MACRO, SWR_UC1, tx_frame_params_4p8MHz},
@@ -82,6 +97,8 @@ static struct swr_mstr_port_map sm_port_map[] = {
static struct swr_mstr_port_map sm_port_map_shima[] = { static struct swr_mstr_port_map sm_port_map_shima[] = {
{TX_MACRO, SWR_UC0, tx_frame_params_shima}, {TX_MACRO, SWR_UC0, tx_frame_params_shima},
{TX_MACRO, SWR_UC1, tx_frame_params_shima_4p8MHz},
{TX_MACRO, SWR_UC2, tx_frame_params_shima_0p6MHz},
{RX_MACRO, SWR_UC0, rx_frame_params_default}, {RX_MACRO, SWR_UC0, rx_frame_params_default},
{RX_MACRO, SWR_UC1, rx_frame_params_dsd}, {RX_MACRO, SWR_UC1, rx_frame_params_dsd},
{WSA_MACRO, SWR_UC0, wsa_frame_params_default}, {WSA_MACRO, SWR_UC0, wsa_frame_params_default},

View File

@@ -7733,7 +7733,7 @@ static int msm_rx_tx_codec_init(struct snd_soc_pcm_runtime *rtd)
card = rtd->card->snd_card; card = rtd->card->snd_card;
if (strnstr(rtd->card->name, "shima", 5) != NULL) if (strnstr(rtd->card->name, "shima", strlen(rtd->card->name)) != NULL)
bolero_set_port_map(component, ARRAY_SIZE(sm_port_map_shima), bolero_set_port_map(component, ARRAY_SIZE(sm_port_map_shima),
sm_port_map_shima); sm_port_map_shima);
else else