diff options
author | Mark Brown <broonie@kernel.org> | 2020-05-12 16:12:47 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-05-12 16:12:47 +0100 |
commit | 132a0eb0324025bb4691ee590996dbe302159298 (patch) | |
tree | e70fcc3c1294f36f184f17b46bd82131cf71b686 /sound/soc/intel | |
parent | 66c705d07d784fb6b4622c6e47b6acae357472db (diff) | |
parent | 74fcfde748b26c68a8ab2791d9d73f698f7752d1 (diff) | |
download | linux-stable-132a0eb0324025bb4691ee590996dbe302159298.tar.gz linux-stable-132a0eb0324025bb4691ee590996dbe302159298.tar.bz2 linux-stable-132a0eb0324025bb4691ee590996dbe302159298.zip |
Merge branch 'for-5.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.8
Diffstat (limited to 'sound/soc/intel')
-rw-r--r-- | sound/soc/intel/baytrail/sst-baytrail-ipc.c | 4 | ||||
-rw-r--r-- | sound/soc/intel/boards/broadwell.c | 17 | ||||
-rw-r--r-- | sound/soc/intel/common/sst-dsp.c | 9 |
3 files changed, 21 insertions, 9 deletions
diff --git a/sound/soc/intel/baytrail/sst-baytrail-ipc.c b/sound/soc/intel/baytrail/sst-baytrail-ipc.c index 74274bd38f7a..34746fd871b0 100644 --- a/sound/soc/intel/baytrail/sst-baytrail-ipc.c +++ b/sound/soc/intel/baytrail/sst-baytrail-ipc.c @@ -666,8 +666,8 @@ static bool byt_is_dsp_busy(struct sst_dsp *dsp) { u64 ipcx; - ipcx = sst_dsp_shim_read_unlocked(dsp, SST_IPCX); - return (ipcx & (SST_IPCX_BUSY | SST_IPCX_DONE)); + ipcx = sst_dsp_shim_read64_unlocked(dsp, SST_IPCX); + return (ipcx & (SST_BYT_IPCX_BUSY | SST_BYT_IPCX_DONE)); } int sst_byt_dsp_init(struct device *dev, struct sst_pdata *pdata) diff --git a/sound/soc/intel/boards/broadwell.c b/sound/soc/intel/boards/broadwell.c index 07b2cfdadaeb..42f8723beef2 100644 --- a/sound/soc/intel/boards/broadwell.c +++ b/sound/soc/intel/boards/broadwell.c @@ -256,7 +256,8 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = { }, }; -static int broadwell_suspend(struct snd_soc_card *card){ +static int broadwell_disable_jack(struct snd_soc_card *card) +{ struct snd_soc_component *component; for_each_card_components(card, component) { @@ -267,9 +268,15 @@ static int broadwell_suspend(struct snd_soc_card *card){ break; } } + return 0; } +static int broadwell_suspend(struct snd_soc_card *card) +{ + return broadwell_disable_jack(card); +} + static int broadwell_resume(struct snd_soc_card *card){ struct snd_soc_component *component; @@ -318,8 +325,16 @@ static int broadwell_audio_probe(struct platform_device *pdev) return devm_snd_soc_register_card(&pdev->dev, &broadwell_rt286); } +static int broadwell_audio_remove(struct platform_device *pdev) +{ + struct snd_soc_card *card = platform_get_drvdata(pdev); + + return broadwell_disable_jack(card); +} + static struct platform_driver broadwell_audio = { .probe = broadwell_audio_probe, + .remove = broadwell_audio_remove, .driver = { .name = "broadwell-audio", }, diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c index ec66be269b69..36c077aa386e 100644 --- a/sound/soc/intel/common/sst-dsp.c +++ b/sound/soc/intel/common/sst-dsp.c @@ -10,7 +10,7 @@ #include <linux/interrupt.h> #include <linux/module.h> #include <linux/platform_device.h> -#include <linux/io.h> +#include <linux/io-64-nonatomic-lo-hi.h> #include <linux/delay.h> #include "sst-dsp.h" @@ -34,16 +34,13 @@ EXPORT_SYMBOL_GPL(sst_shim32_read); void sst_shim32_write64(void __iomem *addr, u32 offset, u64 value) { - memcpy_toio(addr + offset, &value, sizeof(value)); + writeq(value, addr + offset); } EXPORT_SYMBOL_GPL(sst_shim32_write64); u64 sst_shim32_read64(void __iomem *addr, u32 offset) { - u64 val; - - memcpy_fromio(&val, addr + offset, sizeof(val)); - return val; + return readq(addr + offset); } EXPORT_SYMBOL_GPL(sst_shim32_read64); |