diff options
author | graysky | 2021-09-22 20:12:07 -0400 |
---|---|---|
committer | graysky | 2021-09-22 20:12:07 -0400 |
commit | df318ab1b01591e475d823fc1b47d2646a9c5204 (patch) | |
tree | 1a0dcae3b7286387a384a0f22e9241ceb427c7d5 | |
parent | 7e796cd4418da11e84cf18ee0ec8e6ca40dc7de4 (diff) | |
download | aur-df318ab1b01591e475d823fc1b47d2646a9c5204.tar.gz |
Update to 5.14.7-1
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch | 10 | ||||
-rw-r--r-- | 0002-SUNRPC-don-t-pause-on-incomplete-allocation.patch | 4 | ||||
-rw-r--r-- | 0003-Bluetooth-btusb-Add-support-for-IMC-Networks-Mediate.patch | 79 | ||||
-rw-r--r-- | 0004-Bluetooth-btusb-Add-support-for-Foxconn-Mediatek-Chi.patch | 71 | ||||
-rw-r--r-- | 0005-ALSA-pcm-Check-mmap-capability-of-runtime-dma-buffer.patch | 64 | ||||
-rw-r--r-- | 0006-ALSA-pci-rme-Set-up-buffer-type-properly.patch | 75 | ||||
-rw-r--r-- | 0007-ALSA-pci-cs46xx-Fix-set-up-buffer-type-properly.patch | 95 | ||||
-rw-r--r-- | PKGBUILD | 18 |
9 files changed, 421 insertions, 17 deletions
@@ -1,5 +1,5 @@ pkgbase = linux-ck - pkgver = 5.14.6 + pkgver = 5.14.7 pkgrel = 1 url = https://wiki.archlinux.org/index.php/Linux-ck arch = x86_64 @@ -12,22 +12,32 @@ pkgbase = linux-ck makedepends = tar makedepends = xz options = !strip - source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.14.6.tar.xz - source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.14.6.tar.sign + source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.14.7.tar.xz + source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.14.7.tar.sign source = config source = more-uarches-20210914.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/20210914.tar.gz source = xanmod-patches-from-ck-e2d48df5def86f498766b22e836a9c2f1bcb3809.tar.gz::https://github.com/xanmod/linux-patches/archive/e2d48df5def86f498766b22e836a9c2f1bcb3809.tar.gz source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch source = 0002-SUNRPC-don-t-pause-on-incomplete-allocation.patch + source = 0003-Bluetooth-btusb-Add-support-for-IMC-Networks-Mediate.patch + source = 0004-Bluetooth-btusb-Add-support-for-Foxconn-Mediatek-Chi.patch + source = 0005-ALSA-pcm-Check-mmap-capability-of-runtime-dma-buffer.patch + source = 0006-ALSA-pci-rme-Set-up-buffer-type-properly.patch + source = 0007-ALSA-pci-cs46xx-Fix-set-up-buffer-type-properly.patch validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886 validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E - b2sums = a60c98265c4e795cb8fad90c57b9237b586423c6c8d6961c2f64db13bc6203925e3e6d79ff8858f32363a45f7f1a463de1014fddf9f4a14216a3d3ba638327d6 + b2sums = 861405cd1333958cb829017b6c1d6692a7256d179a48fad751bb02cd02ba09227ff210d9252c592a99d3820c1fbdcc3a6e133cbed31fdecb68ba9cf27dfc8f78 b2sums = SKIP b2sums = a0f4869294fe26b51f88171b235377df3ab8ad7f93824933f98e7706057419bb9cf2adf31422c0fc654dd07376e375545bc06bd1148666bb638f6640ec281e7b b2sums = d1c083f96f645679c5214e05f906b47f17ac6a8b3dd2faeb219e3ceda3a008e3fe47c4a79b0345978cec5c5e28da9b20727970cf5c788d52c3782dc5b36aa211 b2sums = bd20774ee2c9856601af2c89a3af95c6abc812b71253368090e9c252edcce452f416bfeed54ced0886d401b5a9e1cb72c16ea5f04a72d8ded596c0d083f80e42 - b2sums = 7addf1973ad4284c5313da2f78e91f1ec4693c472c1bf892f377dfce051d62ba4d1adf00d70f5f015206f53d55faa589e076a60401defb4e9632ed04d310e2bc - b2sums = 61e39425d70ec9e4225e21cc10c413c99fc47babe6d6570171f83833ea4b1e51b34050bcf7726db163d78af74eae95a490f6cdd51599769c259230bb96fab901 + b2sums = f16dd5c1ee0147a9a613fd48ffc3767573c380fdd8d7b936e0ba6ee94a53a7461360db9b3b317e995dea890622637067d332778c0042fea906c6c403f3d8a635 + b2sums = fa60bc9d621150a33b5b35b990c4bf917b6caf2c53d5e146bca1dc7abeb42251ff9773db1e6200306d69d2e9dc5c4d0d754f61f521e8eda0062cd4c773a2448d + b2sums = aa66e8b19dac7109a2dca121de8cee3b25332b1dc71b810b7133f3576af9844999034bb3c0a69fa701085a76c158cbe69f82d81965b0b0027029a46100c76bd0 + b2sums = ce6572e8c83d9c5ae7c7fe7d00663fa7719721d0567dc65f232c51794e5c73ca2c579b29a0171832bfdc8d5e92b4dc4f8fd11eec684e127ea55dcc6e94ce70d1 + b2sums = e32c9166d453f462da2270a9219b5c87fef552d67f5ce6adee22b68425ce82436b5c443c8464c3c7d6a20673ba2e8e80851bb5c26812224f4d4622465cc3c81d + b2sums = 3aef2a0b7e2e99efda96f03215ec87ec312eeee9ae207a257c336d5995587f6105cbc1687612b0f869d6a43fefce11598568a2b99a2f1de4d5480c30ec9401b0 + b2sums = ea2af5b7c3e581bfb93175d19e4e9a6ce810b4e1c2d058be683dfbedd19a329441384c26ffd6e38206007ca840f97e552da38d7f36c6fb6b05e5727fb57a873e pkgname = linux-ck pkgdesc = The Linux-ck kernel and modules with ck's hrtimer patches diff --git a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch index ac6a0213ab40..368a06fdaf34 100644 --- a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch +++ b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch @@ -1,7 +1,7 @@ -From 0735052e6d84964f4c9cef57ea619e40d05832ca Mon Sep 17 00:00:00 2001 +From f33efe28389ec4573fdc6e92c40583a395f38f46 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> Date: Mon, 16 Sep 2019 04:53:20 +0200 -Subject: [PATCH 1/3] ZEN: Add sysctl and CONFIG to disallow unprivileged +Subject: [PATCH 1/8] ZEN: Add sysctl and CONFIG to disallow unprivileged CLONE_NEWUSER Our default behavior continues to match the vanilla kernel. @@ -63,7 +63,7 @@ index 55f9f7738ebb..33c6a820ac08 100644 bool "PID Namespaces" default y diff --git a/kernel/fork.c b/kernel/fork.c -index 44f4c2d83763..7d4e04e18eef 100644 +index cbba21e3a58d..7267d46c29ea 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -98,6 +98,10 @@ @@ -77,7 +77,7 @@ index 44f4c2d83763..7d4e04e18eef 100644 #include <asm/pgalloc.h> #include <linux/uaccess.h> #include <asm/mmu_context.h> -@@ -1876,6 +1880,10 @@ static __latent_entropy struct task_struct *copy_process( +@@ -1877,6 +1881,10 @@ static __latent_entropy struct task_struct *copy_process( if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS)) return ERR_PTR(-EINVAL); @@ -88,7 +88,7 @@ index 44f4c2d83763..7d4e04e18eef 100644 /* * Thread groups must share signals as well, and detached threads * can only be started up within the thread group. -@@ -2980,6 +2988,12 @@ int ksys_unshare(unsigned long unshare_flags) +@@ -2981,6 +2989,12 @@ int ksys_unshare(unsigned long unshare_flags) if (unshare_flags & CLONE_NEWNS) unshare_flags |= CLONE_FS; diff --git a/0002-SUNRPC-don-t-pause-on-incomplete-allocation.patch b/0002-SUNRPC-don-t-pause-on-incomplete-allocation.patch index 731e0867921b..1a5bc492a4f8 100644 --- a/0002-SUNRPC-don-t-pause-on-incomplete-allocation.patch +++ b/0002-SUNRPC-don-t-pause-on-incomplete-allocation.patch @@ -1,7 +1,7 @@ -From 7cf57afbcb7a538a94480ff8546d08d4a264464a Mon Sep 17 00:00:00 2001 +From c74596c67f1307dd27a42f39371032dd20f98004 Mon Sep 17 00:00:00 2001 From: NeilBrown <neilb@suse.de> Date: Mon, 30 Aug 2021 08:36:34 +1000 -Subject: [PATCH 2/3] SUNRPC: don't pause on incomplete allocation +Subject: [PATCH 2/8] SUNRPC: don't pause on incomplete allocation alloc_pages_bulk_array() attempts to allocate at least one page based on the provided pages, and then opportunistically allocates more if that diff --git a/0003-Bluetooth-btusb-Add-support-for-IMC-Networks-Mediate.patch b/0003-Bluetooth-btusb-Add-support-for-IMC-Networks-Mediate.patch new file mode 100644 index 000000000000..fbb26622a15a --- /dev/null +++ b/0003-Bluetooth-btusb-Add-support-for-IMC-Networks-Mediate.patch @@ -0,0 +1,79 @@ +From fc1f203e5351121808892c76ff67b9ca3fbef8ef Mon Sep 17 00:00:00 2001 +From: Wai Paulo Valerio Wang <waicool20@gmail.com> +Date: Thu, 8 Jul 2021 04:00:59 +0800 +Subject: [PATCH 3/8] Bluetooth: btusb: Add support for IMC Networks Mediatek + Chip + +This add supports for IMC Networks Wireless_Device Media Chip +which contains the MT7921 chipset. + +$ lsusb + +Bus 001 Device 004: ID 13d3:3563 IMC Networks Wireless_Device + +$ cat /sys/kernel/debug/usb/devices + +T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=03 Dev#= 4 Spd=480 MxCh= 0 +D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 +P: Vendor=13d3 ProdID=3563 Rev= 1.00 +S: Manufacturer=MediaTek Inc. +S: Product=Wireless_Device +S: SerialNumber=000000000 +C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA +A: FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01 +I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=125us +E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms +I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms +I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms +I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms +I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms +I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms +I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms +I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) +E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=125us +E: Ad=0a(O) Atr=03(Int.) MxPS= 64 Ivl=125us +I: If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) +E: Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us +E: Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us + +Signed-off-by: Wai Paulo Valerio Wang <waicool20@gmail.com> +Signed-off-by: Marcel Holtmann <marcel@holtmann.org> +For: https://bugs.archlinux.org/task/72138 +--- + drivers/bluetooth/btusb.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c +index bd37d6fb88c2..e13a510e1698 100644 +--- a/drivers/bluetooth/btusb.c ++++ b/drivers/bluetooth/btusb.c +@@ -414,6 +414,9 @@ static const struct usb_device_id blacklist_table[] = { + { USB_DEVICE(0x04ca, 0x3802), .driver_info = BTUSB_MEDIATEK | + BTUSB_WIDEBAND_SPEECH | + BTUSB_VALID_LE_STATES }, ++ { USB_DEVICE(0x13d3, 0x3563), .driver_info = BTUSB_MEDIATEK | ++ BTUSB_WIDEBAND_SPEECH | ++ BTUSB_VALID_LE_STATES }, + + /* Additional Realtek 8723AE Bluetooth devices */ + { USB_DEVICE(0x0930, 0x021d), .driver_info = BTUSB_REALTEK }, +-- +2.33.0 + diff --git a/0004-Bluetooth-btusb-Add-support-for-Foxconn-Mediatek-Chi.patch b/0004-Bluetooth-btusb-Add-support-for-Foxconn-Mediatek-Chi.patch new file mode 100644 index 000000000000..ee147003c80f --- /dev/null +++ b/0004-Bluetooth-btusb-Add-support-for-Foxconn-Mediatek-Chi.patch @@ -0,0 +1,71 @@ +From 2494b82663e9d45f6350d1d2c089ae2a54dd613b Mon Sep 17 00:00:00 2001 +From: Aaron Ma <aaron.ma@canonical.com> +Date: Fri, 23 Jul 2021 01:17:18 +0800 +Subject: [PATCH 4/8] Bluetooth: btusb: Add support for Foxconn Mediatek Chip + +Add support for another Foxconn / Hon Hai device with MT7921 chip. + +T: Bus=05 Lev=01 Prnt=01 Port=03 Cnt=02 Dev#= 3 Spd=480 MxCh= 0 +D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 +P: Vendor=0489 ProdID=e0cd Rev= 1.00 +S: Manufacturer=MediaTek Inc. +S: Product=Wireless_Device +S: SerialNumber=000000000 +C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA +A: FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01 +I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=125us +E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms +I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms +I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms +I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms +I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms +I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms +I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb +E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms +E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms +I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) +E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=125us +E: Ad=0a(O) Atr=03(Int.) MxPS= 64 Ivl=125us +I: If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) +E: Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us +E: Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us + +Signed-off-by: Aaron Ma <aaron.ma@canonical.com> +Signed-off-by: Marcel Holtmann <marcel@holtmann.org> +For: https://bugs.archlinux.org/task/72138 +--- + drivers/bluetooth/btusb.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c +index e13a510e1698..aac732cc9612 100644 +--- a/drivers/bluetooth/btusb.c ++++ b/drivers/bluetooth/btusb.c +@@ -417,6 +417,9 @@ static const struct usb_device_id blacklist_table[] = { + { USB_DEVICE(0x13d3, 0x3563), .driver_info = BTUSB_MEDIATEK | + BTUSB_WIDEBAND_SPEECH | + BTUSB_VALID_LE_STATES }, ++ { USB_DEVICE(0x0489, 0xe0cd), .driver_info = BTUSB_MEDIATEK | ++ BTUSB_WIDEBAND_SPEECH | ++ BTUSB_VALID_LE_STATES }, + + /* Additional Realtek 8723AE Bluetooth devices */ + { USB_DEVICE(0x0930, 0x021d), .driver_info = BTUSB_REALTEK }, +-- +2.33.0 + diff --git a/0005-ALSA-pcm-Check-mmap-capability-of-runtime-dma-buffer.patch b/0005-ALSA-pcm-Check-mmap-capability-of-runtime-dma-buffer.patch new file mode 100644 index 000000000000..041e13c385b4 --- /dev/null +++ b/0005-ALSA-pcm-Check-mmap-capability-of-runtime-dma-buffer.patch @@ -0,0 +1,64 @@ +From 396a4b3341fc44f1c41157a281e5f0c8008ccdeb Mon Sep 17 00:00:00 2001 +From: Takashi Iwai <tiwai@suse.de> +Date: Mon, 9 Aug 2021 09:18:27 +0200 +Subject: [PATCH 5/8] ALSA: pcm: Check mmap capability of runtime dma buffer at + first + +Currently we check only the substream->dma_buffer as the preset of the +buffer configuration for verifying the availability of mmap. But a +few drivers rather set up the buffer in the own way without the +standard buffer preallocation using substream->dma_buffer, and they +miss the proper checks. (Now it's working more or less fine as most +of them are running only on x86). + +Actually, they may set up the runtime dma_buffer (referred via +snd_pcm_get_dma_buf()) at the open callback, though. That is, this +could have been used as the primary source. + +This patch changes the hw_support_mmap() function to check the runtime +dma buffer at first. It's usually NULL with the standard buffer +preallocation, and in that case, we continue checking +substream->dma_buffer as fallback. + +Signed-off-by: Takashi Iwai <tiwai@suse.de> +Fixes: https://bugs.archlinux.org/task/72059 +--- + sound/core/pcm_native.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c +index 71323d807dbf..dc9fa312fadd 100644 +--- a/sound/core/pcm_native.c ++++ b/sound/core/pcm_native.c +@@ -243,13 +243,18 @@ int snd_pcm_info_user(struct snd_pcm_substream *substream, + + static bool hw_support_mmap(struct snd_pcm_substream *substream) + { ++ struct snd_dma_buffer *dmabuf; ++ + if (!(substream->runtime->hw.info & SNDRV_PCM_INFO_MMAP)) + return false; + + if (substream->ops->mmap || substream->ops->page) + return true; + +- switch (substream->dma_buffer.dev.type) { ++ dmabuf = snd_pcm_get_dma_buf(substream); ++ if (!dmabuf) ++ dmabuf = &substream->dma_buffer; ++ switch (dmabuf->dev.type) { + case SNDRV_DMA_TYPE_UNKNOWN: + /* we can't know the device, so just assume that the driver does + * everything right +@@ -259,7 +264,7 @@ static bool hw_support_mmap(struct snd_pcm_substream *substream) + case SNDRV_DMA_TYPE_VMALLOC: + return true; + default: +- return dma_can_mmap(substream->dma_buffer.dev.dev); ++ return dma_can_mmap(dmabuf->dev.dev); + } + } + +-- +2.33.0 + diff --git a/0006-ALSA-pci-rme-Set-up-buffer-type-properly.patch b/0006-ALSA-pci-rme-Set-up-buffer-type-properly.patch new file mode 100644 index 000000000000..36edf65cb4b2 --- /dev/null +++ b/0006-ALSA-pci-rme-Set-up-buffer-type-properly.patch @@ -0,0 +1,75 @@ +From f52321ae9ac4ec6eab46da100a5e39dd99e83fed Mon Sep 17 00:00:00 2001 +From: Takashi Iwai <tiwai@suse.de> +Date: Mon, 9 Aug 2021 09:18:28 +0200 +Subject: [PATCH 6/8] ALSA: pci: rme: Set up buffer type properly + +Although the regression of the mmap was fixed in the recent commit +dc0dc8a73e8e ("ALSA: pcm: Fix mmap breakage without explicit buffer +setup"), RME9652 and HDSP drivers have still potential issues with +their mmap handling. Namely, they use the default mmap handler +without the standard buffer preallocation, and PCM core wouldn't use +the coherent DMA mapping. It's practically OK on x86, but on some +exotic architectures, it wouldn't work. + +This patch addresses the potential breakage by replacing the buffer +setup with the proper macro. It also simplifies the source code, +too. + +Signed-off-by: Takashi Iwai <tiwai@suse.de> +Fixes: https://bugs.archlinux.org/task/72059 +--- + sound/pci/rme9652/hdsp.c | 6 ++---- + sound/pci/rme9652/rme9652.c | 6 ++---- + 2 files changed, 4 insertions(+), 8 deletions(-) + +diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c +index 8457a4bbc3df..22b8b3357918 100644 +--- a/sound/pci/rme9652/hdsp.c ++++ b/sound/pci/rme9652/hdsp.c +@@ -4518,8 +4518,7 @@ static int snd_hdsp_playback_open(struct snd_pcm_substream *substream) + snd_pcm_set_sync(substream); + + runtime->hw = snd_hdsp_playback_subinfo; +- runtime->dma_area = hdsp->playback_buffer; +- runtime->dma_bytes = HDSP_DMA_AREA_BYTES; ++ snd_pcm_set_runtime_buffer(substream, &hdsp->playback_dma_buf); + + hdsp->playback_pid = current->pid; + hdsp->playback_substream = substream; +@@ -4595,8 +4594,7 @@ static int snd_hdsp_capture_open(struct snd_pcm_substream *substream) + snd_pcm_set_sync(substream); + + runtime->hw = snd_hdsp_capture_subinfo; +- runtime->dma_area = hdsp->capture_buffer; +- runtime->dma_bytes = HDSP_DMA_AREA_BYTES; ++ snd_pcm_set_runtime_buffer(substream, &hdsp->capture_dma_buf); + + hdsp->capture_pid = current->pid; + hdsp->capture_substream = substream; +diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c +index f1aad38760d6..9ad2533925c4 100644 +--- a/sound/pci/rme9652/rme9652.c ++++ b/sound/pci/rme9652/rme9652.c +@@ -2279,8 +2279,7 @@ static int snd_rme9652_playback_open(struct snd_pcm_substream *substream) + snd_pcm_set_sync(substream); + + runtime->hw = snd_rme9652_playback_subinfo; +- runtime->dma_area = rme9652->playback_buffer; +- runtime->dma_bytes = RME9652_DMA_AREA_BYTES; ++ snd_pcm_set_runtime_buffer(substream, &rme9652->playback_dma_buf); + + if (rme9652->capture_substream == NULL) { + rme9652_stop(rme9652); +@@ -2339,8 +2338,7 @@ static int snd_rme9652_capture_open(struct snd_pcm_substream *substream) + snd_pcm_set_sync(substream); + + runtime->hw = snd_rme9652_capture_subinfo; +- runtime->dma_area = rme9652->capture_buffer; +- runtime->dma_bytes = RME9652_DMA_AREA_BYTES; ++ snd_pcm_set_runtime_buffer(substream, &rme9652->capture_dma_buf); + + if (rme9652->playback_substream == NULL) { + rme9652_stop(rme9652); +-- +2.33.0 + diff --git a/0007-ALSA-pci-cs46xx-Fix-set-up-buffer-type-properly.patch b/0007-ALSA-pci-cs46xx-Fix-set-up-buffer-type-properly.patch new file mode 100644 index 000000000000..4ccedcf64a87 --- /dev/null +++ b/0007-ALSA-pci-cs46xx-Fix-set-up-buffer-type-properly.patch @@ -0,0 +1,95 @@ +From 41fb214922237c05e592a1e515f74cafb516a2d8 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai <tiwai@suse.de> +Date: Mon, 9 Aug 2021 09:18:29 +0200 +Subject: [PATCH 7/8] ALSA: pci: cs46xx: Fix set up buffer type properly + +CS46xx driver switches the buffer depending on the number of periods, +and in some cases it switches to the own buffer without updating the +buffer type properly. This may cause a problem with the mmap on +exotic architectures that require the own mmap call for the coherent +DMA buffer. + +This patch addresses the potential breakage by replacing the buffer +setup with the proper macro. It also simplifies the source code, +too. + +Signed-off-by: Takashi Iwai <tiwai@suse.de> +Fixes: https://bugs.archlinux.org/task/72059 +--- + sound/pci/cs46xx/cs46xx_lib.c | 30 ++++++++---------------------- + 1 file changed, 8 insertions(+), 22 deletions(-) + +diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c +index 1e1eb17f8e07..d43927dcd61e 100644 +--- a/sound/pci/cs46xx/cs46xx_lib.c ++++ b/sound/pci/cs46xx/cs46xx_lib.c +@@ -1121,9 +1121,7 @@ static int snd_cs46xx_playback_hw_params(struct snd_pcm_substream *substream, + if (params_periods(hw_params) == CS46XX_FRAGS) { + if (runtime->dma_area != cpcm->hw_buf.area) + snd_pcm_lib_free_pages(substream); +- runtime->dma_area = cpcm->hw_buf.area; +- runtime->dma_addr = cpcm->hw_buf.addr; +- runtime->dma_bytes = cpcm->hw_buf.bytes; ++ snd_pcm_set_runtime_buffer(substream, &cpcm->hw_buf); + + + #ifdef CONFIG_SND_CS46XX_NEW_DSP +@@ -1143,11 +1141,8 @@ static int snd_cs46xx_playback_hw_params(struct snd_pcm_substream *substream, + #endif + + } else { +- if (runtime->dma_area == cpcm->hw_buf.area) { +- runtime->dma_area = NULL; +- runtime->dma_addr = 0; +- runtime->dma_bytes = 0; +- } ++ if (runtime->dma_area == cpcm->hw_buf.area) ++ snd_pcm_set_runtime_buffer(substream, NULL); + err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); + if (err < 0) { + #ifdef CONFIG_SND_CS46XX_NEW_DSP +@@ -1196,9 +1191,7 @@ static int snd_cs46xx_playback_hw_free(struct snd_pcm_substream *substream) + if (runtime->dma_area != cpcm->hw_buf.area) + snd_pcm_lib_free_pages(substream); + +- runtime->dma_area = NULL; +- runtime->dma_addr = 0; +- runtime->dma_bytes = 0; ++ snd_pcm_set_runtime_buffer(substream, NULL); + + return 0; + } +@@ -1287,16 +1280,11 @@ static int snd_cs46xx_capture_hw_params(struct snd_pcm_substream *substream, + if (runtime->periods == CS46XX_FRAGS) { + if (runtime->dma_area != chip->capt.hw_buf.area) + snd_pcm_lib_free_pages(substream); +- runtime->dma_area = chip->capt.hw_buf.area; +- runtime->dma_addr = chip->capt.hw_buf.addr; +- runtime->dma_bytes = chip->capt.hw_buf.bytes; ++ snd_pcm_set_runtime_buffer(substream, &chip->capt.hw_buf); + substream->ops = &snd_cs46xx_capture_ops; + } else { +- if (runtime->dma_area == chip->capt.hw_buf.area) { +- runtime->dma_area = NULL; +- runtime->dma_addr = 0; +- runtime->dma_bytes = 0; +- } ++ if (runtime->dma_area == chip->capt.hw_buf.area) ++ snd_pcm_set_runtime_buffer(substream, NULL); + err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); + if (err < 0) + return err; +@@ -1313,9 +1301,7 @@ static int snd_cs46xx_capture_hw_free(struct snd_pcm_substream *substream) + + if (runtime->dma_area != chip->capt.hw_buf.area) + snd_pcm_lib_free_pages(substream); +- runtime->dma_area = NULL; +- runtime->dma_addr = 0; +- runtime->dma_bytes = 0; ++ snd_pcm_set_runtime_buffer(substream, NULL); + + return 0; + } +-- +2.33.0 + @@ -64,7 +64,7 @@ _subarch= ### IMPORTANT: Do no edit below this line unless you know what you're doing pkgbase=linux-ck -pkgver=5.14.6 +pkgver=5.14.7 pkgrel=1 arch=(x86_64) url="https://wiki.archlinux.org/index.php/Linux-ck" @@ -87,18 +87,28 @@ source=( "xanmod-patches-from-ck-$_commit.tar.gz::https://github.com/xanmod/linux-patches/archive/$_commit.tar.gz" 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch 0002-SUNRPC-don-t-pause-on-incomplete-allocation.patch + 0003-Bluetooth-btusb-Add-support-for-IMC-Networks-Mediate.patch + 0004-Bluetooth-btusb-Add-support-for-Foxconn-Mediatek-Chi.patch + 0005-ALSA-pcm-Check-mmap-capability-of-runtime-dma-buffer.patch + 0006-ALSA-pci-rme-Set-up-buffer-type-properly.patch + 0007-ALSA-pci-cs46xx-Fix-set-up-buffer-type-properly.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) -b2sums=('a60c98265c4e795cb8fad90c57b9237b586423c6c8d6961c2f64db13bc6203925e3e6d79ff8858f32363a45f7f1a463de1014fddf9f4a14216a3d3ba638327d6' +b2sums=('861405cd1333958cb829017b6c1d6692a7256d179a48fad751bb02cd02ba09227ff210d9252c592a99d3820c1fbdcc3a6e133cbed31fdecb68ba9cf27dfc8f78' 'SKIP' 'a0f4869294fe26b51f88171b235377df3ab8ad7f93824933f98e7706057419bb9cf2adf31422c0fc654dd07376e375545bc06bd1148666bb638f6640ec281e7b' 'd1c083f96f645679c5214e05f906b47f17ac6a8b3dd2faeb219e3ceda3a008e3fe47c4a79b0345978cec5c5e28da9b20727970cf5c788d52c3782dc5b36aa211' 'bd20774ee2c9856601af2c89a3af95c6abc812b71253368090e9c252edcce452f416bfeed54ced0886d401b5a9e1cb72c16ea5f04a72d8ded596c0d083f80e42' - '7addf1973ad4284c5313da2f78e91f1ec4693c472c1bf892f377dfce051d62ba4d1adf00d70f5f015206f53d55faa589e076a60401defb4e9632ed04d310e2bc' - '61e39425d70ec9e4225e21cc10c413c99fc47babe6d6570171f83833ea4b1e51b34050bcf7726db163d78af74eae95a490f6cdd51599769c259230bb96fab901') + 'f16dd5c1ee0147a9a613fd48ffc3767573c380fdd8d7b936e0ba6ee94a53a7461360db9b3b317e995dea890622637067d332778c0042fea906c6c403f3d8a635' + 'fa60bc9d621150a33b5b35b990c4bf917b6caf2c53d5e146bca1dc7abeb42251ff9773db1e6200306d69d2e9dc5c4d0d754f61f521e8eda0062cd4c773a2448d' + 'aa66e8b19dac7109a2dca121de8cee3b25332b1dc71b810b7133f3576af9844999034bb3c0a69fa701085a76c158cbe69f82d81965b0b0027029a46100c76bd0' + 'ce6572e8c83d9c5ae7c7fe7d00663fa7719721d0567dc65f232c51794e5c73ca2c579b29a0171832bfdc8d5e92b4dc4f8fd11eec684e127ea55dcc6e94ce70d1' + 'e32c9166d453f462da2270a9219b5c87fef552d67f5ce6adee22b68425ce82436b5c443c8464c3c7d6a20673ba2e8e80851bb5c26812224f4d4622465cc3c81d' + '3aef2a0b7e2e99efda96f03215ec87ec312eeee9ae207a257c336d5995587f6105cbc1687612b0f869d6a43fefce11598568a2b99a2f1de4d5480c30ec9401b0' + 'ea2af5b7c3e581bfb93175d19e4e9a6ce810b4e1c2d058be683dfbedd19a329441384c26ffd6e38206007ca840f97e552da38d7f36c6fb6b05e5727fb57a873e') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase |