diff --git a/device/testing/linux-amazon-biscuit/APKBUILD b/device/testing/linux-amazon-biscuit/APKBUILD index 3816b74d2..db1c9bab3 100644 --- a/device/testing/linux-amazon-biscuit/APKBUILD +++ b/device/testing/linux-amazon-biscuit/APKBUILD @@ -3,7 +3,7 @@ pkgname=linux-amazon-biscuit pkgver=3.18.19 -pkgrel=0 +pkgrel=1 pkgdesc="Amazon Echo Dot (2nd gen) kernel fork" arch="armv7" _carch="arm" @@ -44,6 +44,7 @@ source=" replace-missing-code-from-mainline.patch replace-solaris-style-directive.patch x509-certificate-list.patch + biscuit-remove-dummy-audio-mmap.patch " builddir="$srcdir/$_repository-$_commit" _outdir="out" @@ -73,4 +74,5 @@ f0a0591e0008fa5465f479677112b81ef3dac88c26e0aa358bb504abdb920d3682613dfc51183130 9ae0f1ca06c6084c0577578721968cd4b154d9cb9fb82af3b30732dd4ca2e857cae58c285d0f529e0b2c827f1cc2a12426698065e2d0aab1b23e2208fee70bc5 replace-missing-code-from-mainline.patch a4196e0184b3bb1bc8d0cf4fae931dab623bb9cd02732758bb8ac1d0588682960f58d4dba8ccebb1377e853ca5c135d2a700750228d54ac95a33d1cd44533bca replace-solaris-style-directive.patch 756bfc37c903085bec2e016f146cfc795da5495d8b095124a83f9d92931882ca63c5a1c418016dbcd19a18357c1e783dc7547bb115bb186751615ce9268007f2 x509-certificate-list.patch +99a8649fbeda1a6343e994d65b391c684e0ccfa8c5d7c3f7e584ee16bfc98e1b7dcca359fd6541f341f54f883708a8bc69a50fde459fedf05ad6ea5ab133bfc9 biscuit-remove-dummy-audio-mmap.patch " diff --git a/device/testing/linux-amazon-biscuit/biscuit-remove-dummy-audio-mmap.patch b/device/testing/linux-amazon-biscuit/biscuit-remove-dummy-audio-mmap.patch new file mode 100644 index 000000000..1ecc1dc3f --- /dev/null +++ b/device/testing/linux-amazon-biscuit/biscuit-remove-dummy-audio-mmap.patch @@ -0,0 +1,49 @@ +remove mmap capability from amazon mt8163 pcm audio driver + +For reasons known only to MediaTek, the pcm driver used by most amazon devices +of this era provide a fake zero page address whenever a mmap is attempted. +Naturally, this causes a kernel panic when an audio server like pulseaudio +attempts to mmap the sound device using the fake address. Remove this dummy +page function and remove mmap flags from the driver description so pulse +handles the device correctly. + +Verified on amazon-biscuit (Echo Dot 2G) but may also apply to other MT8163 +devices like karnak and douglas. MT8127 devices like ford appear to pull this +dummy page trick as well, so a modified patch may work there. +diff --git a/sound/soc/mediatek/mt_soc_audio_8163_amzn/mt_soc_pcm_dl1_i2s0Dl1.c b/sound/soc/mediatek/mt_soc_audio_8163_amzn/mt_soc_pcm_dl1_i2s0Dl1.c +index b68f2fa..afaaba8 100644 +--- a/sound/soc/mediatek/mt_soc_audio_8163_amzn/mt_soc_pcm_dl1_i2s0Dl1.c ++++ b/sound/soc/mediatek/mt_soc_audio_8163_amzn/mt_soc_pcm_dl1_i2s0Dl1.c +@@ -124,8 +124,7 @@ static const struct snd_kcontrol_new Audio_snd_I2S0dl1_controls[] = { + + static struct snd_pcm_hardware mtk_I2S0dl1_hardware = { + +- .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | +- SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_MMAP_VALID), ++ .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_RESUME), + .formats = SND_SOC_ADV_MT_FMTS, + .rates = SOC_HIGH_USE_RATE, + .rate_min = SOC_HIGH_USE_RATE_MIN, +@@ -888,14 +887,6 @@ static int mtk_pcm_I2S0dl1_silence(struct snd_pcm_substream *substream, + return 0; + } + +-static void *dummy_page[2]; +- +-static struct page *mtk_I2S0dl1_pcm_page(struct snd_pcm_substream *substream, unsigned long offset) +-{ +- pr_debug("%s\n", __func__); +- return virt_to_page(dummy_page[substream->stream]); /* the same page */ +-} +- + static struct snd_pcm_ops mtk_I2S0dl1_ops = { + + .open = mtk_pcm_I2S0dl1_open, +@@ -908,7 +899,6 @@ static struct snd_pcm_ops mtk_I2S0dl1_ops = { + .pointer = mtk_pcm_I2S0dl1_pointer, + .copy = mtk_pcm_I2S0dl1_copy, + .silence = mtk_pcm_I2S0dl1_silence, +- .page = mtk_I2S0dl1_pcm_page, + }; + + static struct snd_soc_platform_driver mtk_I2S0dl1_soc_platform = {