summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2020-08-23 00:20:52 +0300
committerMichael Bestas <mkbestas@lineageos.org>2020-08-23 00:20:52 +0300
commit3cc2d2aa8574a94aca65ac664c3a0fb23d930700 (patch)
tree0632ac13a4a41364069b5bee86953579123c5b46 /sound
parent81d0e1715dc7ad78d029cfafc6810bbb90281247 (diff)
parentadec4f93e1705640e7b03d33394224ff5d835280 (diff)
Merge tag 'LA.UM.8.4.r1-05900-8x98.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4 into lineage-17.1-caf-msm8998
* tag 'LA.UM.8.4.r1-05900-8x98.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4: msm: kgsl: Mark the scratch buffer as privileged power: qcom: Add the QPNP QGAUGE (QG) headers msm: ipa: update msm_ipa.h with latest IPA versions constants nl80211: add NL80211_CMD_UPDATE_FT_IES to supported commands msm: mdss: hdmi: proper error logging ASoC: Fix warnings and errors with llvm sdm660_cdc: Reset cache_only mode for non SSR scenario include: Fix for compilation issue Makefile: Suppress few warnings with clang kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS kbuild: initialize CLANG_FLAGS correctly in the top Makefile kbuild: consolidate Clang compiler flags kbuild: add -no-integrated-as Clang option unconditionally power: qpnp-fg-gen3: Fix warning with llvm lkdtm: Fix warning with llvm AndroidKernel: Explicitly mark certain targets as phony dsp: q6asm: Change to increase asm sessions allowed dsp: q6adm: Channel map configuration for multi-channel defconfig: Create symbolic link for arm64 defconfigs scripts/build-all: remove pattern-based defconfig detection scripts/build-all: look for nested vendor/ defconfig directories scripts/build-all: remove all defconfig manipulation options scripts: build-all.py: update regex to compile all defconfigs scripts: build-all.py: append llvm to the config file scripts: Clean up the gcc-wrapper white list scripts: set clang as REAL_CC to support LLVM by default defconfig: auto: remove auto defconfigs vgacon: Fix a UAF in vgacon_invert_region soc: qcom: Reset string table index for each dump collection request msm: adsprpc: Fix array index underflow problem ath10k: remove unnecessary code drm/msm/dsi: use correct enum in dsi_get_cmd_fmt btrfs: Remove extra parentheses from condition in copy_items() do_last(): fetch directory ->i_mode and ->i_uid before it's too late Conflicts: fs/namei.c scripts/gcc-wrapper.py Change-Id: Icfb78abcc0f2cf980b5c0ceaf40f108038b1b527
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/sdm660_cdc/msm-digital-cdc.c15
-rw-r--r--sound/soc/codecs/sdm660_cdc/msm-digital-cdc.h3
-rw-r--r--sound/soc/codecs/wcd_cpe_core.c6
-rw-r--r--sound/soc/codecs/wsa881x.c6
-rw-r--r--sound/soc/msm/qdsp6v2/q6adm.c22
5 files changed, 31 insertions, 21 deletions
diff --git a/sound/soc/codecs/sdm660_cdc/msm-digital-cdc.c b/sound/soc/codecs/sdm660_cdc/msm-digital-cdc.c
index dba4f8b48197..e5f079978398 100644
--- a/sound/soc/codecs/sdm660_cdc/msm-digital-cdc.c
+++ b/sound/soc/codecs/sdm660_cdc/msm-digital-cdc.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2020, 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
@@ -42,6 +42,7 @@
#define DEC_SVA 5
#define MSM_DIG_CDC_VERSION_ENTRY_SIZE 32
+#define ADSP_UP 1
static unsigned long rx_digital_gain_reg[] = {
MSM89XX_CDC_CORE_RX1_VOL_CTL_B2_CTL,
@@ -87,8 +88,13 @@ static int msm_digcdc_clock_control(bool flag)
if (flag) {
mutex_lock(&pdata->cdc_int_mclk0_mutex);
if (atomic_read(&pdata->int_mclk0_enabled) == false) {
- if (msm_dig_cdc->regmap->cache_only == true)
- return ret;
+ if (msm_dig_cdc->regmap->cache_only == true) {
+ if (test_bit(ADSP_UP,
+ &msm_dig_cdc->status_mask))
+ msm_dig_cdc->regmap->cache_only = false;
+ else
+ return ret;
+ }
if (pdata->native_clk_set)
pdata->digital_cdc_core_clk.clk_freq_in_hz =
NATIVE_MCLK_RATE;
@@ -1115,9 +1121,11 @@ static int msm_dig_cdc_event_notify(struct notifier_block *block,
MSM89XX_CDC_CORE_RX2_B3_CTL, 0x80, 0x00);
break;
case DIG_CDC_EVENT_SSR_DOWN:
+ clear_bit(ADSP_UP, &msm_dig_cdc->status_mask);
regcache_cache_only(msm_dig_cdc->regmap, true);
break;
case DIG_CDC_EVENT_SSR_UP:
+ set_bit(ADSP_UP, &msm_dig_cdc->status_mask);
regcache_cache_only(msm_dig_cdc->regmap, false);
regcache_mark_dirty(msm_dig_cdc->regmap);
@@ -2145,6 +2153,7 @@ static int msm_dig_cdc_probe(struct platform_device *pdev)
msm_codec_dais, ARRAY_SIZE(msm_codec_dais));
dev_dbg(&pdev->dev, "%s: registered DIG CODEC 0x%x\n",
__func__, dig_cdc_addr);
+ set_bit(ADSP_UP, &msm_dig_cdc->status_mask);
rtn:
return ret;
}
diff --git a/sound/soc/codecs/sdm660_cdc/msm-digital-cdc.h b/sound/soc/codecs/sdm660_cdc/msm-digital-cdc.h
index cbb8a8138db8..ab470de460ea 100644
--- a/sound/soc/codecs/sdm660_cdc/msm-digital-cdc.h
+++ b/sound/soc/codecs/sdm660_cdc/msm-digital-cdc.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2016-2017, 2020 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
@@ -62,6 +62,7 @@ struct msm_dig_priv {
struct notifier_block *nblock,
bool enable);
struct tx_mute_work tx_mute_dwork[NUM_DECIMATORS];
+ unsigned long status_mask;
};
struct dig_ctrl_platform_data {
diff --git a/sound/soc/codecs/wcd_cpe_core.c b/sound/soc/codecs/wcd_cpe_core.c
index 337c25f869d6..a4ef63bcd32e 100644
--- a/sound/soc/codecs/wcd_cpe_core.c
+++ b/sound/soc/codecs/wcd_cpe_core.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2018,2020 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
@@ -1987,8 +1987,8 @@ struct wcd_cpe_core *wcd_cpe_init(const char *img_fname,
}
card = codec->component.card->snd_card;
- snprintf(proc_name, (sizeof("cpe") + sizeof("_state") +
- sizeof(id) - 2), "%s%d%s", cpe_name, id, state_name);
+ snprintf(proc_name, sizeof(proc_name), "%s%d%s", cpe_name, id,
+ state_name);
entry = snd_info_create_card_entry(card, proc_name,
card->proc_root);
if (entry) {
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c
index 0c672fd89652..df2b5ff24054 100644
--- a/sound/soc/codecs/wsa881x.c
+++ b/sound/soc/codecs/wsa881x.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2018,2020 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
@@ -362,8 +362,8 @@ static ssize_t wsa881x_swrslave_reg_show(char __user *ubuf, size_t count,
continue;
swr_read(dbgwsa881x->swr_slave, devnum,
i, &reg_val, 1);
- len = snprintf(tmp_buf, 25, "0x%.3x: 0x%.2x\n", i,
- (reg_val & 0xFF));
+ len = snprintf(tmp_buf, sizeof(tmp_buf), "0x%.3x: 0x%.2x\n",
+ i, (reg_val & 0xFF));
if ((total + len) >= count - 1)
break;
if (copy_to_user((ubuf + total), tmp_buf, len)) {
diff --git a/sound/soc/msm/qdsp6v2/q6adm.c b/sound/soc/msm/qdsp6v2/q6adm.c
index dc7165263316..b40710cf3f45 100644
--- a/sound/soc/msm/qdsp6v2/q6adm.c
+++ b/sound/soc/msm/qdsp6v2/q6adm.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2020, 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
@@ -2423,8 +2423,8 @@ static int adm_arrange_mch_map_v8(
} else if (channel_mode == 6) {
ep_payload->dev_channel_mapping[0] = PCM_CHANNEL_FL;
ep_payload->dev_channel_mapping[1] = PCM_CHANNEL_FR;
- ep_payload->dev_channel_mapping[2] = PCM_CHANNEL_LFE;
- ep_payload->dev_channel_mapping[3] = PCM_CHANNEL_FC;
+ ep_payload->dev_channel_mapping[2] = PCM_CHANNEL_FC;
+ ep_payload->dev_channel_mapping[3] = PCM_CHANNEL_LFE;
ep_payload->dev_channel_mapping[4] = PCM_CHANNEL_LS;
ep_payload->dev_channel_mapping[5] = PCM_CHANNEL_RS;
} else if (channel_mode == 7) {
@@ -2432,18 +2432,18 @@ static int adm_arrange_mch_map_v8(
ep_payload->dev_channel_mapping[1] = PCM_CHANNEL_FR;
ep_payload->dev_channel_mapping[2] = PCM_CHANNEL_FC;
ep_payload->dev_channel_mapping[3] = PCM_CHANNEL_LFE;
- ep_payload->dev_channel_mapping[4] = PCM_CHANNEL_LB;
- ep_payload->dev_channel_mapping[5] = PCM_CHANNEL_RB;
+ ep_payload->dev_channel_mapping[4] = PCM_CHANNEL_LS;
+ ep_payload->dev_channel_mapping[5] = PCM_CHANNEL_RS;
ep_payload->dev_channel_mapping[6] = PCM_CHANNEL_CS;
} else if (channel_mode == 8) {
ep_payload->dev_channel_mapping[0] = PCM_CHANNEL_FL;
ep_payload->dev_channel_mapping[1] = PCM_CHANNEL_FR;
- ep_payload->dev_channel_mapping[2] = PCM_CHANNEL_LFE;
- ep_payload->dev_channel_mapping[3] = PCM_CHANNEL_FC;
- ep_payload->dev_channel_mapping[4] = PCM_CHANNEL_LS;
- ep_payload->dev_channel_mapping[5] = PCM_CHANNEL_RS;
- ep_payload->dev_channel_mapping[6] = PCM_CHANNEL_LB;
- ep_payload->dev_channel_mapping[7] = PCM_CHANNEL_RB;
+ ep_payload->dev_channel_mapping[2] = PCM_CHANNEL_FC;
+ ep_payload->dev_channel_mapping[3] = PCM_CHANNEL_LFE;
+ ep_payload->dev_channel_mapping[4] = PCM_CHANNEL_LB;
+ ep_payload->dev_channel_mapping[5] = PCM_CHANNEL_RB;
+ ep_payload->dev_channel_mapping[6] = PCM_CHANNEL_LS;
+ ep_payload->dev_channel_mapping[7] = PCM_CHANNEL_RS;
} else if (channel_mode == 10) {
ep_payload->dev_channel_mapping[0] = PCM_CHANNEL_FL;
ep_payload->dev_channel_mapping[1] = PCM_CHANNEL_FR;