diff options
author | Michael Bestas <mkbestas@lineageos.org> | 2020-07-23 02:33:49 +0300 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-07-23 02:33:49 +0300 |
commit | d1cc3341f2d95b742bb075e309251fc2ae62a799 (patch) | |
tree | 3f18735cd1a957309bf983d04bd76a01f3011258 | |
parent | afe5d56d4f6580fccf499c4b552696ca4fea1768 (diff) | |
parent | 684f18e29d4d2aba9b8155b3c2c1113ee5650b23 (diff) |
Merge tag 'LA.UM.8.4.r1-05700-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-05700-8x98.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4:
msm: adsprpc: Fix array index underflow problem
profiler: Fix compilation errors
fbdev: msm: fix ret value while translating to mdp format
clk: msm: Fix compilation errors with clang
ath10k: Fix compilation issue
drm/msm/sde: Fix clang compilation in SDE driver
ais: cam_soc_api: Fix compilation error
msm: camera: reset atomic variable
msm: v4l2loopback: Fix clang compilation error
msm: Fix compilation error
asoc: msm-8998: Add new FE's for TDM Primary
diag: dci: Synchronize dci mempool buffers alloc and free
headers_lib: rename Android.bp
kbuild: skip install/check of headers right under uapi directories
uapi: export all arch specifics directories
kernel_headers: Fix headers not detected in incremental builds
kernel headers: Update comparison logic
Kbuild : Use no-export-headers to avoid exporting headers
kernel_headers: kernel headers library package
kbuild: replace genhdr-y with generated-y
uapi: export all headers under uapi directories
uapi: sound: move necessary sound headers under uapi
kernel: Fix build errors with LLVM
Revert "ARM: dts: msm: Remove cpu max frequency restriction on cold temp for msm8996."
ARM: dts: msm: Remove cpu max frequency restriction on cold temp for msm8996.
input: touchpanel: Fix compilation errors with clang
asoc: msm-8998: TDM device grouping changes for capture path
kbuild, x86: Track generated headers with generated-y
kbuild: Remove stale asm-generic wrappers
ARM: put types.h in uapi
msm: ais: jpegdma: Fix uninitialized variable
Makefile.headersinst: remove destination-y option
msm: adsprpc: DSP device node to provide restricted access to ADSP/SLPI
Conflicts:
.gitignore
drivers/mmc/core/sdio_cis.c
Change-Id: I70cf2a0fbcfcbc834a21cf7fa8db9bd2e1c755b1
145 files changed, 5453 insertions, 2205 deletions
diff --git a/.gitignore b/.gitignore index 8582ba467b3b..4be4b8825df8 100644 --- a/.gitignore +++ b/.gitignore @@ -119,3 +119,8 @@ android/configs/android-*.cfg # Clang's compilation database file /compile_commands.json + +# +#Ignoring Android.bp link file +# +Android.bp diff --git a/Android.bp b/Android.bp deleted file mode 100644 index 4341e3a71dad..000000000000 --- a/Android.bp +++ /dev/null @@ -1,27 +0,0 @@ -cc_binary_host { - name: "unifdef", - srcs: ["scripts/unifdef.c"], - sanitize: { - never: true, - } -} - -gensrcs { - name: "qseecom-kernel-includes", - - // move to out/ as root for header generation because of scripts/unifdef - // storage - at the expense of extra ../ references - cmd: "pushd out && mkdir -p scripts && rm -f scripts/unifdef && ln -s ../../$(location unifdef) scripts/unifdef && ../$(location scripts/headers_install.sh) `dirname ../$(out)` ../ $(in) && popd", - - tools: ["unifdef"], - tool_files: ["scripts/headers_install.sh"], - export_include_dirs: ["include/uapi"], - srcs: ["include/uapi/linux/qseecom.h"], - output_extension: "h", -} - -cc_library_headers { - name: "qseecom-kernel-headers", - generated_headers: ["qseecom-kernel-includes"], - export_generated_headers: ["qseecom-kernel-includes"], -} diff --git a/Androidbp b/Androidbp new file mode 100644 index 000000000000..1fd921a0e88c --- /dev/null +++ b/Androidbp @@ -0,0 +1,45 @@ +cc_binary_host { + name: "unifdef", + srcs: ["scripts/unifdef.c"], + sanitize: { + never: true, + }, +} + +genrule { + name: "gen-headers_install.sh", + srcs: ["scripts/headers_install.sh"], + tools: ["unifdef"], + out: ["headers_install.sh"], + cmd: "sed 's+scripts/unifdef+$(location unifdef)+g' $(in) > $(out)", +} + +cc_prebuilt_binary { + name: "headers_install.sh", + device_supported: false, + host_supported: true, + srcs: [":gen-headers_install.sh"], +} + +// Use the following for verbose output from kernel_headers.py. +// kernel_headers_verbose = "--verbose " +// Use the following for minimal output from kernel_headers.py. +kernel_headers_verbose = "" + +build = ["gen_headers_arm.bp", "gen_headers_arm64.bp"] + +cc_library_headers { + name: "qti_kernel_headers", + arch: { + arm: { + generated_headers: ["qti_generate_kernel_headers_arm"], + export_generated_headers: ["qti_generate_kernel_headers_arm"], + }, + arm64: { + generated_headers: ["qti_generate_kernel_headers_arm64"], + export_generated_headers: ["qti_generate_kernel_headers_arm64"], + }, + }, + vendor: true, + recovery_available: true, +} diff --git a/Documentation/devicetree/bindings/qdsp/msm-fastrpc.txt b/Documentation/devicetree/bindings/qdsp/msm-fastrpc.txt index 376af82381f2..9a000510c97e 100644 --- a/Documentation/devicetree/bindings/qdsp/msm-fastrpc.txt +++ b/Documentation/devicetree/bindings/qdsp/msm-fastrpc.txt @@ -13,6 +13,7 @@ Optional properties: - qcom,fastrpc-glink: Flag to use glink instead of smd for IPC - qcom,fastrpc-vmid-heap-shared: Flag for Dynamic heap feature, to share HLOS memory buffer to ADSP +- qcom,secure-domains: FastRPC secure domain configuration Optional subnodes: - qcom,msm_fastrpc_compute_cb : Child nodes representing the compute context diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 13f888a02a3d..64c84e2d06c0 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt @@ -43,10 +43,10 @@ This document describes the Linux kernel Makefiles. --- 6.10 Generic header files === 7 Kbuild syntax for exported headers - --- 7.1 header-y - --- 7.2 genhdr-y - --- 7.3 destination-y - --- 7.4 generic-y + --- 7.1 no-export-headers-y + --- 7.2 generic-y + --- 7.3 generated-y + --- 7.4 mandatory-y === 8 Kbuild Variables === 9 Makefile language @@ -1234,7 +1234,22 @@ When kbuild executes, the following steps are followed (roughly): that may be shared between individual architectures. The recommended approach how to use a generic header file is to list the file in the Kbuild file. - See "7.4 generic-y" for further info on syntax etc. + See "7.2 generic-y" for further info on syntax etc. + +--- 6.11 Post-link pass + + If the file arch/xxx/Makefile.postlink exists, this makefile + will be invoked for post-link objects (vmlinux and modules.ko) + for architectures to run post-link passes on. Must also handle + the clean target. + + This pass runs after kallsyms generation. If the architecture + needs to modify symbol locations, rather than manipulate the + kallsyms, it may be easier to add another postlink target for + .tmp_vmlinux? targets to be called from link-vmlinux.sh. + + For example, powerpc uses this to check relocation sanity of + the linked vmlinux file. === 7 Kbuild syntax for exported headers @@ -1246,53 +1261,21 @@ The pre-processing does: - drop include of compiler.h - drop all sections that are kernel internal (guarded by ifdef __KERNEL__) -Each relevant directory contains a file name "Kbuild" which specifies the -headers to be exported. -See subsequent chapter for the syntax of the Kbuild file. - - --- 7.1 header-y - - header-y specifies header files to be exported. - - Example: - #include/linux/Kbuild - header-y += usb/ - header-y += aio_abi.h - - The convention is to list one file per line and - preferably in alphabetic order. - - header-y also specifies which subdirectories to visit. - A subdirectory is identified by a trailing '/' which - can be seen in the example above for the usb subdirectory. - - Subdirectories are visited before their parent directories. - - --- 7.2 genhdr-y - - genhdr-y specifies generated files to be exported. - Generated files are special as they need to be looked - up in another directory when doing 'make O=...' builds. +All headers under include/uapi/, include/generated/uapi/, +arch/<arch>/include/uapi/ and arch/<arch>/include/generated/uapi/ +are exported. - Example: - #include/linux/Kbuild - genhdr-y += version.h - - --- 7.3 destination-y - - When an architecture has a set of exported headers that needs to be - exported to a different directory destination-y is used. - destination-y specifies the destination directory for all exported - headers in the file where it is present. +A Kbuild file may be defined under arch/<arch>/include/uapi/asm/ and +arch/<arch>/include/asm/ to list asm files coming from asm-generic. +See subsequent chapter for the syntax of the Kbuild file. - Example: - #arch/xtensa/platforms/s6105/include/platform/Kbuild - destination-y := include/linux + --- 7.1 no-export-headers - In the example above all exported headers in the Kbuild file - will be located in the directory "include/linux" when exported. + no-export-headers is essentially used by include/uapi/linux/Kbuild to + avoid exporting specific headers (e.g. kvm.h) on architectures that do + not support it. It should be avoided as much as possible. - --- 7.4 generic-y + --- 7.2 generic-y If an architecture uses a verbatim copy of a header from include/asm-generic then this is listed in the file @@ -1319,6 +1302,27 @@ See subsequent chapter for the syntax of the Kbuild file. Example: termios.h #include <asm-generic/termios.h> + --- 7.3 generated-y + + If an architecture generates other header files alongside generic-y + wrappers, generated-y specifies them. + + This prevents them being treated as stale asm-generic wrappers and + removed. + + Example: + #arch/x86/include/asm/Kbuild + generated-y += syscalls_32.h + + --- 7.4 mandatory-y + + mandatory-y is essentially used by include/uapi/asm-generic/Kbuild.asm + to define the minimun set of headers that must be exported in + include/asm. + + The convention is to list one subdir per line and + preferably in alphabetic order. + === 8 Kbuild Variables The top Makefile exports the following variables: @@ -1130,7 +1130,7 @@ firmware_install: export INSTALL_HDR_PATH = $(objtree)/usr # If we do an all arch process set dst to asm-$(hdr-arch) -hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm) +hdr-dst = $(if $(KBUILD_HEADERS), dst=include/arch-$(hdr-arch), dst=include) PHONY += archheaders archheaders: @@ -1151,7 +1151,7 @@ headers_install: __headers $(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \ $(error Headers not exportable for the $(SRCARCH) architecture)) $(Q)$(MAKE) $(hdr-inst)=include/uapi - $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) + $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst) PHONY += headers_check_all headers_check_all: headers_install_all @@ -1160,7 +1160,7 @@ headers_check_all: headers_install_all PHONY += headers_check headers_check: headers_install $(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1 - $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1 + $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst) HDRCHECK=1 # --------------------------------------------------------------------------- # Kernel selftest diff --git a/arch/alpha/include/uapi/asm/Kbuild b/arch/alpha/include/uapi/asm/Kbuild index d96f2ef5b639..b15bf6bc0e94 100644 --- a/arch/alpha/include/uapi/asm/Kbuild +++ b/arch/alpha/include/uapi/asm/Kbuild @@ -1,43 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm - -header-y += a.out.h -header-y += auxvec.h -header-y += bitsperlong.h -header-y += byteorder.h -header-y += compiler.h -header-y += console.h -header-y += errno.h -header-y += fcntl.h -header-y += fpu.h -header-y += gentrap.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += kvm_para.h -header-y += mman.h -header-y += msgbuf.h -header-y += pal.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += reg.h -header-y += regdef.h -header-y += resource.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += sysinfo.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += unistd.h diff --git a/arch/arc/include/uapi/asm/Kbuild b/arch/arc/include/uapi/asm/Kbuild index f50d02df78d5..b15bf6bc0e94 100644 --- a/arch/arc/include/uapi/asm/Kbuild +++ b/arch/arc/include/uapi/asm/Kbuild @@ -1,5 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm -header-y += elf.h -header-y += page.h -header-y += cachectl.h diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild index 46a76cd6acb6..424935e4515d 100644 --- a/arch/arm/include/uapi/asm/Kbuild +++ b/arch/arm/include/uapi/asm/Kbuild @@ -1,23 +1,6 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm -header-y += auxvec.h -header-y += byteorder.h -header-y += fcntl.h -header-y += hwcap.h -header-y += ioctls.h -header-y += kvm_para.h -header-y += mman.h -header-y += perf_regs.h -header-y += posix_types.h -header-y += ptrace.h -header-y += setup.h -header-y += sigcontext.h -header-y += signal.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += unistd.h -genhdr-y += unistd-common.h -genhdr-y += unistd-oabi.h -genhdr-y += unistd-eabi.h +generated-y += unistd-common.h +generated-y += unistd-oabi.h +generated-y += unistd-eabi.h diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/uapi/asm/types.h index a53cdb8f068c..9435a42f575e 100644 --- a/arch/arm/include/asm/types.h +++ b/arch/arm/include/uapi/asm/types.h @@ -1,5 +1,5 @@ -#ifndef _ASM_TYPES_H -#define _ASM_TYPES_H +#ifndef _UAPI_ASM_TYPES_H +#define _UAPI_ASM_TYPES_H #include <asm-generic/int-ll64.h> @@ -37,4 +37,4 @@ #define __UINTPTR_TYPE__ unsigned long #endif -#endif /* _ASM_TYPES_H */ +#endif /* _UAPI_ASM_TYPES_H */ diff --git a/arch/arm64/include/uapi/asm/Kbuild b/arch/arm64/include/uapi/asm/Kbuild index 825b0fe51c2b..13a97aa2285f 100644 --- a/arch/arm64/include/uapi/asm/Kbuild +++ b/arch/arm64/include/uapi/asm/Kbuild @@ -2,21 +2,3 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += kvm_para.h - -header-y += auxvec.h -header-y += bitsperlong.h -header-y += byteorder.h -header-y += fcntl.h -header-y += hwcap.h -header-y += kvm_para.h -header-y += perf_regs.h -header-y += param.h -header-y += ptrace.h -header-y += setup.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += stat.h -header-y += statfs.h -header-y += ucontext.h -header-y += unistd.h diff --git a/arch/blackfin/include/uapi/asm/Kbuild b/arch/blackfin/include/uapi/asm/Kbuild index 0bd28f77abc3..b15bf6bc0e94 100644 --- a/arch/blackfin/include/uapi/asm/Kbuild +++ b/arch/blackfin/include/uapi/asm/Kbuild @@ -1,19 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm - -header-y += bfin_sport.h -header-y += byteorder.h -header-y += cachectl.h -header-y += fcntl.h -header-y += fixed_code.h -header-y += ioctls.h -header-y += kvm_para.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += stat.h -header-y += swab.h -header-y += unistd.h diff --git a/arch/c6x/include/uapi/asm/Kbuild b/arch/c6x/include/uapi/asm/Kbuild index e9bc2b2b8147..13a97aa2285f 100644 --- a/arch/c6x/include/uapi/asm/Kbuild +++ b/arch/c6x/include/uapi/asm/Kbuild @@ -2,11 +2,3 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += kvm_para.h - -header-y += byteorder.h -header-y += kvm_para.h -header-y += ptrace.h -header-y += setup.h -header-y += sigcontext.h -header-y += swab.h -header-y += unistd.h diff --git a/arch/cris/include/uapi/arch-v10/arch/Kbuild b/arch/cris/include/uapi/arch-v10/arch/Kbuild deleted file mode 100644 index 9048c87a782b..000000000000 --- a/arch/cris/include/uapi/arch-v10/arch/Kbuild +++ /dev/null @@ -1,5 +0,0 @@ -# UAPI Header export list -header-y += sv_addr.agh -header-y += sv_addr_ag.h -header-y += svinto.h -header-y += user.h diff --git a/arch/cris/include/uapi/arch-v32/arch/Kbuild b/arch/cris/include/uapi/arch-v32/arch/Kbuild deleted file mode 100644 index 59efffd16b61..000000000000 --- a/arch/cris/include/uapi/arch-v32/arch/Kbuild +++ /dev/null @@ -1,3 +0,0 @@ -# UAPI Header export list -header-y += cryptocop.h -header-y += user.h diff --git a/arch/cris/include/uapi/asm/Kbuild b/arch/cris/include/uapi/asm/Kbuild index d5564a0ae66a..b15bf6bc0e94 100644 --- a/arch/cris/include/uapi/asm/Kbuild +++ b/arch/cris/include/uapi/asm/Kbuild @@ -1,44 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm - -header-y += ../arch-v10/arch/ -header-y += ../arch-v32/arch/ -header-y += auxvec.h -header-y += bitsperlong.h -header-y += byteorder.h -header-y += elf.h -header-y += elf_v10.h -header-y += elf_v32.h -header-y += errno.h -header-y += ethernet.h -header-y += etraxgpio.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += mman.h -header-y += msgbuf.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += ptrace_v10.h -header-y += ptrace_v32.h -header-y += resource.h -header-y += rs485.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += sync_serial.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += unistd.h diff --git a/arch/frv/include/uapi/asm/Kbuild b/arch/frv/include/uapi/asm/Kbuild index 42a2b33461c0..b15bf6bc0e94 100644 --- a/arch/frv/include/uapi/asm/Kbuild +++ b/arch/frv/include/uapi/asm/Kbuild @@ -1,35 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm - -header-y += auxvec.h -header-y += bitsperlong.h -header-y += byteorder.h -header-y += errno.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += kvm_para.h -header-y += mman.h -header-y += msgbuf.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += registers.h -header-y += resource.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += unistd.h diff --git a/arch/h8300/include/uapi/asm/Kbuild b/arch/h8300/include/uapi/asm/Kbuild index fb6101a5d4f1..b15bf6bc0e94 100644 --- a/arch/h8300/include/uapi/asm/Kbuild +++ b/arch/h8300/include/uapi/asm/Kbuild @@ -1,30 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm - -header-y += auxvec.h -header-y += bitsperlong.h -header-y += errno.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += kvm_para.h -header-y += mman.h -header-y += msgbuf.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += resource.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += siginfo.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += unistd.h diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index 2323d0e075b7..28c962cd9443 100644 --- a/arch/hexagon/include/asm/Kbuild +++ b/arch/hexagon/include/asm/Kbuild @@ -1,6 +1,3 @@ - -header-y += ucontext.h - generic-y += auxvec.h generic-y += barrier.h generic-y += bug.h diff --git a/arch/hexagon/include/uapi/asm/Kbuild b/arch/hexagon/include/uapi/asm/Kbuild index c31706c38631..b15bf6bc0e94 100644 --- a/arch/hexagon/include/uapi/asm/Kbuild +++ b/arch/hexagon/include/uapi/asm/Kbuild @@ -1,15 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm - -header-y += bitsperlong.h -header-y += byteorder.h -header-y += kvm_para.h -header-y += param.h -header-y += ptrace.h -header-y += registers.h -header-y += setup.h -header-y += sigcontext.h -header-y += signal.h -header-y += swab.h -header-y += unistd.h -header-y += user.h diff --git a/arch/ia64/include/uapi/asm/Kbuild b/arch/ia64/include/uapi/asm/Kbuild index 891002bbb995..13a97aa2285f 100644 --- a/arch/ia64/include/uapi/asm/Kbuild +++ b/arch/ia64/include/uapi/asm/Kbuild @@ -2,48 +2,3 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += kvm_para.h - -header-y += auxvec.h -header-y += bitsperlong.h -header-y += break.h -header-y += byteorder.h -header-y += cmpxchg.h -header-y += errno.h -header-y += fcntl.h -header-y += fpu.h -header-y += gcc_intrin.h -header-y += ia64regs.h -header-y += intel_intrin.h -header-y += intrinsics.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += kvm_para.h -header-y += mman.h -header-y += msgbuf.h -header-y += param.h -header-y += perfmon.h -header-y += perfmon_default_smpl.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += ptrace_offsets.h -header-y += resource.h -header-y += rse.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += ucontext.h -header-y += unistd.h -header-y += ustack.h diff --git a/arch/m32r/include/uapi/asm/Kbuild b/arch/m32r/include/uapi/asm/Kbuild index 43937a61d6cf..b15bf6bc0e94 100644 --- a/arch/m32r/include/uapi/asm/Kbuild +++ b/arch/m32r/include/uapi/asm/Kbuild @@ -1,33 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm - -header-y += auxvec.h -header-y += bitsperlong.h -header-y += byteorder.h -header-y += errno.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += mman.h -header-y += msgbuf.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += resource.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += unistd.h diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild index 6a2d257bdfb2..64368077235a 100644 --- a/arch/m68k/include/uapi/asm/Kbuild +++ b/arch/m68k/include/uapi/asm/Kbuild @@ -9,27 +9,3 @@ generic-y += socket.h generic-y += sockios.h generic-y += termbits.h generic-y += termios.h - -header-y += a.out.h -header-y += bootinfo.h -header-y += bootinfo-amiga.h -header-y += bootinfo-apollo.h -header-y += bootinfo-atari.h -header-y += bootinfo-hp300.h -header-y += bootinfo-mac.h -header-y += bootinfo-q40.h -header-y += bootinfo-vme.h -header-y += byteorder.h -header-y += cachectl.h -header-y += fcntl.h -header-y += ioctls.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += setup.h -header-y += sigcontext.h -header-y += signal.h -header-y += stat.h -header-y += swab.h -header-y += unistd.h diff --git a/arch/metag/include/uapi/asm/Kbuild b/arch/metag/include/uapi/asm/Kbuild index ab78be2b6eb0..b29731ebd7a9 100644 --- a/arch/metag/include/uapi/asm/Kbuild +++ b/arch/metag/include/uapi/asm/Kbuild @@ -1,14 +1,6 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm -header-y += byteorder.h -header-y += ech.h -header-y += ptrace.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += swab.h -header-y += unistd.h - generic-y += mman.h generic-y += resource.h generic-y += setup.h diff --git a/arch/microblaze/include/uapi/asm/Kbuild b/arch/microblaze/include/uapi/asm/Kbuild index 1aac99f87df1..2178c78c7c1a 100644 --- a/arch/microblaze/include/uapi/asm/Kbuild +++ b/arch/microblaze/include/uapi/asm/Kbuild @@ -2,35 +2,3 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += types.h - -header-y += auxvec.h -header-y += bitsperlong.h -header-y += byteorder.h -header-y += elf.h -header-y += errno.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += kvm_para.h -header-y += mman.h -header-y += msgbuf.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += resource.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += termbits.h -header-y += termios.h -header-y += unistd.h diff --git a/arch/mips/include/uapi/asm/Kbuild b/arch/mips/include/uapi/asm/Kbuild index f2cf41461146..a0266feba9e6 100644 --- a/arch/mips/include/uapi/asm/Kbuild +++ b/arch/mips/include/uapi/asm/Kbuild @@ -2,40 +2,3 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += ipcbuf.h - -header-y += auxvec.h -header-y += bitfield.h -header-y += bitsperlong.h -header-y += break.h -header-y += byteorder.h -header-y += cachectl.h -header-y += errno.h -header-y += fcntl.h -header-y += inst.h -header-y += ioctl.h -header-y += ioctls.h -header-y += kvm_para.h -header-y += mman.h -header-y += msgbuf.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += resource.h -header-y += sembuf.h -header-y += setup.h -header-y += sgidefs.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += sysmips.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += unistd.h diff --git a/arch/mn10300/include/uapi/asm/Kbuild b/arch/mn10300/include/uapi/asm/Kbuild index 040178cdb3eb..b15bf6bc0e94 100644 --- a/arch/mn10300/include/uapi/asm/Kbuild +++ b/arch/mn10300/include/uapi/asm/Kbuild @@ -1,34 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm - -header-y += auxvec.h -header-y += bitsperlong.h -header-y += byteorder.h -header-y += errno.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += kvm_para.h -header-y += mman.h -header-y += msgbuf.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += resource.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += unistd.h diff --git a/arch/nios2/include/uapi/asm/Kbuild b/arch/nios2/include/uapi/asm/Kbuild index e0bb972a50d7..0c74c3c5ebfa 100644 --- a/arch/nios2/include/uapi/asm/Kbuild +++ b/arch/nios2/include/uapi/asm/Kbuild @@ -1,5 +1,4 @@ +# UAPI Header export list include include/uapi/asm-generic/Kbuild.asm -header-y += elf.h - generic-y += ucontext.h diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild index 2a035830f13c..1147e01bd777 100644 --- a/arch/openrisc/include/asm/Kbuild +++ b/arch/openrisc/include/asm/Kbuild @@ -1,6 +1,3 @@ - -header-y += ucontext.h - generic-y += atomic.h generic-y += auxvec.h generic-y += barrier.h diff --git a/arch/openrisc/include/uapi/asm/Kbuild b/arch/openrisc/include/uapi/asm/Kbuild index 80761eb82b5f..b15bf6bc0e94 100644 --- a/arch/openrisc/include/uapi/asm/Kbuild +++ b/arch/openrisc/include/uapi/asm/Kbuild @@ -1,10 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm - -header-y += byteorder.h -header-y += elf.h -header-y += kvm_para.h -header-y += param.h -header-y += ptrace.h -header-y += sigcontext.h -header-y += unistd.h diff --git a/arch/parisc/include/uapi/asm/Kbuild b/arch/parisc/include/uapi/asm/Kbuild index 348356c99514..3971c60a7e7f 100644 --- a/arch/parisc/include/uapi/asm/Kbuild +++ b/arch/parisc/include/uapi/asm/Kbuild @@ -2,31 +2,3 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += resource.h - -header-y += bitsperlong.h -header-y += byteorder.h -header-y += errno.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += mman.h -header-y += msgbuf.h -header-y += pdc.h -header-y += posix_types.h -header-y += ptrace.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += unistd.h diff --git a/arch/powerpc/include/uapi/asm/Kbuild b/arch/powerpc/include/uapi/asm/Kbuild index dab3717e3ea0..b15bf6bc0e94 100644 --- a/arch/powerpc/include/uapi/asm/Kbuild +++ b/arch/powerpc/include/uapi/asm/Kbuild @@ -1,47 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm - -header-y += auxvec.h -header-y += bitsperlong.h -header-y += bootx.h -header-y += byteorder.h -header-y += cputable.h -header-y += eeh.h -header-y += elf.h -header-y += epapr_hcalls.h -header-y += errno.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += kvm.h -header-y += kvm_para.h -header-y += mman.h -header-y += msgbuf.h -header-y += nvram.h -header-y += opal-prd.h -header-y += param.h -header-y += perf_event.h -header-y += poll.h -header-y += posix_types.h -header-y += ps3fb.h -header-y += ptrace.h -header-y += resource.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += spu_info.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += termbits.h -header-y += termios.h -header-y += tm.h -header-y += types.h -header-y += ucontext.h -header-y += unistd.h diff --git a/arch/s390/include/uapi/asm/Kbuild b/arch/s390/include/uapi/asm/Kbuild index 08fe6dad9026..baebb3da1d44 100644 --- a/arch/s390/include/uapi/asm/Kbuild +++ b/arch/s390/include/uapi/asm/Kbuild @@ -1,52 +1,3 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm -header-y += auxvec.h -header-y += bitsperlong.h -header-y += byteorder.h -header-y += chpid.h -header-y += chsc.h -header-y += cmb.h -header-y += dasd.h -header-y += debug.h -header-y += errno.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += kvm.h -header-y += kvm_para.h -header-y += kvm_perf.h -header-y += kvm_virtio.h -header-y += mman.h -header-y += monwriter.h -header-y += msgbuf.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += qeth.h -header-y += resource.h -header-y += schid.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += sclp_ctl.h -header-y += sie.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += tape390.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += ucontext.h -header-y += unistd.h -header-y += virtio-ccw.h -header-y += vtoc.h -header-y += zcrypt.h diff --git a/arch/score/include/asm/Kbuild b/arch/score/include/asm/Kbuild index 4c5e9f418e5f..99f1b9fbc2f6 100644 --- a/arch/score/include/asm/Kbuild +++ b/arch/score/include/asm/Kbuild @@ -1,7 +1,4 @@ -header-y += - - generic-y += barrier.h generic-y += clkdev.h generic-y += cputime.h diff --git a/arch/score/include/uapi/asm/Kbuild b/arch/score/include/uapi/asm/Kbuild index 040178cdb3eb..b15bf6bc0e94 100644 --- a/arch/score/include/uapi/asm/Kbuild +++ b/arch/score/include/uapi/asm/Kbuild @@ -1,34 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm - -header-y += auxvec.h -header-y += bitsperlong.h -header-y += byteorder.h -header-y += errno.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += kvm_para.h -header-y += mman.h -header-y += msgbuf.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += resource.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += unistd.h diff --git a/arch/sh/include/uapi/asm/Kbuild b/arch/sh/include/uapi/asm/Kbuild index 60613ae78513..b15bf6bc0e94 100644 --- a/arch/sh/include/uapi/asm/Kbuild +++ b/arch/sh/include/uapi/asm/Kbuild @@ -1,25 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm - -header-y += auxvec.h -header-y += byteorder.h -header-y += cachectl.h -header-y += cpu-features.h -header-y += hw_breakpoint.h -header-y += ioctls.h -header-y += posix_types.h -header-y += posix_types_32.h -header-y += posix_types_64.h -header-y += ptrace.h -header-y += ptrace_32.h -header-y += ptrace_64.h -header-y += setup.h -header-y += sigcontext.h -header-y += signal.h -header-y += sockios.h -header-y += stat.h -header-y += swab.h -header-y += types.h -header-y += unistd.h -header-y += unistd_32.h -header-y += unistd_64.h diff --git a/arch/sparc/include/uapi/asm/Kbuild b/arch/sparc/include/uapi/asm/Kbuild index b5843ee09fb5..b15bf6bc0e94 100644 --- a/arch/sparc/include/uapi/asm/Kbuild +++ b/arch/sparc/include/uapi/asm/Kbuild @@ -1,50 +1,2 @@ # UAPI Header export list -# User exported sparc header files - include include/uapi/asm-generic/Kbuild.asm - -header-y += apc.h -header-y += asi.h -header-y += auxvec.h -header-y += bitsperlong.h -header-y += byteorder.h -header-y += display7seg.h -header-y += envctrl.h -header-y += errno.h -header-y += fbio.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += jsflash.h -header-y += kvm_para.h -header-y += mman.h -header-y += msgbuf.h -header-y += openpromio.h -header-y += param.h -header-y += perfctr.h -header-y += poll.h -header-y += posix_types.h -header-y += psr.h -header-y += psrcompat.h -header-y += pstate.h -header-y += ptrace.h -header-y += resource.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += termbits.h -header-y += termios.h -header-y += traps.h -header-y += uctx.h -header-y += unistd.h -header-y += utrap.h -header-y += watchdog.h diff --git a/arch/tile/include/asm/Kbuild b/arch/tile/include/asm/Kbuild index 9ef5d5b0b7a8..da323ac6d8a8 100644 --- a/arch/tile/include/asm/Kbuild +++ b/arch/tile/include/asm/Kbuild @@ -1,6 +1,3 @@ - -header-y += ../arch/ - generic-y += bug.h generic-y += bugs.h generic-y += clkdev.h diff --git a/arch/tile/include/uapi/arch/Kbuild b/arch/tile/include/uapi/arch/Kbuild deleted file mode 100644 index 97dfbecec6b6..000000000000 --- a/arch/tile/include/uapi/arch/Kbuild +++ /dev/null @@ -1,17 +0,0 @@ -# UAPI Header export list -header-y += abi.h -header-y += chip.h -header-y += chip_tilegx.h -header-y += chip_tilepro.h -header-y += icache.h -header-y += interrupts.h -header-y += interrupts_32.h -header-y += interrupts_64.h -header-y += opcode.h -header-y += opcode_tilegx.h -header-y += opcode_tilepro.h -header-y += sim.h -header-y += sim_def.h -header-y += spr_def.h -header-y += spr_def_32.h -header-y += spr_def_64.h diff --git a/arch/tile/include/uapi/asm/Kbuild b/arch/tile/include/uapi/asm/Kbuild index c20db8e428bf..0c74c3c5ebfa 100644 --- a/arch/tile/include/uapi/asm/Kbuild +++ b/arch/tile/include/uapi/asm/Kbuild @@ -1,21 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm -header-y += auxvec.h -header-y += bitsperlong.h -header-y += byteorder.h -header-y += cachectl.h -header-y += hardwall.h -header-y += kvm_para.h -header-y += mman.h -header-y += ptrace.h -header-y += setup.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += stat.h -header-y += swab.h -header-y += ucontext.h -header-y += unistd.h - generic-y += ucontext.h diff --git a/arch/unicore32/include/uapi/asm/Kbuild b/arch/unicore32/include/uapi/asm/Kbuild index 0514d7ad6855..13a97aa2285f 100644 --- a/arch/unicore32/include/uapi/asm/Kbuild +++ b/arch/unicore32/include/uapi/asm/Kbuild @@ -1,10 +1,4 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm -header-y += byteorder.h -header-y += kvm_para.h -header-y += ptrace.h -header-y += sigcontext.h -header-y += unistd.h - generic-y += kvm_para.h diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild index aeac434c9feb..2cfed174e3c9 100644 --- a/arch/x86/include/asm/Kbuild +++ b/arch/x86/include/asm/Kbuild @@ -1,5 +1,11 @@ +generated-y += syscalls_32.h +generated-y += syscalls_64.h +generated-y += unistd_32_ia32.h +generated-y += unistd_64_x32.h +generated-y += xen-hypercalls.h + genhdr-y += unistd_32.h genhdr-y += unistd_64.h genhdr-y += unistd_x32.h diff --git a/arch/x86/include/uapi/asm/Kbuild b/arch/x86/include/uapi/asm/Kbuild index 1c532b3f18ea..da1489cb64dc 100644 --- a/arch/x86/include/uapi/asm/Kbuild +++ b/arch/x86/include/uapi/asm/Kbuild @@ -1,64 +1,6 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm -genhdr-y += unistd_32.h -genhdr-y += unistd_64.h -genhdr-y += unistd_x32.h -header-y += a.out.h -header-y += auxvec.h -header-y += bitsperlong.h -header-y += boot.h -header-y += bootparam.h -header-y += byteorder.h -header-y += debugreg.h -header-y += e820.h -header-y += errno.h -header-y += fcntl.h -header-y += hw_breakpoint.h -header-y += hyperv.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += ist.h -header-y += kvm.h -header-y += kvm_para.h -header-y += kvm_perf.h -header-y += ldt.h -header-y += mce.h -header-y += mman.h -header-y += msgbuf.h -header-y += msr.h -header-y += mtrr.h -header-y += param.h -header-y += perf_regs.h -header-y += poll.h -header-y += posix_types.h -header-y += posix_types_32.h -header-y += posix_types_64.h -header-y += posix_types_x32.h -header-y += prctl.h -header-y += processor-flags.h -header-y += ptrace-abi.h -header-y += ptrace.h -header-y += resource.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += sigcontext32.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += svm.h -header-y += swab.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += ucontext.h -header-y += unistd.h -header-y += vm86.h -header-y += vmx.h -header-y += vsyscall.h +generated-y += unistd_32.h +generated-y += unistd_64.h +generated-y += unistd_x32.h diff --git a/arch/xtensa/include/uapi/asm/Kbuild b/arch/xtensa/include/uapi/asm/Kbuild index 56aad54e7fb7..b15bf6bc0e94 100644 --- a/arch/xtensa/include/uapi/asm/Kbuild +++ b/arch/xtensa/include/uapi/asm/Kbuild @@ -1,25 +1,2 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm - -header-y += auxvec.h -header-y += byteorder.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += mman.h -header-y += msgbuf.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += swab.h -header-y += termbits.h -header-y += types.h -header-y += unistd.h diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index 23b48dc6981b..f2be7f119e8c 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -1,5 +1,5 @@ /* - * 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 @@ -72,6 +72,16 @@ #define FASTRPC_CTX_MAGIC (0xbeeddeed) #define FASTRPC_CTX_MAX (256) #define FASTRPC_CTXID_MASK (0xFF0) +#define NUM_DEVICES 2 /* adsprpc-smd, adsprpc-smd-secure */ +#define MINOR_NUM_DEV 0 +#define MINOR_NUM_SECURE_DEV 1 +#define NON_SECURE_CHANNEL 0 +#define SECURE_CHANNEL 1 + +#define ADSP_DOMAIN_ID (0) +#define MDSP_DOMAIN_ID (1) +#define SDSP_DOMAIN_ID (2) +#define CDSP_DOMAIN_ID (3) #define IS_CACHE_ALIGNED(x) (((x) & ((L1_CACHE_BYTES)-1)) == 0) @@ -245,6 +255,8 @@ struct fastrpc_channel_ctx { int ramdumpenabled; void *remoteheap_ramdump_dev; struct fastrpc_glink_info link; + /* Indicates, if channel is restricted to secure node only */ + int secure; }; struct fastrpc_apps { @@ -321,6 +333,8 @@ struct fastrpc_file { struct dentry *debugfs_file; struct mutex map_mutex; char *debug_buf; + /* Identifies the device (MINOR_NUM_DEV / MINOR_NUM_SECURE_DEV) */ + int dev_minor; }; static struct fastrpc_apps gfa; @@ -577,12 +591,23 @@ static void fastrpc_mmap_free(struct fastrpc_mmap *map) { struct fastrpc_apps *me = &gfa; struct fastrpc_file *fl; - int vmid; + int vmid, cid = -1, err = 0; struct fastrpc_session_ctx *sess; if (!map) return; fl = map->fl; + if (fl && !(map->flags == ADSP_MMAP_HEAP_ADDR || + map->flags == ADSP_MMAP_REMOTE_HEAP_ADDR)) { + cid = fl->cid; + VERIFY(err, cid >= ADSP_DOMAIN_ID && cid < NUM_CHANNELS); + if (err) { + err = -ECHRNG; + pr_err("adsprpc: ERROR:%s, Invalid channel id: %d, err:%d", + __func__, cid, err); + return; + } + } if (map->flags == ADSP_MMAP_HEAP_ADDR || map->flags == ADSP_MMAP_REMOTE_HEAP_ADDR) { spin_lock(&me->hlock); @@ -659,20 +684,21 @@ static int fastrpc_mmap_create(struct fastrpc_file *fl, int fd, unsigned attr, struct fastrpc_apps *me = &gfa; struct fastrpc_session_ctx *sess; struct fastrpc_apps *apps = fl->apps; - int cid = fl->cid; struct fastrpc_channel_ctx *chan = NULL; struct fastrpc_mmap *map = NULL; struct dma_attrs attrs; dma_addr_t region_start = 0; void *region_vaddr = NULL; unsigned long flags; - int err = 0, vmid; + int err = 0, vmid, cid = -1; - VERIFY(err, cid >= 0 && cid < NUM_CHANNELS); - if (err) + cid = fl->cid; + VERIFY(err, cid >= ADSP_DOMAIN_ID && cid < NUM_CHANNELS); + if (err) { + err = -ECHRNG; goto bail; + } chan = &apps->channel[cid]; - if (!fastrpc_mmap_find(fl, fd, va, len, mflags, ppmap)) return 0; map = kzalloc(sizeof(*map), GFP_KERNEL); @@ -1577,12 +1603,22 @@ static int fastrpc_invoke_send(struct smq_invoke_ctx *ctx, { struct smq_msg *msg = &ctx->msg; struct fastrpc_file *fl = ctx->fl; - struct fastrpc_channel_ctx *channel_ctx = &fl->apps->channel[fl->cid]; - int err = 0, len; + int err = 0, len, cid = -1; + struct fastrpc_channel_ctx *channel_ctx = NULL; + + cid = fl->cid; + VERIFY(err, cid >= ADSP_DOMAIN_ID && cid < NUM_CHANNELS); + if (err) { + err = -ECHRNG; + goto bail; + } + channel_ctx = &fl->apps->channel[fl->cid]; VERIFY(err, NULL != channel_ctx->chan); - if (err) + if (err) { + err = -ECHRNG; goto bail; + } msg->pid = current->tgid; msg->tid = current->pid; if (kernel) @@ -1683,7 +1719,11 @@ static void fastrpc_init(struct fastrpc_apps *me) init_completion(&me->channel[i].work); init_completion(&me->channel[i].workport); me->channel[i].sesscount = 0; + /* All channels are secure by default except CDSP */ + me->channel[i].secure = SECURE_CHANNEL; } + /* Set CDSP channel to non secure */ + me->channel[CDSP_DOMAIN_ID].secure = NON_SECURE_CHANNEL; } static int fastrpc_release_current_dsp_process(struct fastrpc_file *fl); @@ -1694,11 +1734,21 @@ static int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode, { struct smq_invoke_ctx *ctx = NULL; struct fastrpc_ioctl_invoke *invoke = &inv->inv; - int cid = fl->cid; - int interrupted = 0; - int err = 0; + int err = 0, cid = -1, interrupted = 0; struct timespec invoket = {0}; + cid = fl->cid; + VERIFY(err, cid >= ADSP_DOMAIN_ID && cid < NUM_CHANNELS); + if (err) { + err = -ECHRNG; + goto bail; + } + VERIFY(err, fl->sctx != NULL); + if (err) { + err = -EBADR; + goto bail; + } + if (fl->profile) getnstimeofday(&invoket); @@ -1711,12 +1761,6 @@ static int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode, } } - VERIFY(err, fl->sctx != NULL); - if (err) - goto bail; - VERIFY(err, fl->cid >= 0 && fl->cid < NUM_CHANNELS); - if (err) - goto bail; if (!kernel) { VERIFY(err, 0 == context_restore_interrupted(fl, inv, &ctx)); @@ -2725,6 +2769,9 @@ static ssize_t fastrpc_debugfs_read(struct file *filp, char __user *buffer, len += scnprintf(fileinfo + len, DEBUGFS_SIZE - len, "|%-9d", chan->ssrcount); + len += scnprintf(fileinfo + len, + DEBUGFS_SIZE - len, "%s %d\n", + "secure:", chan->secure); for (j = 0; j < chan->sesscount; j++) { sess_used += chan->session[j].used; } @@ -2818,6 +2865,9 @@ static ssize_t fastrpc_debugfs_read(struct file *filp, char __user *buffer, "0x%-20lX|0x%-20llX|0x%-20zu\n\n", map->va, map->phys, map->size); + len += scnprintf(fileinfo + len, DEBUGFS_SIZE - len, + "%s %d\n\n", + "DEV_MINOR:", fl->dev_minor); } len += scnprintf(fileinfo + len, DEBUGFS_SIZE - len, "%-20s|%-20s|%-20s|%-20s\n", @@ -2894,7 +2944,7 @@ static const struct file_operations debugfs_fops = { static int fastrpc_channel_open(struct fastrpc_file *fl) { struct fastrpc_apps *me = &gfa; - int cid, err = 0; + int cid = -1, err = 0; mutex_lock(&me->smd_mutex); @@ -2902,9 +2952,11 @@ static int fastrpc_channel_open(struct fastrpc_file *fl) if (err) goto bail; cid = fl->cid; - VERIFY(err, cid >= 0 && cid < NUM_CHANNELS); - if (err) + VERIFY(err, cid >= ADSP_DOMAIN_ID && cid < NUM_CHANNELS); + if (err) { + err = -ECHRNG; goto bail; + } if (me->channel[cid].ssrcount != me->channel[cid].prevssrcount) { if (!me->channel[cid].issubsystemup) { @@ -2974,6 +3026,19 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) char strpid[PID_SIZE]; int buf_size = 0; + /* + * Indicates the device node opened + * MINOR_NUM_DEV or MINOR_NUM_SECURE_DEV + */ + int dev_minor = MINOR(inode->i_rdev); + + VERIFY(err, ((dev_minor == MINOR_NUM_DEV) || + (dev_minor == MINOR_NUM_SECURE_DEV))); + if (err) { + pr_err("adsprpc: Invalid dev minor num %d\n", dev_minor); + return err; + } + VERIFY(err, NULL != (fl = kzalloc(sizeof(*fl), GFP_KERNEL))); if (err) return err; @@ -3000,6 +3065,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) fl->mode = FASTRPC_MODE_SERIAL; fl->cid = -1; fl->init_mem = NULL; + fl->dev_minor = dev_minor; if (debugfs_file != NULL) fl->debugfs_file = debugfs_file; @@ -3025,6 +3091,23 @@ static int fastrpc_get_info(struct fastrpc_file *fl, uint32_t *info) VERIFY(err, cid < NUM_CHANNELS); if (err) goto bail; + /* Check to see if the device node is non-secure */ + if (fl->dev_minor == MINOR_NUM_DEV) { + /* + * For non secure device node check and make sure that + * the channel allows non-secure access + * If not, bail. Session will not start. + * cid will remain -1 and client will not be able to + * invoke any other methods without failure + */ + if (fl->apps->channel[cid].secure == SECURE_CHANNEL) { + err = -EPERM; + pr_err("adsprpc: GetInfo failed dev %d, cid %d, secure %d\n", + fl->dev_minor, cid, + fl->apps->channel[cid].secure); + goto bail; + } + } fl->cid = cid; fl->ssrcount = fl->apps->channel[cid].ssrcount; VERIFY(err, !fastrpc_session_alloc_locked( @@ -3462,12 +3545,41 @@ bail: return err; } +static void configure_secure_channels(uint32_t secure_domains) +{ + struct fastrpc_apps *me = &gfa; + int ii = 0; + /* + * secure_domains contains the bitmask of the secure channels + * Bit 0 - ADSP + * Bit 1 - MDSP + * Bit 2 - SLPI + * Bit 3 - CDSP + */ + for (ii = ADSP_DOMAIN_ID; ii <= CDSP_DOMAIN_ID; ++ii) { + int secure = (secure_domains >> ii) & 0x01; + + me->channel[ii].secure = secure; + } +} + static int fastrpc_probe(struct platform_device *pdev) { int err = 0; struct fastrpc_apps *me = &gfa; struct device *dev = &pdev->dev; - + uint32_t secure_domains; + + if (of_get_property(dev->of_node, + "qcom,secure-domains", NULL) != NULL) { + VERIFY(err, !of_property_read_u32(dev->of_node, + "qcom,secure-domains", + &secure_domains)); + if (!err) + configure_secure_channels(secure_domains); + else + pr_info("adsprpc: unable to read the domain configuration from dts\n"); + } if (of_device_is_compatible(dev->of_node, "qcom,msm-fastrpc-compute-cb")) return fastrpc_cb_probe(dev); @@ -3543,6 +3655,7 @@ static int __init fastrpc_device_init(void) { struct fastrpc_apps *me = &gfa; struct device *dev = NULL; + struct device *secure_dev = NULL; int err = 0, i; debugfs_root = debugfs_create_dir("adsprpc", NULL); @@ -3559,7 +3672,7 @@ static int __init fastrpc_device_init(void) cdev_init(&me->cdev, &fops); me->cdev.owner = THIS_MODULE; VERIFY(err, 0 == cdev_add(&me->cdev, MKDEV(MAJOR(me->dev_no), 0), - 1)); + NUM_DEVICES)); if (err) goto cdev_init_bail; me->class = class_create(THIS_MODULE, "fastrpc"); @@ -3567,14 +3680,29 @@ static int __init fastrpc_device_init(void) if (err) goto class_create_bail; me->compat = (NULL == fops.compat_ioctl) ? 0 : 1; + /* + * Create devices and register with sysfs + * Create first device with minor number 0 + */ dev = device_create(me->class, NULL, - MKDEV(MAJOR(me->dev_no), 0), - NULL, gcinfo[0].name); + MKDEV(MAJOR(me->dev_no), MINOR_NUM_DEV), + NULL, DEVICE_NAME); VERIFY(err, !IS_ERR_OR_NULL(dev)); if (err) goto device_create_bail; + + /* Create secure device with minor number for secure device */ + secure_dev = device_create(me->class, NULL, + MKDEV(MAJOR(me->dev_no), MINOR_NUM_SECURE_DEV), + NULL, DEVICE_NAME_SECURE); + VERIFY(err, !IS_ERR_OR_NULL(secure_dev)); + if (err) + goto device_create_bail; + for (i = 0; i < NUM_CHANNELS; i++) { - me->channel[i].dev = dev; + me->channel[i].dev = secure_dev; + if (i == CDSP_DOMAIN_ID) + me->channel[i].dev = dev; me->channel[i].ssrcount = 0; me->channel[i].prevssrcount = 0; me->channel[i].issubsystemup = 1; @@ -3598,7 +3726,11 @@ device_create_bail: &me->channel[i].nb); } if (!IS_ERR_OR_NULL(dev)) - device_destroy(me->class, MKDEV(MAJOR(me->dev_no), 0)); + device_destroy(me->class, MKDEV(MAJOR(me->dev_no), + MINOR_NUM_DEV)); + if (!IS_ERR_OR_NULL(secure_dev)) + device_destroy(me->class, MKDEV(MAJOR(me->dev_no), + MINOR_NUM_SECURE_DEV)); class_destroy(me->class); class_create_bail: cdev_del(&me->cdev); @@ -3620,10 +3752,15 @@ static void __exit fastrpc_device_exit(void) for (i = 0; i < NUM_CHANNELS; i++) { if (!gcinfo[i].name) continue; - device_destroy(me->class, MKDEV(MAJOR(me->dev_no), i)); subsys_notif_unregister_notifier(me->channel[i].handle, &me->channel[i].nb); } + + /* Destroy the secure and non secure devices */ + device_destroy(me->class, MKDEV(MAJOR(me->dev_no), MINOR_NUM_DEV)); + device_destroy(me->class, MKDEV(MAJOR(me->dev_no), + MINOR_NUM_SECURE_DEV)); + class_destroy(me->class); cdev_del(&me->cdev); unregister_chrdev_region(me->dev_no, NUM_CHANNELS); diff --git a/drivers/char/adsprpc_shared.h b/drivers/char/adsprpc_shared.h index 4371bf6a2ae7..b79cc2230568 100644 --- a/drivers/char/adsprpc_shared.h +++ b/drivers/char/adsprpc_shared.h @@ -34,6 +34,7 @@ #define FASTRPC_GLINK_GUID "fastrpcglink-apps-dsp" #define FASTRPC_SMD_GUID "fastrpcsmd-apps-dsp" #define DEVICE_NAME "adsprpc-smd" +#define DEVICE_NAME_SECURE "adsprpc-smd-secure" /* Set for buffers that have no virtual mapping in userspace */ #define FASTRPC_ATTR_NOVA 0x1 diff --git a/drivers/char/diag/diag_dci.c b/drivers/char/diag/diag_dci.c index e9a6711c9990..cf2e08f65b64 100644 --- a/drivers/char/diag/diag_dci.c +++ b/drivers/char/diag/diag_dci.c @@ -1658,10 +1658,13 @@ unsigned char *dci_get_buffer_from_bridge(int token) { uint8_t retries = 0, max_retries = 3; unsigned char *buf = NULL; + unsigned long flags; do { + spin_lock_irqsave(&driver->dci_mempool_lock, flags); buf = diagmem_alloc(driver, DIAG_MDM_BUF_SIZE, dci_ops_tbl[token].mempool); + spin_unlock_irqrestore(&driver->dci_mempool_lock, flags); if (!buf) { usleep_range(5000, 5100); retries++; @@ -1679,12 +1682,15 @@ int diag_dci_write_bridge(int token, unsigned char *buf, int len) int diag_dci_write_done_bridge(int index, unsigned char *buf, int len) { + unsigned long flags; int token = BRIDGE_TO_TOKEN(index); if (!VALID_DCI_TOKEN(token)) { pr_err("diag: Invalid DCI token %d in %s\n", token, __func__); return -EINVAL; } + spin_lock_irqsave(&driver->dci_mempool_lock, flags); diagmem_free(driver, buf, dci_ops_tbl[token].mempool); + spin_unlock_irqrestore(&driver->dci_mempool_lock, flags); return 0; } #endif @@ -1698,6 +1704,7 @@ static int diag_send_dci_pkt_remote(unsigned char *data, int len, int tag, int dci_header_size = sizeof(struct diag_dci_header_t); int ret = DIAG_DCI_NO_ERROR; uint32_t write_len = 0; + unsigned long flags; if (!data) return -EIO; @@ -1731,7 +1738,9 @@ static int diag_send_dci_pkt_remote(unsigned char *data, int len, int tag, if (ret) { pr_err("diag: error writing dci pkt to remote proc, token: %d, err: %d\n", token, ret); + spin_lock_irqsave(&driver->dci_mempool_lock, flags); diagmem_free(driver, buf, dci_ops_tbl[token].mempool); + spin_unlock_irqrestore(&driver->dci_mempool_lock, flags); } else { ret = DIAG_DCI_NO_ERROR; } @@ -1755,6 +1764,7 @@ int diag_dci_send_handshake_pkt(int index) struct diag_ctrl_dci_handshake_pkt ctrl_pkt; unsigned char *buf = NULL; struct diag_dci_header_t dci_header; + unsigned long flags; if (!VALID_DCI_TOKEN(token)) { pr_err("diag: In %s, invalid DCI token %d\n", __func__, token); @@ -1794,7 +1804,9 @@ int diag_dci_send_handshake_pkt(int index) if (err) { pr_err("diag: error writing ack packet to remote proc, token: %d, err: %d\n", token, err); + spin_lock_irqsave(&driver->dci_mempool_lock, flags); diagmem_free(driver, buf, dci_ops_tbl[token].mempool); + spin_unlock_irqrestore(&driver->dci_mempool_lock, flags); return err; } @@ -2454,6 +2466,7 @@ int diag_send_dci_event_mask_remote(int token) int i, ret = DIAG_DCI_NO_ERROR, err = DIAG_DCI_NO_ERROR; unsigned char *event_mask_ptr = NULL; uint32_t write_len = 0; + unsigned long flags; mutex_lock(&dci_event_mask_mutex); event_mask_ptr = dci_ops_tbl[token].event_mask_composite; @@ -2499,7 +2512,9 @@ int diag_send_dci_event_mask_remote(int token) if (err) { pr_err("diag: error writing event mask to remote proc, token: %d, err: %d\n", token, err); + spin_lock_irqsave(&driver->dci_mempool_lock, flags); diagmem_free(driver, buf, dci_ops_tbl[token].mempool); + spin_unlock_irqrestore(&driver->dci_mempool_lock, flags); ret = err; } else { ret = DIAG_DCI_NO_ERROR; @@ -2656,6 +2671,7 @@ int diag_send_dci_log_mask_remote(int token) int i, ret = DIAG_DCI_NO_ERROR, err = DIAG_DCI_NO_ERROR; int updated; uint32_t write_len = 0; + unsigned long flags; mutex_lock(&dci_log_mask_mutex); log_mask_ptr = dci_ops_tbl[token].log_mask_composite; @@ -2695,7 +2711,10 @@ int diag_send_dci_log_mask_remote(int token) if (err) { pr_err("diag: error writing log mask to remote processor, equip_id: %d, token: %d, err: %d\n", i, token, err); + spin_lock_irqsave(&driver->dci_mempool_lock, flags); diagmem_free(driver, buf, dci_ops_tbl[token].mempool); + spin_unlock_irqrestore(&driver->dci_mempool_lock, + flags); updated = 0; } if (updated) @@ -2840,6 +2859,7 @@ int diag_dci_init(void) mutex_init(&dci_log_mask_mutex); mutex_init(&dci_event_mask_mutex); spin_lock_init(&ws_lock); + spin_lock_init(&driver->dci_mempool_lock); ret = diag_dci_init_ops_tbl(); if (ret) diff --git a/drivers/char/diag/diagchar.h b/drivers/char/diag/diagchar.h index b49d8cb54349..bc7dd020e145 100644 --- a/drivers/char/diag/diagchar.h +++ b/drivers/char/diag/diagchar.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2008-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 @@ -549,6 +549,7 @@ struct diagchar_dev { struct workqueue_struct *diag_dci_wq; struct list_head cmd_reg_list; struct mutex cmd_reg_mutex; + spinlock_t dci_mempool_lock; uint32_t cmd_reg_count; struct mutex diagfwd_channel_mutex[NUM_PERIPHERALS]; /* Sizes that reflect memory pool sizes */ diff --git a/drivers/clk/msm/clock-gcc-8996.c b/drivers/clk/msm/clock-gcc-8996.c index 6dd2cf879c49..4dee851ae85f 100644 --- a/drivers/clk/msm/clock-gcc-8996.c +++ b/drivers/clk/msm/clock-gcc-8996.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2016, 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,7 +42,7 @@ static void __iomem *virt_dbgbase; #define gpll0_out_main_source_val 1 #define gpll4_out_main_source_val 5 -#define FIXDIV(div) (div ? (2 * (div) - 1) : (0)) +#define FIXDIV(div) ((int)div ? (2 * (div) - 1) : (0)) #define F(f, s, div, m, n) \ { \ diff --git a/drivers/clk/msm/clock-gcc-8998.c b/drivers/clk/msm/clock-gcc-8998.c index b1c8cc43769f..c13c7c660ede 100644 --- a/drivers/clk/msm/clock-gcc-8998.c +++ b/drivers/clk/msm/clock-gcc-8998.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2015-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 @@ -44,7 +44,7 @@ static void __iomem *virt_dbgbase; #define gpll4_out_main_source_val 5 #define gpll0_early_div_source_val 6 -#define FIXDIV(div) (div ? (2 * (div) - 1) : (0)) +#define FIXDIV(div) ((int)div ? (2 * (div) - 1) : (0)) #define F(f, s, div, m, n) \ { \ diff --git a/drivers/clk/msm/clock-mmss-8996.c b/drivers/clk/msm/clock-mmss-8996.c index 339ae1622005..845cb001d091 100644 --- a/drivers/clk/msm/clock-mmss-8996.c +++ b/drivers/clk/msm/clock-mmss-8996.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2016, 2018 The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2016, 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 @@ -53,7 +53,7 @@ static void __iomem *virt_base_gpu; #define dsi1phypll_mm_source_val 2 #define ext_extpclk_clk_src_mm_source_val 1 -#define FIXDIV(div) (div ? (2 * (div) - 1) : (0)) +#define FIXDIV(div) ((int)div ? (2 * (div) - 1) : (0)) #define F_MM(f, s, div, m, n) \ { \ diff --git a/drivers/clk/msm/clock-mmss-8998.c b/drivers/clk/msm/clock-mmss-8998.c index fdaaa723accd..ebf1c78402ed 100644 --- a/drivers/clk/msm/clock-mmss-8998.c +++ b/drivers/clk/msm/clock-mmss-8998.c @@ -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 @@ -51,7 +51,7 @@ static void __iomem *virt_base; #define ext_dp_phy_pll_link_mm_source_val 1 #define ext_dp_phy_pll_vco_mm_source_val 2 -#define FIXDIV(div) (div ? (2 * (div) - 1) : (0)) +#define FIXDIV(div) ((int)div ? (2 * (div) - 1) : (0)) #define F_MM(f, s, div, m, n) \ { \ diff --git a/drivers/clk/msm/clock-osm.c b/drivers/clk/msm/clock-osm.c index a1635bad3bb0..4aa298c80679 100644 --- a/drivers/clk/msm/clock-osm.c +++ b/drivers/clk/msm/clock-osm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-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 @@ -272,7 +272,7 @@ static void __iomem *debug_base; #define ACD_REG_RELATIVE_ADDR_BITMASK(addr) \ (1 << (ACD_REG_RELATIVE_ADDR(addr))) -#define FIXDIV(div) (div ? (2 * (div) - 1) : (0)) +#define FIXDIV(div) ((int)div ? (2 * (div) - 1) : (0)) #define F(f, s, div, m, n) \ { \ diff --git a/drivers/clk/qcom/clk-debug.c b/drivers/clk/qcom/clk-debug.c index 50d0d01188ed..496b80eace5b 100644 --- a/drivers/clk/qcom/clk-debug.c +++ b/drivers/clk/qcom/clk-debug.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014, 2016-2017, + * Copyright (c) 2013-2014, 2016-2017, 2020, * * The Linux Foundation. All rights reserved. * @@ -177,13 +177,12 @@ static int clk_debug_mux_set_parent(struct clk_hw *hw, u8 index) regval |= (meas->parent[index].next_sel & meas->mask); - if (meas->parent[index].en_mask == 0xFF) - /* Skip en_mask */ - regval = regval; - else if (meas->parent[index].en_mask) - regval |= meas->parent[index].en_mask; - else - regval |= meas->en_mask; + if (meas->parent[index].en_mask != 0xFF) { + if (meas->parent[index].en_mask) + regval |= meas->parent[index].en_mask; + else + regval |= meas->en_mask; + } regmap_write(meas->regmap[dbg_cc], 0x0, regval); } diff --git a/drivers/gpu/drm/msm/sde/sde_plane.c b/drivers/gpu/drm/msm/sde/sde_plane.c index 91c837ff13dc..ae66861c69d4 100644 --- a/drivers/gpu/drm/msm/sde/sde_plane.c +++ b/drivers/gpu/drm/msm/sde/sde_plane.c @@ -1871,7 +1871,7 @@ static void _sde_plane_install_properties(struct drm_plane *plane, } if (sde_is_custom_client()) { - if (catalog->mixer_count && catalog->mixer && + if (catalog->mixer_count && catalog->mixer[0].sblk->maxblendstages) { zpos_max = catalog->mixer[0].sblk->maxblendstages - 1; if (zpos_max > SDE_STAGE_MAX - SDE_STAGE_0 - 1) diff --git a/drivers/input/touchscreen/st/fts_gui.c b/drivers/input/touchscreen/st/fts_gui.c index f695137ada09..800237c6bff7 100644 --- a/drivers/input/touchscreen/st/fts_gui.c +++ b/drivers/input/touchscreen/st/fts_gui.c @@ -58,7 +58,7 @@ ssize_t fts_i2c_wr_show(struct device *dev, struct device_attribute *attr, snprintf(buff, sizeof(buff), "{"); strlcat(Out_buff, buff, ARRAY_SIZE(Out_buff)); for (i = 0; i < (byte_count_read+2); i++) { - if ((i == 0)) { + if (i == 0) { char temp_byte_count_read = (byte_count_read >> 8) & 0xFF; snprintf(buff, sizeof(buff), "%02X", temp_byte_count_read); } else if (i == 1) { @@ -125,7 +125,7 @@ ssize_t fts_i2c_wr_store(struct device *dev, struct device_attribute *attr, #ifdef SCRIPTLESS_DEBUG printk("%s:DATA READ\n{", __func__); for (i = 0; i < (2+byte_count_read); i++) { - if ((i == 0)) { + if (i == 0) { char temp_byte_count_read = (byte_count_read >> 8) & 0xFF; printk("%02X", (unsigned int)temp_byte_count_read); } else if (i == 1) { @@ -173,7 +173,7 @@ ssize_t fts_i2c_read_show(struct device *dev, struct device_attribute *attr, snprintf(buff, sizeof(buff), "{"); strlcat(Out_buff, buff, ARRAY_SIZE(Out_buff)); for (i = 0; i < (byte_count_read+2); i++) { - if ((i == 0)) { + if (i == 0) { char temp_byte_count_read = (byte_count_read >> 8) & 0xFF; snprintf(buff, sizeof(buff), "%02X", temp_byte_count_read); } else if (i == 1) { @@ -241,7 +241,7 @@ ssize_t fts_i2c_read_store(struct device *dev, struct device_attribute *attr, #ifdef SCRIPTLESS_DEBUG printk("%s:DATA READ\n{", __func__); for (i = 0; i < (byte_count_read+2); i++) { - if ((i == 0)) { + if (i == 0) { char temp_byte_count_read = (byte_count_read >> 8) & 0xFF; printk("%02X", (unsigned int)temp_byte_count_read); } else if (i == 1) { diff --git a/drivers/input/touchscreen/st/fts_lib/ftsGesture.c b/drivers/input/touchscreen/st/fts_lib/ftsGesture.c index ee97a417d4cb..89f84efc08e2 100644 --- a/drivers/input/touchscreen/st/fts_lib/ftsGesture.c +++ b/drivers/input/touchscreen/st/fts_lib/ftsGesture.c @@ -334,7 +334,9 @@ int addCustomGesture(u8 *data, int size, u8 gestureID) index = gestureID - GESTURE_CUSTOM_OFFSET; logError(0, "%s Starting Custom Gesture Adding procedure...\n", tag); - if (size != GESTURE_CUSTOM_POINTS && gestureID != GES_ID_CUST1 && gestureID != GES_ID_CUST2 && gestureID != GES_ID_CUST3 && gestureID != GES_ID_CUST4 && gestureID && GES_ID_CUST5) { + if ((size != GESTURE_CUSTOM_POINTS) && (gestureID != GES_ID_CUST1) + && (gestureID != GES_ID_CUST2) && (gestureID != GES_ID_CUST3) + && (gestureID != GES_ID_CUST4) && (gestureID != GES_ID_CUST5)) { logError(1, "%s addCustomGesture: Invalid size (%d) or Custom GestureID (%02X)! ERROR %08X\n", tag, size, gestureID, ERROR_OP_NOT_ALLOW); return ERROR_OP_NOT_ALLOW; } @@ -364,7 +366,9 @@ int removeCustomGesture(u8 gestureID) index = gestureID - GESTURE_CUSTOM_OFFSET; logError(0, "%s Starting Custom Gesture Removing procedure...\n", tag); - if (gestureID != GES_ID_CUST1 && gestureID != GES_ID_CUST2 && gestureID != GES_ID_CUST3 && gestureID != GES_ID_CUST4 && gestureID && GES_ID_CUST5) { + if ((gestureID != GES_ID_CUST1) && (gestureID != GES_ID_CUST2) + && (gestureID != GES_ID_CUST3) && (gestureID != GES_ID_CUST4) + && (gestureID != GES_ID_CUST5)) { logError(1, "%s removeCustomGesture: Invalid size (%d) or Custom GestureID (%02X)! ERROR %08X\n", tag, gestureID, ERROR_OP_NOT_ALLOW); return ERROR_OP_NOT_ALLOW; } @@ -381,7 +385,8 @@ int removeCustomGesture(u8 gestureID) return res; } - if (readData[2] != gestureID || readData[4] != 0x00) { /* check of gestureID is redundant */ + /* check of gestureID is redundant */ + if ((readData[2] != gestureID) || (readData[4] != 0x00)) { logError(1, "%s removeCustomGesture: remove event status not OK! ERROR %08X\n", tag, readData[4]); return ERROR_GESTURE_REMOVE; } diff --git a/drivers/media/platform/msm/ais/common/cam_soc_api.c b/drivers/media/platform/msm/ais/common/cam_soc_api.c index 6c0e188adb75..22d986304596 100644 --- a/drivers/media/platform/msm/ais/common/cam_soc_api.c +++ b/drivers/media/platform/msm/ais/common/cam_soc_api.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 @@ -210,7 +210,7 @@ int msm_camera_get_clk_info(struct platform_device *pdev, { int rc = 0; - if (!pdev || !&pdev->dev || !clk_info || !clk_ptr || !num_clk) + if (!pdev || !clk_info || !clk_ptr || !num_clk) return -EINVAL; rc = msm_camera_get_clk_info_internal(&pdev->dev, diff --git a/drivers/media/platform/msm/ais/jpeg_dma/msm_jpeg_dma_hw.c b/drivers/media/platform/msm/ais/jpeg_dma/msm_jpeg_dma_hw.c index 3202699aec85..6695e631a5d9 100644 --- a/drivers/media/platform/msm/ais/jpeg_dma/msm_jpeg_dma_hw.c +++ b/drivers/media/platform/msm/ais/jpeg_dma/msm_jpeg_dma_hw.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2015-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 @@ -1664,7 +1664,7 @@ void msm_jpegdma_hw_put(struct msm_jpegdma_device *dma) */ static int msm_jpegdma_hw_attach_iommu(struct msm_jpegdma_device *dma) { - int ret; + int ret = -EINVAL; mutex_lock(&dma->lock); diff --git a/drivers/media/platform/msm/camera_v2/msm.c b/drivers/media/platform/msm/camera_v2/msm.c index e16d08681695..66897a7778a9 100644 --- a/drivers/media/platform/msm/camera_v2/msm.c +++ b/drivers/media/platform/msm/camera_v2/msm.c @@ -231,6 +231,8 @@ static inline void msm_pm_qos_add_request(void) static void msm_pm_qos_remove_request(void) { pr_info("%s: remove request", __func__); + if (!atomic_cmpxchg(&qos_add_request_done, 1, 0)) + return; pm_qos_remove_request(&msm_v4l2_pm_qos_request); } diff --git a/drivers/media/platform/msm/vidc/hfi_response_handler.c b/drivers/media/platform/msm/vidc/hfi_response_handler.c index d3a7e4ce06b7..259d86744ff7 100644 --- a/drivers/media/platform/msm/vidc/hfi_response_handler.c +++ b/drivers/media/platform/msm/vidc/hfi_response_handler.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2016,2019 The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2016, 2019-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 @@ -1844,7 +1844,7 @@ static int hfi_process_session_rel_buf_done(u32 device_id, cmd_done.size = sizeof(struct msm_vidc_cb_cmd_done); cmd_done.session_id = (void *)(uintptr_t)pkt->session_id; cmd_done.status = hfi_map_err_status(pkt->error_type); - if (pkt->rg_buffer_info) { + if (pkt->rg_buffer_info != NULL) { cmd_done.data.buffer_info.buffer_addr = *pkt->rg_buffer_info; cmd_done.size = sizeof(struct hal_buffer_info); } else { diff --git a/drivers/media/platform/msm/vidc/msm_vidc.c b/drivers/media/platform/msm/vidc/msm_vidc.c index 81ce5813cec4..40781ace9d21 100644 --- a/drivers/media/platform/msm/vidc/msm_vidc.c +++ b/drivers/media/platform/msm/vidc/msm_vidc.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-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 @@ -1542,16 +1542,17 @@ int msm_vidc_destroy(struct msm_vidc_inst *inst) return 0; } -int msm_vidc_close(void *instance) +static void close_helper(struct kref *kref) { - void close_helper(struct kref *kref) - { - struct msm_vidc_inst *inst = container_of(kref, - struct msm_vidc_inst, kref); + struct msm_vidc_inst *inst = container_of(kref, + struct msm_vidc_inst, kref); - msm_vidc_destroy(inst); - } + msm_vidc_destroy(inst); +} + +int msm_vidc_close(void *instance) +{ struct msm_vidc_inst *inst = instance; struct buffer_info *bi, *dummy; int rc = 0, i = 0; diff --git a/drivers/media/platform/msm/vidc/msm_vidc_common.c b/drivers/media/platform/msm/vidc/msm_vidc_common.c index bbf5e33a99f7..b56b48a6b7b0 100644 --- a/drivers/media/platform/msm/vidc/msm_vidc_common.c +++ b/drivers/media/platform/msm/vidc/msm_vidc_common.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-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 @@ -712,16 +712,17 @@ static void handle_sys_init_done(enum hal_command_response cmd, void *data) return; } -static void put_inst(struct msm_vidc_inst *inst) +static void put_inst_helper(struct kref *kref) { - void put_inst_helper(struct kref *kref) - { - struct msm_vidc_inst *inst = container_of(kref, - struct msm_vidc_inst, kref); + struct msm_vidc_inst *inst = container_of(kref, + struct msm_vidc_inst, kref); - msm_vidc_destroy(inst); - } + msm_vidc_destroy(inst); +} + +static void put_inst(struct msm_vidc_inst *inst) +{ if (!inst) return; diff --git a/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c b/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c index 925914bc7a6d..6a2eb9121f6b 100644 --- a/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c +++ b/drivers/media/platform/msm/vidc/msm_vidc_res_parse.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 @@ -54,13 +54,13 @@ fail_read: return 0; } -static inline enum imem_type read_imem_type(struct platform_device *pdev) +static bool is_compatible(char *compat) { - bool is_compatible(char *compat) - { - return !!of_find_compatible_node(NULL, NULL, compat); - } + return !!of_find_compatible_node(NULL, NULL, compat); +} +static inline enum imem_type read_imem_type(struct platform_device *pdev) +{ return is_compatible("qcom,msm-ocmem") ? IMEM_OCMEM : is_compatible("qcom,msm-vmem") ? IMEM_VMEM : IMEM_NONE; @@ -518,20 +518,19 @@ error: return rc; } +static int cmp(const void *a, const void *b) +{ + /* want to sort in reverse so flip the comparison */ + return ((struct load_freq_table *)b)->load - + ((struct load_freq_table *)a)->load; +} + static int msm_vidc_load_freq_table(struct msm_vidc_platform_resources *res) { int rc = 0; int num_elements = 0; struct platform_device *pdev = res->pdev; - /* A comparator to compare loads (needed later on) */ - int cmp(const void *a, const void *b) - { - /* want to sort in reverse so flip the comparison */ - return ((struct load_freq_table *)b)->load - - ((struct load_freq_table *)a)->load; - } - if (!of_find_property(pdev->dev.of_node, "qcom,load-freq-tbl", NULL)) { /* qcom,load-freq-tbl is an optional property. It likely won't * be present on cores that we can't clock scale on. */ diff --git a/drivers/media/v4l2loopback-master/v4l2loopback.c b/drivers/media/v4l2loopback-master/v4l2loopback.c index b6e7f6a2a768..71d3f4b5a24c 100644 --- a/drivers/media/v4l2loopback-master/v4l2loopback.c +++ b/drivers/media/v4l2loopback-master/v4l2loopback.c @@ -2145,7 +2145,7 @@ static int free_buffers(struct v4l2_loopback_device *dev) static void try_free_buffers(struct v4l2_loopback_device *dev) { MARK(); - if (dev->open_count.counter && !dev->keep_format == 0) { + if ((dev->open_count.counter && !dev->keep_format) == 0) { free_buffers(dev); dev->ready_for_capture = 0; dev->buffer_size = 0; diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c index 8e06e1020ad9..849592f45889 100644 --- a/drivers/misc/lkdtm.c +++ b/drivers/misc/lkdtm.c @@ -381,6 +381,7 @@ static void execute_user_location(void *dst) static void lkdtm_do_action(enum ctype which) { + int *ptr = NULL; switch (which) { case CT_PANIC: panic("dumptest"); @@ -392,7 +393,7 @@ static void lkdtm_do_action(enum ctype which) WARN_ON(1); break; case CT_EXCEPTION: - *((int *) 0) = 0; + *ptr = 0; break; case CT_LOOP: for (;;) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index b68e3a5b9046..dc97105a9a5d 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -6048,7 +6048,7 @@ static struct sk_buff *ath10k_wmi_10_4_op_gen_init(struct ath10k *ar) int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg) { - if (arg->ie_len && !arg->ie) + if (arg->ie_len) return -EINVAL; if (arg->n_channels && !arg->channels) return -EINVAL; diff --git a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c index 9fe7b6c59302..4a7b7a72fd99 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-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 @@ -1529,16 +1529,13 @@ void ipahal_get_disable_aggr_valmask(struct ipahal_reg_valmask *valmask) IPAHAL_ERR("Input error\n"); return; } + valmask->val = (1 << IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_SHFT) & + IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_BMSK; + valmask->mask = IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_BMSK; - valmask->val = (1 & IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_BMSK) << - IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_SHFT; - valmask->mask = IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_BMSK << - IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_SHFT; - - valmask->val |= ((0 & IPA_ENDP_INIT_AGGR_n_AGGR_EN_BMSK) << - IPA_ENDP_INIT_AGGR_n_AGGR_EN_SHFT); - valmask->mask |= ((IPA_ENDP_INIT_AGGR_n_AGGR_EN_BMSK << - IPA_ENDP_INIT_AGGR_n_AGGR_EN_SHFT)); + valmask->val |= ((0 << IPA_ENDP_INIT_AGGR_n_AGGR_EN_SHFT) & + IPA_ENDP_INIT_AGGR_n_AGGR_EN_BMSK); + valmask->mask |= IPA_ENDP_INIT_AGGR_n_AGGR_EN_BMSK; } u32 ipahal_aggr_get_max_byte_limit(void) diff --git a/drivers/platform/msm/usb_bam.c b/drivers/platform/msm/usb_bam.c index a9bcabfdb009..b1d9211e09df 100644 --- a/drivers/platform/msm/usb_bam.c +++ b/drivers/platform/msm/usb_bam.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-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 @@ -1400,7 +1400,7 @@ void usb_bam_finish_suspend_(struct work_struct *w) info_ptr = container_of(w, struct usb_bam_ipa_handshake_info, finish_suspend_work); - cur_bam = info_ptr->cur_bam_mode; + cur_bam = (enum usb_ctrl)(info_ptr->cur_bam_mode); log_event_dbg("%s: Finishing suspend sequence(BAM=%s)\n", __func__, bam_enable_strings[cur_bam]); diff --git a/drivers/power/supply/qcom/msm_bcl.c b/drivers/power/supply/qcom/msm_bcl.c index aea3f4645897..843cb415e810 100644 --- a/drivers/power/supply/qcom/msm_bcl.c +++ b/drivers/power/supply/qcom/msm_bcl.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014, 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 @@ -227,8 +227,8 @@ int msm_bcl_enable(void) int ret = 0, i = 0; struct bcl_param_data *param_data = NULL; - if (!bcl[i] || !bcl[BCL_PARAM_VOLTAGE]->thresh - || !bcl[BCL_PARAM_CURRENT]->thresh) { + if (!bcl[i] || (bcl[BCL_PARAM_VOLTAGE]->thresh == NULL) + || (bcl[BCL_PARAM_CURRENT]->thresh == NULL)) { pr_err("BCL not initialized\n"); return -EINVAL; } diff --git a/drivers/regulator/qpnp-lcdb-regulator.c b/drivers/regulator/qpnp-lcdb-regulator.c index 28c7da33afe0..e295fe440a61 100644 --- a/drivers/regulator/qpnp-lcdb-regulator.c +++ b/drivers/regulator/qpnp-lcdb-regulator.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-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 @@ -1671,8 +1671,8 @@ static int qpnp_lcdb_init_bst(struct qpnp_lcdb *lcdb) if (lcdb->bst.ps != -EINVAL) { rc = qpnp_lcdb_masked_write(lcdb, lcdb->base + - LCDB_PS_CTL_REG, EN_PS_BIT, - &lcdb->bst.ps ? EN_PS_BIT : 0); + LCDB_PS_CTL_REG, EN_PS_BIT, + lcdb->bst.ps ? EN_PS_BIT : 0); if (rc < 0) { pr_err("Failed to disable BST PS rc=%d", rc); return rc; diff --git a/drivers/soc/qcom/msm_bus/msm_bus_dbg.c b/drivers/soc/qcom/msm_bus/msm_bus_dbg.c index 444d79fa061f..b8963a00374c 100644 --- a/drivers/soc/qcom/msm_bus/msm_bus_dbg.c +++ b/drivers/soc/qcom/msm_bus/msm_bus_dbg.c @@ -1,5 +1,4 @@ -/* Copyright (c) 2010-2012, 2014-2015, 2017 The Linux Foundation. All rights - * reserved. +/* Copyright (c) 2010-2012, 2014-2015, 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 diff --git a/drivers/soc/qcom/msm_bus/msm_bus_rules.c b/drivers/soc/qcom/msm_bus/msm_bus_rules.c index cafddcd65561..bd032c900624 100644 --- a/drivers/soc/qcom/msm_bus/msm_bus_rules.c +++ b/drivers/soc/qcom/msm_bus/msm_bus_rules.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-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 diff --git a/drivers/soc/qcom/msm_performance.c b/drivers/soc/qcom/msm_performance.c index 1857d369bc94..8b78ac889eac 100644 --- a/drivers/soc/qcom/msm_performance.c +++ b/drivers/soc/qcom/msm_performance.c @@ -1,5 +1,5 @@ /* - * 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 @@ -2728,9 +2728,9 @@ error: for (i = 0; i < num_clusters; i++) { if (!managed_clusters[i]) break; - if (managed_clusters[i]->offlined_cpus) + if (managed_clusters[i]->offlined_cpus != NULL) free_cpumask_var(managed_clusters[i]->offlined_cpus); - if (managed_clusters[i]->cpus) + if (managed_clusters[i]->cpus != NULL) free_cpumask_var(managed_clusters[i]->cpus); kfree(managed_clusters[i]); } diff --git a/drivers/soc/qcom/qdsp6v2/apr.c b/drivers/soc/qcom/qdsp6v2/apr.c index ba5be240dfea..3060308652d5 100644 --- a/drivers/soc/qcom/qdsp6v2/apr.c +++ b/drivers/soc/qcom/qdsp6v2/apr.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2014, 2016, 2018-2019 The Linux Foundation. +/* Copyright (c) 2010-2014, 2016, 2018-2020 The Linux Foundation. * All rights reserved. * * This program is free software; you can redistribute it and/or modify diff --git a/drivers/soc/qcom/system_stats.c b/drivers/soc/qcom/system_stats.c index ba35928a991b..30e15a0a2c9a 100644 --- a/drivers/soc/qcom/system_stats.c +++ b/drivers/soc/qcom/system_stats.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2016, 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 @@ -298,6 +298,7 @@ static int msm_rpmstats_probe(struct platform_device *pdev) void __iomem *offset_addr = NULL; struct resource res; int i, ret = 0; + size_t master_name_len = 0; if (!pdev) return -EINVAL; @@ -365,7 +366,7 @@ static int msm_rpmstats_probe(struct platform_device *pdev) * Read master names from DT */ for (i = 0; i < ss.num_masters; i++) { - const char *master_name; + const char *master_name = NULL; of_property_read_string_index(pdev->dev.of_node, "qcom,masters", @@ -377,8 +378,9 @@ static int msm_rpmstats_probe(struct platform_device *pdev) pr_err("%s:Failed to get memory\n", __func__); return -ENOMEM; } + master_name_len = strlen(master_name); strlcpy(ss.master[i], master_name, - strlen(master_name) + 1); + master_name_len + 1); } dent = debugfs_create_file("system_stats", S_IRUGO, NULL, diff --git a/drivers/thermal/msm-tsens.c b/drivers/thermal/msm-tsens.c index d65e0b62c6c5..558d09efab53 100644 --- a/drivers/thermal/msm-tsens.c +++ b/drivers/thermal/msm-tsens.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-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 @@ -995,7 +995,8 @@ static int tsens_tm_activate_trip_type(struct thermal_zone_device *thermal, switch (trip) { case TSENS_TM_TRIP_CRITICAL: tmdev->sensor[tm_sensor->sensor_hw_num]. - debug_thr_state_copy.crit_th_state = mode; + debug_thr_state_copy.crit_th_state = + (enum thermal_device_mode) mode; reg_cntl = readl_relaxed(TSENS_TM_CRITICAL_INT_MASK (tmdev->tsens_addr)); if (mode == THERMAL_TRIP_ACTIVATION_DISABLED) @@ -1009,7 +1010,8 @@ static int tsens_tm_activate_trip_type(struct thermal_zone_device *thermal, break; case TSENS_TM_TRIP_WARM: tmdev->sensor[tm_sensor->sensor_hw_num]. - debug_thr_state_copy.high_th_state = mode; + debug_thr_state_copy.high_th_state = + (enum thermal_device_mode) mode; reg_cntl = readl_relaxed(TSENS_TM_UPPER_LOWER_INT_MASK (tmdev->tsens_addr)); if (mode == THERMAL_TRIP_ACTIVATION_DISABLED) @@ -1025,7 +1027,8 @@ static int tsens_tm_activate_trip_type(struct thermal_zone_device *thermal, break; case TSENS_TM_TRIP_COOL: tmdev->sensor[tm_sensor->sensor_hw_num]. - debug_thr_state_copy.low_th_state = mode; + debug_thr_state_copy.low_th_state = + (enum thermal_device_mode) mode; reg_cntl = readl_relaxed(TSENS_TM_UPPER_LOWER_INT_MASK (tmdev->tsens_addr)); if (mode == THERMAL_TRIP_ACTIVATION_DISABLED) @@ -1071,7 +1074,8 @@ static int tsens_tz_activate_trip_type(struct thermal_zone_device *thermal, switch (trip) { case TSENS_TRIP_WARM: tmdev->sensor[tm_sensor->sensor_hw_num]. - debug_thr_state_copy.high_th_state = mode; + debug_thr_state_copy.high_th_state = + (enum thermal_device_mode)mode; code = (reg_cntl & TSENS_UPPER_THRESHOLD_MASK) >> TSENS_UPPER_THRESHOLD_SHIFT; @@ -1082,7 +1086,8 @@ static int tsens_tz_activate_trip_type(struct thermal_zone_device *thermal, break; case TSENS_TRIP_COOL: tmdev->sensor[tm_sensor->sensor_hw_num]. - debug_thr_state_copy.low_th_state = mode; + debug_thr_state_copy.low_th_state = + (enum thermal_device_mode)mode; code = (reg_cntl & TSENS_LOWER_THRESHOLD_MASK); mask = TSENS_LOWER_STATUS_CLR; diff --git a/drivers/thermal/msm_thermal.c b/drivers/thermal/msm_thermal.c index 9f47a1986f85..cc2f00b2c3d0 100644 --- a/drivers/thermal/msm_thermal.c +++ b/drivers/thermal/msm_thermal.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 @@ -2803,7 +2803,7 @@ static int do_vdd_mx(void) } } - if ((dis_cnt == thresh[MSM_VDD_MX_RESTRICTION].thresh_ct)) { + if (dis_cnt == thresh[MSM_VDD_MX_RESTRICTION].thresh_ct) { ret = remove_vdd_mx_restriction(); if (ret) pr_err("Failed to remove vdd mx restriction\n"); @@ -6293,7 +6293,7 @@ static int fetch_cpu_mitigaiton_info(struct msm_thermal_data *data, struct platform_device *pdev) { - int _cpu = 0, err = 0; + int _cpu = 0, err = 0, sensor_name_len = 0; struct device_node *cpu_node = NULL, *limits = NULL, *tsens = NULL; char *key = NULL; struct device_node *node = pdev->dev.of_node; @@ -6351,8 +6351,9 @@ static int fetch_cpu_mitigaiton_info(struct msm_thermal_data *data, err = -ENOMEM; goto fetch_mitig_exit; } + sensor_name_len = strlen(sensor_name); strlcpy((char *) cpus[_cpu].sensor_type, sensor_name, - strlen(sensor_name) + 1); + sensor_name_len + 1); create_alias_name(_cpu, limits, pdev); } diff --git a/drivers/thermal/qpnp-temp-alarm.c b/drivers/thermal/qpnp-temp-alarm.c index 8c516da1d9ab..760205b107eb 100644 --- a/drivers/thermal/qpnp-temp-alarm.c +++ b/drivers/thermal/qpnp-temp-alarm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2011-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 @@ -544,12 +544,6 @@ static int qpnp_tm_probe(struct platform_device *pdev) int rc = 0; u8 raw_type[2], type, subtype; - if (!pdev || !(&pdev->dev) || !pdev->dev.of_node) { - dev_err(&pdev->dev, "%s: device tree node not found\n", - __func__); - return -EINVAL; - } - node = pdev->dev.of_node; chip = kzalloc(sizeof(struct qpnp_tm_chip), GFP_KERNEL); diff --git a/drivers/video/fbdev/msm/dsi_status_6g.c b/drivers/video/fbdev/msm/dsi_status_6g.c index d86110251925..8a962efcf2f0 100644 --- a/drivers/video/fbdev/msm/dsi_status_6g.c +++ b/drivers/video/fbdev/msm/dsi_status_6g.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-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 diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c index ce359b5c109b..72ca10f600a7 100644 --- a/drivers/video/fbdev/msm/mdss_fb.c +++ b/drivers/video/fbdev/msm/mdss_fb.c @@ -3994,7 +3994,7 @@ static int mdss_fb_set_par(struct fb_info *info) { struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par; struct fb_var_screeninfo *var = &info->var; - int old_imgType, old_format; + int old_imgType, old_format, out_format; int ret = 0; ret = mdss_fb_pan_idle(mfd); @@ -4078,9 +4078,9 @@ static int mdss_fb_set_par(struct fb_info *info) mfd->fbi->var.yres) * mfd->fb_page; old_format = mfd->panel_info->out_format; - mfd->panel_info->out_format = - mdss_grayscale_to_mdp_format(var->grayscale); - if (!IS_ERR_VALUE(mfd->panel_info->out_format)) { + out_format = mdss_grayscale_to_mdp_format(var->grayscale); + if (!IS_ERR_VALUE(out_format)) { + mfd->panel_info->out_format = out_format; if (old_format != mfd->panel_info->out_format) mfd->panel_reconfig = true; } diff --git a/fs/ecryptfs/debug.c b/fs/ecryptfs/debug.c index 0556af1adfb7..ea2c4a97fddc 100644 --- a/fs/ecryptfs/debug.c +++ b/fs/ecryptfs/debug.c @@ -139,11 +139,11 @@ void ecryptfs_dump_cipher(struct ecryptfs_crypt_stat *stat) if (!stat) return; - if (stat->cipher) + if (stat->cipher != NULL) ecryptfs_printk(KERN_DEBUG, "ecryptfs cipher is %s\n", stat->cipher); - if (stat->cipher_mode) + if (stat->cipher_mode != NULL) ecryptfs_printk(KERN_DEBUG, "ecryptfs cipher mode is %s\n", stat->cipher_mode); diff --git a/gen_headers_arm.bp b/gen_headers_arm.bp new file mode 100644 index 000000000000..9ee49cdfad39 --- /dev/null +++ b/gen_headers_arm.bp @@ -0,0 +1,978 @@ +// ***** DO NOT EDIT ***** +// This file is generated by kernel_headers.py + +gen_headers_srcs_arm = [ + "arch/arm/include/uapi/asm/Kbuild", + "include/uapi/asm-generic/Kbuild.asm", + "Makefile", + "arch/arm/tools/syscall.tbl", + "include/uapi/**/*.h", + "arch/arm/include/uapi/**/*.h", +] + +gen_headers_exclude_srcs_arm = [ + "include/uapi/linux/a.out.h", + "include/uapi/drm/armada_drm.h", + "include/uapi/drm/omap_drm.h", + "include/uapi/linux/auto_dev-ioctl.h", + "include/uapi/linux/batman_adv.h", + "include/uapi/linux/bcache.h", + "include/uapi/linux/btrfs_tree.h", + "include/uapi/linux/cryptouser.h", + "include/uapi/linux/dma-buf.h", + "include/uapi/linux/hash_info.h", + "include/uapi/linux/kcm.h", + "include/uapi/linux/kcov.h", + "include/uapi/linux/kfd_ioctl.h", + "include/uapi/linux/lightnvm.h", + "include/uapi/linux/module.h", + "include/uapi/linux/nilfs2_api.h", + "include/uapi/linux/nilfs2_ondisk.h", + "include/uapi/linux/nsfs.h", + "include/uapi/linux/pr.h", + "include/uapi/linux/stm.h", + "include/uapi/linux/tee.h", + "include/uapi/linux/userio.h", + "include/uapi/linux/wil6210_uapi.h", + "include/uapi/rdma/qedr-abi.h", + "include/uapi/video/adf.h", + "include/uapi/linux/cifs/cifs_mount.h", + "include/uapi/linux/genwqe/genwqe_card.h", + "include/uapi/linux/goldfish/goldfish_dma.h", + "include/uapi/linux/netfilter/xt_HARDIDLETIMER.h", + "include/uapi/linux/netfilter/xt_SYNPROXY.h", + "include/uapi/linux/usb/f_accessory.h", + "include/uapi/linux/usb/f_mtp.h", +] + +gen_headers_out_arm = [ + + // Matching generated-y: + + "asm/unistd-common.h", + "asm/unistd-oabi.h", + "asm/unistd-eabi.h", + + // Matching mandatory-y: + + "asm/bitsperlong.h", + "asm/errno.h", + "asm/ioctl.h", + "asm/ipcbuf.h", + "asm/msgbuf.h", + "asm/param.h", + "asm/poll.h", + "asm/resource.h", + "asm/sembuf.h", + "asm/shmbuf.h", + "asm/siginfo.h", + "asm/socket.h", + "asm/sockios.h", + "asm/termbits.h", + "asm/termios.h", + + // From include/uapi/**/*.h + + "asm-generic/auxvec.h", + "asm-generic/bitsperlong.h", + "asm-generic/errno-base.h", + "asm-generic/errno.h", + "asm-generic/fcntl.h", + "asm-generic/int-l64.h", + "asm-generic/int-ll64.h", + "asm-generic/ioctl.h", + "asm-generic/ioctls.h", + "asm-generic/ipcbuf.h", + "asm-generic/kvm_para.h", + "asm-generic/mman-common.h", + "asm-generic/mman.h", + "asm-generic/msgbuf.h", + "asm-generic/param.h", + "asm-generic/poll.h", + "asm-generic/posix_types.h", + "asm-generic/resource.h", + "asm-generic/sembuf.h", + "asm-generic/setup.h", + "asm-generic/shmbuf.h", + "asm-generic/shmparam.h", + "asm-generic/siginfo.h", + "asm-generic/signal-defs.h", + "asm-generic/signal.h", + "asm-generic/socket.h", + "asm-generic/sockios.h", + "asm-generic/stat.h", + "asm-generic/statfs.h", + "asm-generic/swab.h", + "asm-generic/termbits.h", + "asm-generic/termios.h", + "asm-generic/types.h", + "asm-generic/ucontext.h", + "asm-generic/unistd.h", + "drm/drm.h", + "drm/drm_fourcc.h", + "drm/drm_mode.h", + "drm/drm_sarea.h", + "drm/exynos_drm.h", + "drm/i810_drm.h", + "drm/i915_drm.h", + "drm/mga_drm.h", + "drm/msm_drm.h", + "drm/msm_drm_pp.h", + "drm/nouveau_drm.h", + "drm/qxl_drm.h", + "drm/r128_drm.h", + "drm/radeon_drm.h", + "drm/savage_drm.h", + "drm/sde_drm.h", + "drm/sis_drm.h", + "drm/tegra_drm.h", + "drm/via_drm.h", + "drm/virtgpu_drm.h", + "drm/vmwgfx_drm.h", + "linux/acct.h", + "linux/adb.h", + "linux/adfs_fs.h", + "linux/affs_hardblocks.h", + "linux/agpgart.h", + "linux/aio_abi.h", + "linux/am437x-vpfe.h", + "linux/android_pmem.h", + "linux/apm_bios.h", + "linux/arcfb.h", + "linux/ashmem.h", + "linux/atalk.h", + "linux/atm.h", + "linux/atm_eni.h", + "linux/atm_he.h", + "linux/atm_idt77105.h", + "linux/atm_nicstar.h", + "linux/atm_tcp.h", + "linux/atm_zatm.h", + "linux/atmapi.h", + "linux/atmarp.h", + "linux/atmbr2684.h", + "linux/atmclip.h", + "linux/atmdev.h", + "linux/atmioc.h", + "linux/atmlec.h", + "linux/atmmpc.h", + "linux/atmppp.h", + "linux/atmsap.h", + "linux/atmsvc.h", + "linux/audit.h", + "linux/auto_fs.h", + "linux/auto_fs4.h", + "linux/auxvec.h", + "linux/avtimer.h", + "linux/ax25.h", + "linux/b1lli.h", + "linux/batterydata-interface.h", + "linux/baycom.h", + "linux/bcm933xx_hcs.h", + "linux/bfs_fs.h", + "linux/binfmts.h", + "linux/blkpg.h", + "linux/blktrace_api.h", + "linux/bpf.h", + "linux/bpf_common.h", + "linux/bpqether.h", + "linux/bsg.h", + "linux/btrfs.h", + "linux/can.h", + "linux/capability.h", + "linux/capi.h", + "linux/cciss_defs.h", + "linux/cciss_ioctl.h", + "linux/cdrom.h", + "linux/cec-funcs.h", + "linux/cec.h", + "linux/cgroupstats.h", + "linux/chio.h", + "linux/cm4000_cs.h", + "linux/cn_proc.h", + "linux/coda.h", + "linux/coda_psdev.h", + "linux/coff.h", + "linux/connector.h", + "linux/const.h", + "linux/cramfs_fs.h", + "linux/cuda.h", + "linux/cyclades.h", + "linux/cycx_cfm.h", + "linux/dcbnl.h", + "linux/dccp.h", + "linux/dlm.h", + "linux/dlm_device.h", + "linux/dlm_netlink.h", + "linux/dlm_plock.h", + "linux/dlmconstants.h", + "linux/dm-ioctl.h", + "linux/dm-log-userspace.h", + "linux/dn.h", + "linux/dqblk_xfs.h", + "linux/edd.h", + "linux/efs_fs_sb.h", + "linux/elf-em.h", + "linux/elf-fdpic.h", + "linux/elf.h", + "linux/elfcore.h", + "linux/epm_adc.h", + "linux/errno.h", + "linux/errqueue.h", + "linux/esoc_ctrl.h", + "linux/ethtool.h", + "linux/eventpoll.h", + "linux/fadvise.h", + "linux/falloc.h", + "linux/fanotify.h", + "linux/fb.h", + "linux/fcntl.h", + "linux/fd.h", + "linux/fdreg.h", + "linux/fib_rules.h", + "linux/fiemap.h", + "linux/filter.h", + "linux/fips_status.h", + "linux/firewire-cdev.h", + "linux/firewire-constants.h", + "linux/flat.h", + "linux/fou.h", + "linux/fs.h", + "linux/fsl_hypervisor.h", + "linux/fuse.h", + "linux/futex.h", + "linux/gameport.h", + "linux/gen_stats.h", + "linux/genetlink.h", + "linux/gfs2_ondisk.h", + "linux/gigaset_dev.h", + "linux/gsmmux.h", + "linux/hab_ioctl.h", + "linux/habmmid.h", + "linux/hbtp_input.h", + "linux/hbtp_vm.h", + "linux/hdlc.h", + "linux/hdlcdrv.h", + "linux/hdreg.h", + "linux/hid.h", + "linux/hiddev.h", + "linux/hidraw.h", + "linux/hpet.h", + "linux/hsr_netlink.h", + "linux/hw_breakpoint.h", + "linux/hyperv.h", + "linux/hysdn_if.h", + "linux/i2c-dev.h", + "linux/i2c.h", + "linux/i2o-dev.h", + "linux/i8k.h", + "linux/icmp.h", + "linux/icmpv6.h", + "linux/if.h", + "linux/if_addr.h", + "linux/if_addrlabel.h", + "linux/if_alg.h", + "linux/if_arcnet.h", + "linux/if_arp.h", + "linux/if_bonding.h", + "linux/if_bridge.h", + "linux/if_cablemodem.h", + "linux/if_eql.h", + "linux/if_ether.h", + "linux/if_fc.h", + "linux/if_fddi.h", + "linux/if_frad.h", + "linux/if_hippi.h", + "linux/if_infiniband.h", + "linux/if_link.h", + "linux/if_ltalk.h", + "linux/if_packet.h", + "linux/if_phonet.h", + "linux/if_plip.h", + "linux/if_ppp.h", + "linux/if_pppol2tp.h", + "linux/if_pppolac.h", + "linux/if_pppopns.h", + "linux/if_pppox.h", + "linux/if_slip.h", + "linux/if_team.h", + "linux/if_tun.h", + "linux/if_tunnel.h", + "linux/if_vlan.h", + "linux/if_x25.h", + "linux/igmp.h", + "linux/ila.h", + "linux/in.h", + "linux/in6.h", + "linux/in_route.h", + "linux/inet_diag.h", + "linux/inotify.h", + "linux/input-event-codes.h", + "linux/input.h", + "linux/ioctl.h", + "linux/ion.h", + "linux/ion_test.h", + "linux/ip.h", + "linux/ip6_tunnel.h", + "linux/ip_vs.h", + "linux/ipa_qmi_service_v01.h", + "linux/ipc.h", + "linux/ipmi.h", + "linux/ipmi_msgdefs.h", + "linux/ipsec.h", + "linux/ipv6.h", + "linux/ipv6_route.h", + "linux/ipx.h", + "linux/irda.h", + "linux/irqnr.h", + "linux/isdn.h", + "linux/isdn_divertif.h", + "linux/isdn_ppp.h", + "linux/isdnif.h", + "linux/iso_fs.h", + "linux/ivtv.h", + "linux/ivtvfb.h", + "linux/ixjuser.h", + "linux/jffs2.h", + "linux/joystick.h", + "linux/kcmp.h", + "linux/kd.h", + "linux/kdev_t.h", + "linux/kernel-page-flags.h", + "linux/kernel.h", + "linux/kernelcapi.h", + "linux/kexec.h", + "linux/keyboard.h", + "linux/keyctl.h", + "linux/kvm.h", + "linux/kvm_para.h", + "linux/l2tp.h", + "linux/libc-compat.h", + "linux/limits.h", + "linux/llc.h", + "linux/loop.h", + "linux/lp.h", + "linux/lwtunnel.h", + "linux/magic.h", + "linux/major.h", + "linux/map_to_7segment.h", + "linux/matroxfb.h", + "linux/maxim_sti.h", + "linux/mdio.h", + "linux/mdss_rotator.h", + "linux/media-bus-format.h", + "linux/media.h", + "linux/mei.h", + "linux/membarrier.h", + "linux/memfd.h", + "linux/mempolicy.h", + "linux/meye.h", + "linux/mhi.h", + "linux/mic_common.h", + "linux/mic_ioctl.h", + "linux/mii.h", + "linux/minix_fs.h", + "linux/mman.h", + "linux/mmtimer.h", + "linux/mpls.h", + "linux/mpls_iptunnel.h", + "linux/mqueue.h", + "linux/mroute.h", + "linux/mroute6.h", + "linux/msdos_fs.h", + "linux/msg.h", + "linux/msm-core-interface.h", + "linux/msm_adsp.h", + "linux/msm_audio.h", + "linux/msm_audio_aac.h", + "linux/msm_audio_ac3.h", + "linux/msm_audio_alac.h", + "linux/msm_audio_amrnb.h", + "linux/msm_audio_amrwb.h", + "linux/msm_audio_amrwbplus.h", + "linux/msm_audio_anc.h", + "linux/msm_audio_ape.h", + "linux/msm_audio_calibration.h", + "linux/msm_audio_g711.h", + "linux/msm_audio_g711_dec.h", + "linux/msm_audio_mvs.h", + "linux/msm_audio_qcp.h", + "linux/msm_audio_sbc.h", + "linux/msm_audio_voicememo.h", + "linux/msm_audio_wma.h", + "linux/msm_audio_wmapro.h", + "linux/msm_dsps.h", + "linux/msm_ion.h", + "linux/msm_ipa.h", + "linux/msm_ipc.h", + "linux/msm_kgsl.h", + "linux/msm_mdp.h", + "linux/msm_mdp_ext.h", + "linux/msm_pft.h", + "linux/msm_rmnet.h", + "linux/msm_rotator.h", + "linux/msm_thermal_ioctl.h", + "linux/msm_vidc_dec.h", + "linux/msm_vidc_enc.h", + "linux/mtio.h", + "linux/n_r3964.h", + "linux/nbd.h", + "linux/ncp.h", + "linux/ncp_fs.h", + "linux/ncp_mount.h", + "linux/ncp_no.h", + "linux/ndctl.h", + "linux/neighbour.h", + "linux/net.h", + "linux/net_dropmon.h", + "linux/net_map.h", + "linux/net_namespace.h", + "linux/net_tstamp.h", + "linux/netconf.h", + "linux/netdevice.h", + "linux/netfilter.h", + "linux/netfilter_arp.h", + "linux/netfilter_bridge.h", + "linux/netfilter_decnet.h", + "linux/netfilter_ipv4.h", + "linux/netfilter_ipv6.h", + "linux/netlink.h", + "linux/netlink_diag.h", + "linux/netrom.h", + "linux/nfc.h", + "linux/nfs.h", + "linux/nfs2.h", + "linux/nfs3.h", + "linux/nfs4.h", + "linux/nfs4_mount.h", + "linux/nfs_fs.h", + "linux/nfs_idmap.h", + "linux/nfs_mount.h", + "linux/nfsacl.h", + "linux/nl80211.h", + "linux/nubus.h", + "linux/nvme_ioctl.h", + "linux/nvram.h", + "linux/omap3isp.h", + "linux/omapfb.h", + "linux/oneshot_sync.h", + "linux/oom.h", + "linux/openvswitch.h", + "linux/packet_diag.h", + "linux/param.h", + "linux/parport.h", + "linux/patchkey.h", + "linux/pci.h", + "linux/pci_regs.h", + "linux/perf_event.h", + "linux/personality.h", + "linux/pfkeyv2.h", + "linux/pg.h", + "linux/phantom.h", + "linux/phonet.h", + "linux/pkt_cls.h", + "linux/pkt_sched.h", + "linux/pktcdvd.h", + "linux/pmu.h", + "linux/poll.h", + "linux/posix_types.h", + "linux/ppdev.h", + "linux/ppp-comp.h", + "linux/ppp-ioctl.h", + "linux/ppp_defs.h", + "linux/pps.h", + "linux/prctl.h", + "linux/psci.h", + "linux/ptp_clock.h", + "linux/ptrace.h", + "linux/qbt1000.h", + "linux/qcedev.h", + "linux/qcota.h", + "linux/qnx4_fs.h", + "linux/qnxtypes.h", + "linux/qrng.h", + "linux/qseecom.h", + "linux/quota.h", + "linux/radeonfb.h", + "linux/random.h", + "linux/raw.h", + "linux/rds.h", + "linux/reboot.h", + "linux/reiserfs_fs.h", + "linux/reiserfs_xattr.h", + "linux/resource.h", + "linux/rfkill.h", + "linux/rmnet.h", + "linux/rmnet_data.h", + "linux/rmnet_ipa_fd_ioctl.h", + "linux/romfs_fs.h", + "linux/rose.h", + "linux/route.h", + "linux/rtc.h", + "linux/rtnetlink.h", + "linux/scc.h", + "linux/sched.h", + "linux/scif_ioctl.h", + "linux/screen_info.h", + "linux/sctp.h", + "linux/sdla.h", + "linux/seccomp.h", + "linux/securebits.h", + "linux/seemp_api.h", + "linux/seemp_param_id.h", + "linux/selinux_netlink.h", + "linux/sem.h", + "linux/serial.h", + "linux/serial_core.h", + "linux/serial_reg.h", + "linux/serio.h", + "linux/shm.h", + "linux/signal.h", + "linux/signalfd.h", + "linux/smcinvoke.h", + "linux/smiapp.h", + "linux/snmp.h", + "linux/sock_diag.h", + "linux/socket.h", + "linux/sockev.h", + "linux/sockios.h", + "linux/sonet.h", + "linux/sonypi.h", + "linux/sound.h", + "linux/soundcard.h", + "linux/spcom.h", + "linux/stat.h", + "linux/stddef.h", + "linux/string.h", + "linux/suspend_ioctls.h", + "linux/sw_sync.h", + "linux/swab.h", + "linux/sync.h", + "linux/synclink.h", + "linux/sysctl.h", + "linux/sysinfo.h", + "linux/target_core_user.h", + "linux/taskstats.h", + "linux/tcp.h", + "linux/tcp_metrics.h", + "linux/telephony.h", + "linux/termios.h", + "linux/thermal.h", + "linux/time.h", + "linux/times.h", + "linux/timex.h", + "linux/tiocl.h", + "linux/tipc.h", + "linux/tipc_config.h", + "linux/tipc_netlink.h", + "linux/toshiba.h", + "linux/tty.h", + "linux/tty_flags.h", + "linux/types.h", + "linux/udf_fs_i.h", + "linux/udp.h", + "linux/uhid.h", + "linux/uinput.h", + "linux/uio.h", + "linux/ultrasound.h", + "linux/un.h", + "linux/unistd.h", + "linux/unix_diag.h", + "linux/usbdevice_fs.h", + "linux/usbip.h", + "linux/userfaultfd.h", + "linux/utime.h", + "linux/utsname.h", + "linux/uuid.h", + "linux/uvcvideo.h", + "linux/v4l2-common.h", + "linux/v4l2-controls.h", + "linux/v4l2-dv-timings.h", + "linux/v4l2-mediabus.h", + "linux/v4l2-subdev.h", + "linux/veth.h", + "linux/vfio.h", + "linux/vhost.h", + "linux/videodev2.h", + "linux/virtio_9p.h", + "linux/virtio_balloon.h", + "linux/virtio_blk.h", + "linux/virtio_config.h", + "linux/virtio_console.h", + "linux/virtio_gpu.h", + "linux/virtio_ids.h", + "linux/virtio_input.h", + "linux/virtio_net.h", + "linux/virtio_pci.h", + "linux/virtio_ring.h", + "linux/virtio_rng.h", + "linux/virtio_scsi.h", + "linux/virtio_types.h", + "linux/virtio_vsock.h", + "linux/vm_sockets.h", + "linux/vt.h", + "linux/wait.h", + "linux/wanrouter.h", + "linux/watchdog.h", + "linux/wimax.h", + "linux/wireless.h", + "linux/x25.h", + "linux/xattr.h", + "linux/xfrm.h", + "linux/xilinx-v4l2-controls.h", + "linux/zorro.h", + "linux/zorro_ids.h", + "media/msm_ba.h", + "media/msm_cam_sensor.h", + "media/msm_camera.h", + "media/msm_camsensor_sdk.h", + "media/msm_fd.h", + "media/msm_gemini.h", + "media/msm_gestures.h", + "media/msm_isp.h", + "media/msm_jpeg.h", + "media/msm_jpeg_dma.h", + "media/msm_media_info.h", + "media/msm_mercury.h", + "media/msm_sde_rotator.h", + "media/msm_vidc.h", + "media/msm_vpu.h", + "media/msmb_camera.h", + "media/msmb_generic_buf_mgr.h", + "media/msmb_isp.h", + "media/msmb_ispif.h", + "media/msmb_pproc.h", + "media/radio-iris-commands.h", + "media/radio-iris.h", + "misc/cxl.h", + "mtd/inftl-user.h", + "mtd/mtd-abi.h", + "mtd/mtd-user.h", + "mtd/nftl-user.h", + "mtd/ubi-user.h", + "rdma/ib_user_cm.h", + "rdma/ib_user_mad.h", + "rdma/ib_user_sa.h", + "rdma/ib_user_verbs.h", + "rdma/rdma_netlink.h", + "rdma/rdma_user_cm.h", + "scsi/cxlflash_ioctl.h", + "scsi/scsi_bsg_fc.h", + "scsi/scsi_ioctl.h", + "scsi/scsi_netlink.h", + "scsi/scsi_netlink_fc.h", + "scsi/sg.h", + "sound/asequencer.h", + "sound/asound.h", + "sound/asound_fm.h", + "sound/audio_effects.h", + "sound/audio_slimslave.h", + "sound/compress_offload.h", + "sound/compress_params.h", + "sound/devdep_params.h", + "sound/emu10k1.h", + "sound/firewire.h", + "sound/hdsp.h", + "sound/hdspm.h", + "sound/lsm_params.h", + "sound/msmcal-hwdep.h", + "sound/sb16_csp.h", + "sound/sfnt_info.h", + "sound/tlv.h", + "sound/voice_params.h", + "sound/voice_svc.h", + "sound/wcd-dsp-glink.h", + "video/edid.h", + "video/msm_hdmi_hdcp_mgr.h", + "video/msm_hdmi_modes.h", + "video/sisfb.h", + "video/uvesafb.h", + "xen/evtchn.h", + "xen/gntalloc.h", + "xen/gntdev.h", + "xen/privcmd.h", + "linux/android/binder.h", + "linux/byteorder/big_endian.h", + "linux/byteorder/little_endian.h", + "linux/caif/caif_socket.h", + "linux/caif/if_caif.h", + "linux/can/bcm.h", + "linux/can/error.h", + "linux/can/gw.h", + "linux/can/netlink.h", + "linux/can/raw.h", + "linux/dvb/audio.h", + "linux/dvb/ca.h", + "linux/dvb/dmx.h", + "linux/dvb/frontend.h", + "linux/dvb/net.h", + "linux/dvb/osd.h", + "linux/dvb/version.h", + "linux/dvb/video.h", + "linux/hdlc/ioctl.h", + "linux/hsi/cs-protocol.h", + "linux/hsi/hsi_char.h", + "linux/iio/events.h", + "linux/iio/types.h", + "linux/isdn/capicmd.h", + "linux/mfd/msm-adie-codec.h", + "linux/mmc/core.h", + "linux/mmc/ioctl.h", + "linux/mmc/mmc.h", + "linux/netfilter/nf_conntrack_common.h", + "linux/netfilter/nf_conntrack_ftp.h", + "linux/netfilter/nf_conntrack_sctp.h", + "linux/netfilter/nf_conntrack_tcp.h", + "linux/netfilter/nf_conntrack_tuple_common.h", + "linux/netfilter/nf_nat.h", + "linux/netfilter/nf_tables.h", + "linux/netfilter/nf_tables_compat.h", + "linux/netfilter/nfnetlink.h", + "linux/netfilter/nfnetlink_acct.h", + "linux/netfilter/nfnetlink_compat.h", + "linux/netfilter/nfnetlink_conntrack.h", + "linux/netfilter/nfnetlink_cthelper.h", + "linux/netfilter/nfnetlink_cttimeout.h", + "linux/netfilter/nfnetlink_log.h", + "linux/netfilter/nfnetlink_queue.h", + "linux/netfilter/x_tables.h", + "linux/netfilter/xt_AUDIT.h", + "linux/netfilter/xt_CHECKSUM.h", + "linux/netfilter/xt_CLASSIFY.h", + "linux/netfilter/xt_CONNMARK.h", + "linux/netfilter/xt_CONNSECMARK.h", + "linux/netfilter/xt_CT.h", + "linux/netfilter/xt_DSCP.h", + "linux/netfilter/xt_HMARK.h", + "linux/netfilter/xt_IDLETIMER.h", + "linux/netfilter/xt_LED.h", + "linux/netfilter/xt_LOG.h", + "linux/netfilter/xt_MARK.h", + "linux/netfilter/xt_NFLOG.h", + "linux/netfilter/xt_NFQUEUE.h", + "linux/netfilter/xt_RATEEST.h", + "linux/netfilter/xt_SECMARK.h", + "linux/netfilter/xt_TCPMSS.h", + "linux/netfilter/xt_TCPOPTSTRIP.h", + "linux/netfilter/xt_TEE.h", + "linux/netfilter/xt_TPROXY.h", + "linux/netfilter/xt_addrtype.h", + "linux/netfilter/xt_bpf.h", + "linux/netfilter/xt_cgroup.h", + "linux/netfilter/xt_cluster.h", + "linux/netfilter/xt_comment.h", + "linux/netfilter/xt_connbytes.h", + "linux/netfilter/xt_connlabel.h", + "linux/netfilter/xt_connlimit.h", + "linux/netfilter/xt_connmark.h", + "linux/netfilter/xt_conntrack.h", + "linux/netfilter/xt_cpu.h", + "linux/netfilter/xt_dccp.h", + "linux/netfilter/xt_devgroup.h", + "linux/netfilter/xt_dscp.h", + "linux/netfilter/xt_ecn.h", + "linux/netfilter/xt_esp.h", + "linux/netfilter/xt_hashlimit.h", + "linux/netfilter/xt_helper.h", + "linux/netfilter/xt_ipcomp.h", + "linux/netfilter/xt_iprange.h", + "linux/netfilter/xt_ipvs.h", + "linux/netfilter/xt_l2tp.h", + "linux/netfilter/xt_length.h", + "linux/netfilter/xt_limit.h", + "linux/netfilter/xt_mac.h", + "linux/netfilter/xt_mark.h", + "linux/netfilter/xt_multiport.h", + "linux/netfilter/xt_nfacct.h", + "linux/netfilter/xt_osf.h", + "linux/netfilter/xt_owner.h", + "linux/netfilter/xt_physdev.h", + "linux/netfilter/xt_pkttype.h", + "linux/netfilter/xt_policy.h", + "linux/netfilter/xt_quota.h", + "linux/netfilter/xt_rateest.h", + "linux/netfilter/xt_realm.h", + "linux/netfilter/xt_recent.h", + "linux/netfilter/xt_rpfilter.h", + "linux/netfilter/xt_sctp.h", + "linux/netfilter/xt_set.h", + "linux/netfilter/xt_socket.h", + "linux/netfilter/xt_state.h", + "linux/netfilter/xt_statistic.h", + "linux/netfilter/xt_string.h", + "linux/netfilter/xt_tcpmss.h", + "linux/netfilter/xt_tcpudp.h", + "linux/netfilter/xt_time.h", + "linux/netfilter/xt_u32.h", + "linux/netfilter_arp/arp_tables.h", + "linux/netfilter_arp/arpt_mangle.h", + "linux/netfilter_bridge/ebt_802_3.h", + "linux/netfilter_bridge/ebt_among.h", + "linux/netfilter_bridge/ebt_arp.h", + "linux/netfilter_bridge/ebt_arpreply.h", + "linux/netfilter_bridge/ebt_ip.h", + "linux/netfilter_bridge/ebt_ip6.h", + "linux/netfilter_bridge/ebt_limit.h", + "linux/netfilter_bridge/ebt_log.h", + "linux/netfilter_bridge/ebt_mark_m.h", + "linux/netfilter_bridge/ebt_mark_t.h", + "linux/netfilter_bridge/ebt_nat.h", + "linux/netfilter_bridge/ebt_nflog.h", + "linux/netfilter_bridge/ebt_pkttype.h", + "linux/netfilter_bridge/ebt_redirect.h", + "linux/netfilter_bridge/ebt_stp.h", + "linux/netfilter_bridge/ebt_vlan.h", + "linux/netfilter_bridge/ebtables.h", + "linux/netfilter_ipv4/ip_tables.h", + "linux/netfilter_ipv4/ipt_CLUSTERIP.h", + "linux/netfilter_ipv4/ipt_ECN.h", + "linux/netfilter_ipv4/ipt_LOG.h", + "linux/netfilter_ipv4/ipt_REJECT.h", + "linux/netfilter_ipv4/ipt_TTL.h", + "linux/netfilter_ipv4/ipt_ah.h", + "linux/netfilter_ipv4/ipt_ecn.h", + "linux/netfilter_ipv4/ipt_ttl.h", + "linux/netfilter_ipv6/ip6_tables.h", + "linux/netfilter_ipv6/ip6t_HL.h", + "linux/netfilter_ipv6/ip6t_LOG.h", + "linux/netfilter_ipv6/ip6t_NPT.h", + "linux/netfilter_ipv6/ip6t_REJECT.h", + "linux/netfilter_ipv6/ip6t_ah.h", + "linux/netfilter_ipv6/ip6t_frag.h", + "linux/netfilter_ipv6/ip6t_hl.h", + "linux/netfilter_ipv6/ip6t_ipv6header.h", + "linux/netfilter_ipv6/ip6t_mh.h", + "linux/netfilter_ipv6/ip6t_opts.h", + "linux/netfilter_ipv6/ip6t_rt.h", + "linux/nfc/nfcinfo.h", + "linux/nfsd/cld.h", + "linux/nfsd/debug.h", + "linux/nfsd/export.h", + "linux/nfsd/nfsfh.h", + "linux/nfsd/stats.h", + "linux/raid/md_p.h", + "linux/raid/md_u.h", + "linux/spi/spidev.h", + "linux/sunrpc/debug.h", + "linux/tc_act/tc_bpf.h", + "linux/tc_act/tc_connmark.h", + "linux/tc_act/tc_csum.h", + "linux/tc_act/tc_defact.h", + "linux/tc_act/tc_gact.h", + "linux/tc_act/tc_ipt.h", + "linux/tc_act/tc_mirred.h", + "linux/tc_act/tc_nat.h", + "linux/tc_act/tc_pedit.h", + "linux/tc_act/tc_skbedit.h", + "linux/tc_act/tc_vlan.h", + "linux/tc_ematch/tc_em_cmp.h", + "linux/tc_ematch/tc_em_meta.h", + "linux/tc_ematch/tc_em_nbyte.h", + "linux/tc_ematch/tc_em_text.h", + "linux/usb/audio.h", + "linux/usb/cdc-wdm.h", + "linux/usb/cdc.h", + "linux/usb/ch11.h", + "linux/usb/ch9.h", + "linux/usb/functionfs.h", + "linux/usb/g_printer.h", + "linux/usb/gadgetfs.h", + "linux/usb/midi.h", + "linux/usb/tmc.h", + "linux/usb/usb_ctrl_qti.h", + "linux/usb/video.h", + "linux/wimax/i2400m.h", + "media/ais/msm_ais.h", + "media/ais/msm_ais_buf_mgr.h", + "media/ais/msm_ais_isp.h", + "media/ais/msm_ais_ispif.h", + "media/ais/msm_ais_mgr.h", + "media/ais/msm_ais_sensor.h", + "media/ais/msm_ais_sensor_sdk.h", + "rdma/hfi/hfi1_user.h", + "scsi/fc/fc_els.h", + "scsi/fc/fc_fs.h", + "scsi/fc/fc_gs.h", + "scsi/fc/fc_ns.h", + "scsi/ufs/ioctl.h", + "scsi/ufs/ufs.h", + "linux/mfd/wcd9xxx/wcd9320_registers.h", + "linux/mfd/wcd9xxx/wcd9xxx_registers.h", + "linux/netfilter/ipset/ip_set.h", + "linux/netfilter/ipset/ip_set_bitmap.h", + "linux/netfilter/ipset/ip_set_hash.h", + "linux/netfilter/ipset/ip_set_list.h", + + // From arch/arm/include/uapi/**/*.h + + "asm/auxvec.h", + "asm/byteorder.h", + "asm/fcntl.h", + "asm/hwcap.h", + "asm/ioctls.h", + "asm/kvm.h", + "asm/kvm_para.h", + "asm/mman.h", + "asm/perf_regs.h", + "asm/posix_types.h", + "asm/ptrace.h", + "asm/setup.h", + "asm/sigcontext.h", + "asm/signal.h", + "asm/stat.h", + "asm/statfs.h", + "asm/swab.h", + "asm/types.h", + "asm/unistd.h", +] + +genrule { + // This module generates the gen_headers_<arch>.bp file + // (i.e., a new version of this file) so that it can be + // checked later to ensure that it matches the checked- + // in version (this file). + name: "qti_generate_gen_headers_arm", + srcs: gen_headers_srcs_arm, + exclude_srcs: gen_headers_exclude_srcs_arm, + tool_files: ["kernel_headers.py"], + cmd: "python3 $(location kernel_headers.py) " + + kernel_headers_verbose + + "--header_arch arm " + + "--gen_dir $(genDir) " + + "--arch_asm_kbuild $(location arch/arm/include/uapi/asm/Kbuild) " + + "--arch_include_uapi $(locations arch/arm/include/uapi/**/*.h) " + + "--asm_generic_kbuild $(location include/uapi/asm-generic/Kbuild.asm) " + + "blueprints " + + "# $(in)", + out: ["gen_headers_arm.bp"], +} + +genrule { + name: "qti_generate_kernel_headers_arm", + tools: ["headers_install.sh"], + tool_files: [ + "kernel_headers.py", + "arch/arm/tools/syscallhdr.sh", + ], + srcs: gen_headers_srcs_arm +[ + "gen_headers_arm.bp", + ":qti_generate_gen_headers_arm", + ], + exclude_srcs: gen_headers_exclude_srcs_arm, + cmd: "python3 $(location kernel_headers.py) " + + kernel_headers_verbose + + "--header_arch arm " + + "--gen_dir $(genDir) " + + "--arch_asm_kbuild $(location arch/arm/include/uapi/asm/Kbuild) " + + "--arch_include_uapi $(locations arch/arm/include/uapi/**/*.h) " + + "--asm_generic_kbuild $(location include/uapi/asm-generic/Kbuild.asm) " + + "headers " + + "--old_gen_headers_bp $(location gen_headers_arm.bp) " + + "--new_gen_headers_bp $(location :qti_generate_gen_headers_arm) " + + "--version_makefile $(location Makefile) " + + "--arch_syscall_tool $(location arch/arm/tools/syscallhdr.sh) " + + "--arch_syscall_tbl $(location arch/arm/tools/syscall.tbl) " + + "--headers_install $(location headers_install.sh) " + + "--include_uapi $(locations include/uapi/**/*.h)", + out: ["linux/version.h"] + gen_headers_out_arm, +} diff --git a/gen_headers_arm64.bp b/gen_headers_arm64.bp new file mode 100644 index 000000000000..e38d6166cbd0 --- /dev/null +++ b/gen_headers_arm64.bp @@ -0,0 +1,972 @@ +// ***** DO NOT EDIT ***** +// This file is generated by kernel_headers.py + +gen_headers_srcs_arm64 = [ + "arch/arm64/include/uapi/asm/Kbuild", + "include/uapi/asm-generic/Kbuild.asm", + "Makefile", + "include/uapi/**/*.h", + "arch/arm64/include/uapi/**/*.h", +] + +gen_headers_exclude_srcs_arm64 = [ + "include/uapi/linux/a.out.h", + "include/uapi/linux/kvm_para.h", + "include/uapi/drm/armada_drm.h", + "include/uapi/drm/omap_drm.h", + "include/uapi/linux/auto_dev-ioctl.h", + "include/uapi/linux/batman_adv.h", + "include/uapi/linux/bcache.h", + "include/uapi/linux/btrfs_tree.h", + "include/uapi/linux/cryptouser.h", + "include/uapi/linux/dma-buf.h", + "include/uapi/linux/hash_info.h", + "include/uapi/linux/kcm.h", + "include/uapi/linux/kcov.h", + "include/uapi/linux/kfd_ioctl.h", + "include/uapi/linux/lightnvm.h", + "include/uapi/linux/module.h", + "include/uapi/linux/nilfs2_api.h", + "include/uapi/linux/nilfs2_ondisk.h", + "include/uapi/linux/nsfs.h", + "include/uapi/linux/pr.h", + "include/uapi/linux/stm.h", + "include/uapi/linux/tee.h", + "include/uapi/linux/userio.h", + "include/uapi/linux/wil6210_uapi.h", + "include/uapi/rdma/qedr-abi.h", + "include/uapi/video/adf.h", + "include/uapi/linux/cifs/cifs_mount.h", + "include/uapi/linux/genwqe/genwqe_card.h", + "include/uapi/linux/goldfish/goldfish_dma.h", + "include/uapi/linux/netfilter/xt_HARDIDLETIMER.h", + "include/uapi/linux/netfilter/xt_SYNPROXY.h", + "include/uapi/linux/usb/f_accessory.h", + "include/uapi/linux/usb/f_mtp.h", +] + +gen_headers_out_arm64 = [ + + // Matching generic-y: + + "asm/kvm_para.h", + + // Matching mandatory-y: + + "asm/errno.h", + "asm/ioctl.h", + "asm/ioctls.h", + "asm/ipcbuf.h", + "asm/mman.h", + "asm/msgbuf.h", + "asm/poll.h", + "asm/resource.h", + "asm/sembuf.h", + "asm/shmbuf.h", + "asm/socket.h", + "asm/sockios.h", + "asm/swab.h", + "asm/termbits.h", + "asm/termios.h", + "asm/types.h", + + // From include/uapi/**/*.h + + "asm-generic/auxvec.h", + "asm-generic/bitsperlong.h", + "asm-generic/errno-base.h", + "asm-generic/errno.h", + "asm-generic/fcntl.h", + "asm-generic/int-l64.h", + "asm-generic/int-ll64.h", + "asm-generic/ioctl.h", + "asm-generic/ioctls.h", + "asm-generic/ipcbuf.h", + "asm-generic/kvm_para.h", + "asm-generic/mman-common.h", + "asm-generic/mman.h", + "asm-generic/msgbuf.h", + "asm-generic/param.h", + "asm-generic/poll.h", + "asm-generic/posix_types.h", + "asm-generic/resource.h", + "asm-generic/sembuf.h", + "asm-generic/setup.h", + "asm-generic/shmbuf.h", + "asm-generic/shmparam.h", + "asm-generic/siginfo.h", + "asm-generic/signal-defs.h", + "asm-generic/signal.h", + "asm-generic/socket.h", + "asm-generic/sockios.h", + "asm-generic/stat.h", + "asm-generic/statfs.h", + "asm-generic/swab.h", + "asm-generic/termbits.h", + "asm-generic/termios.h", + "asm-generic/types.h", + "asm-generic/ucontext.h", + "asm-generic/unistd.h", + "drm/drm.h", + "drm/drm_fourcc.h", + "drm/drm_mode.h", + "drm/drm_sarea.h", + "drm/exynos_drm.h", + "drm/i810_drm.h", + "drm/i915_drm.h", + "drm/mga_drm.h", + "drm/msm_drm.h", + "drm/msm_drm_pp.h", + "drm/nouveau_drm.h", + "drm/qxl_drm.h", + "drm/r128_drm.h", + "drm/radeon_drm.h", + "drm/savage_drm.h", + "drm/sde_drm.h", + "drm/sis_drm.h", + "drm/tegra_drm.h", + "drm/via_drm.h", + "drm/virtgpu_drm.h", + "drm/vmwgfx_drm.h", + "linux/acct.h", + "linux/adb.h", + "linux/adfs_fs.h", + "linux/affs_hardblocks.h", + "linux/agpgart.h", + "linux/aio_abi.h", + "linux/am437x-vpfe.h", + "linux/android_pmem.h", + "linux/apm_bios.h", + "linux/arcfb.h", + "linux/ashmem.h", + "linux/atalk.h", + "linux/atm.h", + "linux/atm_eni.h", + "linux/atm_he.h", + "linux/atm_idt77105.h", + "linux/atm_nicstar.h", + "linux/atm_tcp.h", + "linux/atm_zatm.h", + "linux/atmapi.h", + "linux/atmarp.h", + "linux/atmbr2684.h", + "linux/atmclip.h", + "linux/atmdev.h", + "linux/atmioc.h", + "linux/atmlec.h", + "linux/atmmpc.h", + "linux/atmppp.h", + "linux/atmsap.h", + "linux/atmsvc.h", + "linux/audit.h", + "linux/auto_fs.h", + "linux/auto_fs4.h", + "linux/auxvec.h", + "linux/avtimer.h", + "linux/ax25.h", + "linux/b1lli.h", + "linux/batterydata-interface.h", + "linux/baycom.h", + "linux/bcm933xx_hcs.h", + "linux/bfs_fs.h", + "linux/binfmts.h", + "linux/blkpg.h", + "linux/blktrace_api.h", + "linux/bpf.h", + "linux/bpf_common.h", + "linux/bpqether.h", + "linux/bsg.h", + "linux/btrfs.h", + "linux/can.h", + "linux/capability.h", + "linux/capi.h", + "linux/cciss_defs.h", + "linux/cciss_ioctl.h", + "linux/cdrom.h", + "linux/cec-funcs.h", + "linux/cec.h", + "linux/cgroupstats.h", + "linux/chio.h", + "linux/cm4000_cs.h", + "linux/cn_proc.h", + "linux/coda.h", + "linux/coda_psdev.h", + "linux/coff.h", + "linux/connector.h", + "linux/const.h", + "linux/cramfs_fs.h", + "linux/cuda.h", + "linux/cyclades.h", + "linux/cycx_cfm.h", + "linux/dcbnl.h", + "linux/dccp.h", + "linux/dlm.h", + "linux/dlm_device.h", + "linux/dlm_netlink.h", + "linux/dlm_plock.h", + "linux/dlmconstants.h", + "linux/dm-ioctl.h", + "linux/dm-log-userspace.h", + "linux/dn.h", + "linux/dqblk_xfs.h", + "linux/edd.h", + "linux/efs_fs_sb.h", + "linux/elf-em.h", + "linux/elf-fdpic.h", + "linux/elf.h", + "linux/elfcore.h", + "linux/epm_adc.h", + "linux/errno.h", + "linux/errqueue.h", + "linux/esoc_ctrl.h", + "linux/ethtool.h", + "linux/eventpoll.h", + "linux/fadvise.h", + "linux/falloc.h", + "linux/fanotify.h", + "linux/fb.h", + "linux/fcntl.h", + "linux/fd.h", + "linux/fdreg.h", + "linux/fib_rules.h", + "linux/fiemap.h", + "linux/filter.h", + "linux/fips_status.h", + "linux/firewire-cdev.h", + "linux/firewire-constants.h", + "linux/flat.h", + "linux/fou.h", + "linux/fs.h", + "linux/fsl_hypervisor.h", + "linux/fuse.h", + "linux/futex.h", + "linux/gameport.h", + "linux/gen_stats.h", + "linux/genetlink.h", + "linux/gfs2_ondisk.h", + "linux/gigaset_dev.h", + "linux/gsmmux.h", + "linux/hab_ioctl.h", + "linux/habmmid.h", + "linux/hbtp_input.h", + "linux/hbtp_vm.h", + "linux/hdlc.h", + "linux/hdlcdrv.h", + "linux/hdreg.h", + "linux/hid.h", + "linux/hiddev.h", + "linux/hidraw.h", + "linux/hpet.h", + "linux/hsr_netlink.h", + "linux/hw_breakpoint.h", + "linux/hyperv.h", + "linux/hysdn_if.h", + "linux/i2c-dev.h", + "linux/i2c.h", + "linux/i2o-dev.h", + "linux/i8k.h", + "linux/icmp.h", + "linux/icmpv6.h", + "linux/if.h", + "linux/if_addr.h", + "linux/if_addrlabel.h", + "linux/if_alg.h", + "linux/if_arcnet.h", + "linux/if_arp.h", + "linux/if_bonding.h", + "linux/if_bridge.h", + "linux/if_cablemodem.h", + "linux/if_eql.h", + "linux/if_ether.h", + "linux/if_fc.h", + "linux/if_fddi.h", + "linux/if_frad.h", + "linux/if_hippi.h", + "linux/if_infiniband.h", + "linux/if_link.h", + "linux/if_ltalk.h", + "linux/if_packet.h", + "linux/if_phonet.h", + "linux/if_plip.h", + "linux/if_ppp.h", + "linux/if_pppol2tp.h", + "linux/if_pppolac.h", + "linux/if_pppopns.h", + "linux/if_pppox.h", + "linux/if_slip.h", + "linux/if_team.h", + "linux/if_tun.h", + "linux/if_tunnel.h", + "linux/if_vlan.h", + "linux/if_x25.h", + "linux/igmp.h", + "linux/ila.h", + "linux/in.h", + "linux/in6.h", + "linux/in_route.h", + "linux/inet_diag.h", + "linux/inotify.h", + "linux/input-event-codes.h", + "linux/input.h", + "linux/ioctl.h", + "linux/ion.h", + "linux/ion_test.h", + "linux/ip.h", + "linux/ip6_tunnel.h", + "linux/ip_vs.h", + "linux/ipa_qmi_service_v01.h", + "linux/ipc.h", + "linux/ipmi.h", + "linux/ipmi_msgdefs.h", + "linux/ipsec.h", + "linux/ipv6.h", + "linux/ipv6_route.h", + "linux/ipx.h", + "linux/irda.h", + "linux/irqnr.h", + "linux/isdn.h", + "linux/isdn_divertif.h", + "linux/isdn_ppp.h", + "linux/isdnif.h", + "linux/iso_fs.h", + "linux/ivtv.h", + "linux/ivtvfb.h", + "linux/ixjuser.h", + "linux/jffs2.h", + "linux/joystick.h", + "linux/kcmp.h", + "linux/kd.h", + "linux/kdev_t.h", + "linux/kernel-page-flags.h", + "linux/kernel.h", + "linux/kernelcapi.h", + "linux/kexec.h", + "linux/keyboard.h", + "linux/keyctl.h", + "linux/kvm.h", + "linux/l2tp.h", + "linux/libc-compat.h", + "linux/limits.h", + "linux/llc.h", + "linux/loop.h", + "linux/lp.h", + "linux/lwtunnel.h", + "linux/magic.h", + "linux/major.h", + "linux/map_to_7segment.h", + "linux/matroxfb.h", + "linux/maxim_sti.h", + "linux/mdio.h", + "linux/mdss_rotator.h", + "linux/media-bus-format.h", + "linux/media.h", + "linux/mei.h", + "linux/membarrier.h", + "linux/memfd.h", + "linux/mempolicy.h", + "linux/meye.h", + "linux/mhi.h", + "linux/mic_common.h", + "linux/mic_ioctl.h", + "linux/mii.h", + "linux/minix_fs.h", + "linux/mman.h", + "linux/mmtimer.h", + "linux/mpls.h", + "linux/mpls_iptunnel.h", + "linux/mqueue.h", + "linux/mroute.h", + "linux/mroute6.h", + "linux/msdos_fs.h", + "linux/msg.h", + "linux/msm-core-interface.h", + "linux/msm_adsp.h", + "linux/msm_audio.h", + "linux/msm_audio_aac.h", + "linux/msm_audio_ac3.h", + "linux/msm_audio_alac.h", + "linux/msm_audio_amrnb.h", + "linux/msm_audio_amrwb.h", + "linux/msm_audio_amrwbplus.h", + "linux/msm_audio_anc.h", + "linux/msm_audio_ape.h", + "linux/msm_audio_calibration.h", + "linux/msm_audio_g711.h", + "linux/msm_audio_g711_dec.h", + "linux/msm_audio_mvs.h", + "linux/msm_audio_qcp.h", + "linux/msm_audio_sbc.h", + "linux/msm_audio_voicememo.h", + "linux/msm_audio_wma.h", + "linux/msm_audio_wmapro.h", + "linux/msm_dsps.h", + "linux/msm_ion.h", + "linux/msm_ipa.h", + "linux/msm_ipc.h", + "linux/msm_kgsl.h", + "linux/msm_mdp.h", + "linux/msm_mdp_ext.h", + "linux/msm_pft.h", + "linux/msm_rmnet.h", + "linux/msm_rotator.h", + "linux/msm_thermal_ioctl.h", + "linux/msm_vidc_dec.h", + "linux/msm_vidc_enc.h", + "linux/mtio.h", + "linux/n_r3964.h", + "linux/nbd.h", + "linux/ncp.h", + "linux/ncp_fs.h", + "linux/ncp_mount.h", + "linux/ncp_no.h", + "linux/ndctl.h", + "linux/neighbour.h", + "linux/net.h", + "linux/net_dropmon.h", + "linux/net_map.h", + "linux/net_namespace.h", + "linux/net_tstamp.h", + "linux/netconf.h", + "linux/netdevice.h", + "linux/netfilter.h", + "linux/netfilter_arp.h", + "linux/netfilter_bridge.h", + "linux/netfilter_decnet.h", + "linux/netfilter_ipv4.h", + "linux/netfilter_ipv6.h", + "linux/netlink.h", + "linux/netlink_diag.h", + "linux/netrom.h", + "linux/nfc.h", + "linux/nfs.h", + "linux/nfs2.h", + "linux/nfs3.h", + "linux/nfs4.h", + "linux/nfs4_mount.h", + "linux/nfs_fs.h", + "linux/nfs_idmap.h", + "linux/nfs_mount.h", + "linux/nfsacl.h", + "linux/nl80211.h", + "linux/nubus.h", + "linux/nvme_ioctl.h", + "linux/nvram.h", + "linux/omap3isp.h", + "linux/omapfb.h", + "linux/oneshot_sync.h", + "linux/oom.h", + "linux/openvswitch.h", + "linux/packet_diag.h", + "linux/param.h", + "linux/parport.h", + "linux/patchkey.h", + "linux/pci.h", + "linux/pci_regs.h", + "linux/perf_event.h", + "linux/personality.h", + "linux/pfkeyv2.h", + "linux/pg.h", + "linux/phantom.h", + "linux/phonet.h", + "linux/pkt_cls.h", + "linux/pkt_sched.h", + "linux/pktcdvd.h", + "linux/pmu.h", + "linux/poll.h", + "linux/posix_types.h", + "linux/ppdev.h", + "linux/ppp-comp.h", + "linux/ppp-ioctl.h", + "linux/ppp_defs.h", + "linux/pps.h", + "linux/prctl.h", + "linux/psci.h", + "linux/ptp_clock.h", + "linux/ptrace.h", + "linux/qbt1000.h", + "linux/qcedev.h", + "linux/qcota.h", + "linux/qnx4_fs.h", + "linux/qnxtypes.h", + "linux/qrng.h", + "linux/qseecom.h", + "linux/quota.h", + "linux/radeonfb.h", + "linux/random.h", + "linux/raw.h", + "linux/rds.h", + "linux/reboot.h", + "linux/reiserfs_fs.h", + "linux/reiserfs_xattr.h", + "linux/resource.h", + "linux/rfkill.h", + "linux/rmnet.h", + "linux/rmnet_data.h", + "linux/rmnet_ipa_fd_ioctl.h", + "linux/romfs_fs.h", + "linux/rose.h", + "linux/route.h", + "linux/rtc.h", + "linux/rtnetlink.h", + "linux/scc.h", + "linux/sched.h", + "linux/scif_ioctl.h", + "linux/screen_info.h", + "linux/sctp.h", + "linux/sdla.h", + "linux/seccomp.h", + "linux/securebits.h", + "linux/seemp_api.h", + "linux/seemp_param_id.h", + "linux/selinux_netlink.h", + "linux/sem.h", + "linux/serial.h", + "linux/serial_core.h", + "linux/serial_reg.h", + "linux/serio.h", + "linux/shm.h", + "linux/signal.h", + "linux/signalfd.h", + "linux/smcinvoke.h", + "linux/smiapp.h", + "linux/snmp.h", + "linux/sock_diag.h", + "linux/socket.h", + "linux/sockev.h", + "linux/sockios.h", + "linux/sonet.h", + "linux/sonypi.h", + "linux/sound.h", + "linux/soundcard.h", + "linux/spcom.h", + "linux/stat.h", + "linux/stddef.h", + "linux/string.h", + "linux/suspend_ioctls.h", + "linux/sw_sync.h", + "linux/swab.h", + "linux/sync.h", + "linux/synclink.h", + "linux/sysctl.h", + "linux/sysinfo.h", + "linux/target_core_user.h", + "linux/taskstats.h", + "linux/tcp.h", + "linux/tcp_metrics.h", + "linux/telephony.h", + "linux/termios.h", + "linux/thermal.h", + "linux/time.h", + "linux/times.h", + "linux/timex.h", + "linux/tiocl.h", + "linux/tipc.h", + "linux/tipc_config.h", + "linux/tipc_netlink.h", + "linux/toshiba.h", + "linux/tty.h", + "linux/tty_flags.h", + "linux/types.h", + "linux/udf_fs_i.h", + "linux/udp.h", + "linux/uhid.h", + "linux/uinput.h", + "linux/uio.h", + "linux/ultrasound.h", + "linux/un.h", + "linux/unistd.h", + "linux/unix_diag.h", + "linux/usbdevice_fs.h", + "linux/usbip.h", + "linux/userfaultfd.h", + "linux/utime.h", + "linux/utsname.h", + "linux/uuid.h", + "linux/uvcvideo.h", + "linux/v4l2-common.h", + "linux/v4l2-controls.h", + "linux/v4l2-dv-timings.h", + "linux/v4l2-mediabus.h", + "linux/v4l2-subdev.h", + "linux/veth.h", + "linux/vfio.h", + "linux/vhost.h", + "linux/videodev2.h", + "linux/virtio_9p.h", + "linux/virtio_balloon.h", + "linux/virtio_blk.h", + "linux/virtio_config.h", + "linux/virtio_console.h", + "linux/virtio_gpu.h", + "linux/virtio_ids.h", + "linux/virtio_input.h", + "linux/virtio_net.h", + "linux/virtio_pci.h", + "linux/virtio_ring.h", + "linux/virtio_rng.h", + "linux/virtio_scsi.h", + "linux/virtio_types.h", + "linux/virtio_vsock.h", + "linux/vm_sockets.h", + "linux/vt.h", + "linux/wait.h", + "linux/wanrouter.h", + "linux/watchdog.h", + "linux/wimax.h", + "linux/wireless.h", + "linux/x25.h", + "linux/xattr.h", + "linux/xfrm.h", + "linux/xilinx-v4l2-controls.h", + "linux/zorro.h", + "linux/zorro_ids.h", + "media/msm_ba.h", + "media/msm_cam_sensor.h", + "media/msm_camera.h", + "media/msm_camsensor_sdk.h", + "media/msm_fd.h", + "media/msm_gemini.h", + "media/msm_gestures.h", + "media/msm_isp.h", + "media/msm_jpeg.h", + "media/msm_jpeg_dma.h", + "media/msm_media_info.h", + "media/msm_mercury.h", + "media/msm_sde_rotator.h", + "media/msm_vidc.h", + "media/msm_vpu.h", + "media/msmb_camera.h", + "media/msmb_generic_buf_mgr.h", + "media/msmb_isp.h", + "media/msmb_ispif.h", + "media/msmb_pproc.h", + "media/radio-iris-commands.h", + "media/radio-iris.h", + "misc/cxl.h", + "mtd/inftl-user.h", + "mtd/mtd-abi.h", + "mtd/mtd-user.h", + "mtd/nftl-user.h", + "mtd/ubi-user.h", + "rdma/ib_user_cm.h", + "rdma/ib_user_mad.h", + "rdma/ib_user_sa.h", + "rdma/ib_user_verbs.h", + "rdma/rdma_netlink.h", + "rdma/rdma_user_cm.h", + "scsi/cxlflash_ioctl.h", + "scsi/scsi_bsg_fc.h", + "scsi/scsi_ioctl.h", + "scsi/scsi_netlink.h", + "scsi/scsi_netlink_fc.h", + "scsi/sg.h", + "sound/asequencer.h", + "sound/asound.h", + "sound/asound_fm.h", + "sound/audio_effects.h", + "sound/audio_slimslave.h", + "sound/compress_offload.h", + "sound/compress_params.h", + "sound/devdep_params.h", + "sound/emu10k1.h", + "sound/firewire.h", + "sound/hdsp.h", + "sound/hdspm.h", + "sound/lsm_params.h", + "sound/msmcal-hwdep.h", + "sound/sb16_csp.h", + "sound/sfnt_info.h", + "sound/tlv.h", + "sound/voice_params.h", + "sound/voice_svc.h", + "sound/wcd-dsp-glink.h", + "video/edid.h", + "video/msm_hdmi_hdcp_mgr.h", + "video/msm_hdmi_modes.h", + "video/sisfb.h", + "video/uvesafb.h", + "xen/evtchn.h", + "xen/gntalloc.h", + "xen/gntdev.h", + "xen/privcmd.h", + "linux/android/binder.h", + "linux/byteorder/big_endian.h", + "linux/byteorder/little_endian.h", + "linux/caif/caif_socket.h", + "linux/caif/if_caif.h", + "linux/can/bcm.h", + "linux/can/error.h", + "linux/can/gw.h", + "linux/can/netlink.h", + "linux/can/raw.h", + "linux/dvb/audio.h", + "linux/dvb/ca.h", + "linux/dvb/dmx.h", + "linux/dvb/frontend.h", + "linux/dvb/net.h", + "linux/dvb/osd.h", + "linux/dvb/version.h", + "linux/dvb/video.h", + "linux/hdlc/ioctl.h", + "linux/hsi/cs-protocol.h", + "linux/hsi/hsi_char.h", + "linux/iio/events.h", + "linux/iio/types.h", + "linux/isdn/capicmd.h", + "linux/mfd/msm-adie-codec.h", + "linux/mmc/core.h", + "linux/mmc/ioctl.h", + "linux/mmc/mmc.h", + "linux/netfilter/nf_conntrack_common.h", + "linux/netfilter/nf_conntrack_ftp.h", + "linux/netfilter/nf_conntrack_sctp.h", + "linux/netfilter/nf_conntrack_tcp.h", + "linux/netfilter/nf_conntrack_tuple_common.h", + "linux/netfilter/nf_nat.h", + "linux/netfilter/nf_tables.h", + "linux/netfilter/nf_tables_compat.h", + "linux/netfilter/nfnetlink.h", + "linux/netfilter/nfnetlink_acct.h", + "linux/netfilter/nfnetlink_compat.h", + "linux/netfilter/nfnetlink_conntrack.h", + "linux/netfilter/nfnetlink_cthelper.h", + "linux/netfilter/nfnetlink_cttimeout.h", + "linux/netfilter/nfnetlink_log.h", + "linux/netfilter/nfnetlink_queue.h", + "linux/netfilter/x_tables.h", + "linux/netfilter/xt_AUDIT.h", + "linux/netfilter/xt_CHECKSUM.h", + "linux/netfilter/xt_CLASSIFY.h", + "linux/netfilter/xt_CONNMARK.h", + "linux/netfilter/xt_CONNSECMARK.h", + "linux/netfilter/xt_CT.h", + "linux/netfilter/xt_DSCP.h", + "linux/netfilter/xt_HMARK.h", + "linux/netfilter/xt_IDLETIMER.h", + "linux/netfilter/xt_LED.h", + "linux/netfilter/xt_LOG.h", + "linux/netfilter/xt_MARK.h", + "linux/netfilter/xt_NFLOG.h", + "linux/netfilter/xt_NFQUEUE.h", + "linux/netfilter/xt_RATEEST.h", + "linux/netfilter/xt_SECMARK.h", + "linux/netfilter/xt_TCPMSS.h", + "linux/netfilter/xt_TCPOPTSTRIP.h", + "linux/netfilter/xt_TEE.h", + "linux/netfilter/xt_TPROXY.h", + "linux/netfilter/xt_addrtype.h", + "linux/netfilter/xt_bpf.h", + "linux/netfilter/xt_cgroup.h", + "linux/netfilter/xt_cluster.h", + "linux/netfilter/xt_comment.h", + "linux/netfilter/xt_connbytes.h", + "linux/netfilter/xt_connlabel.h", + "linux/netfilter/xt_connlimit.h", + "linux/netfilter/xt_connmark.h", + "linux/netfilter/xt_conntrack.h", + "linux/netfilter/xt_cpu.h", + "linux/netfilter/xt_dccp.h", + "linux/netfilter/xt_devgroup.h", + "linux/netfilter/xt_dscp.h", + "linux/netfilter/xt_ecn.h", + "linux/netfilter/xt_esp.h", + "linux/netfilter/xt_hashlimit.h", + "linux/netfilter/xt_helper.h", + "linux/netfilter/xt_ipcomp.h", + "linux/netfilter/xt_iprange.h", + "linux/netfilter/xt_ipvs.h", + "linux/netfilter/xt_l2tp.h", + "linux/netfilter/xt_length.h", + "linux/netfilter/xt_limit.h", + "linux/netfilter/xt_mac.h", + "linux/netfilter/xt_mark.h", + "linux/netfilter/xt_multiport.h", + "linux/netfilter/xt_nfacct.h", + "linux/netfilter/xt_osf.h", + "linux/netfilter/xt_owner.h", + "linux/netfilter/xt_physdev.h", + "linux/netfilter/xt_pkttype.h", + "linux/netfilter/xt_policy.h", + "linux/netfilter/xt_quota.h", + "linux/netfilter/xt_rateest.h", + "linux/netfilter/xt_realm.h", + "linux/netfilter/xt_recent.h", + "linux/netfilter/xt_rpfilter.h", + "linux/netfilter/xt_sctp.h", + "linux/netfilter/xt_set.h", + "linux/netfilter/xt_socket.h", + "linux/netfilter/xt_state.h", + "linux/netfilter/xt_statistic.h", + "linux/netfilter/xt_string.h", + "linux/netfilter/xt_tcpmss.h", + "linux/netfilter/xt_tcpudp.h", + "linux/netfilter/xt_time.h", + "linux/netfilter/xt_u32.h", + "linux/netfilter_arp/arp_tables.h", + "linux/netfilter_arp/arpt_mangle.h", + "linux/netfilter_bridge/ebt_802_3.h", + "linux/netfilter_bridge/ebt_among.h", + "linux/netfilter_bridge/ebt_arp.h", + "linux/netfilter_bridge/ebt_arpreply.h", + "linux/netfilter_bridge/ebt_ip.h", + "linux/netfilter_bridge/ebt_ip6.h", + "linux/netfilter_bridge/ebt_limit.h", + "linux/netfilter_bridge/ebt_log.h", + "linux/netfilter_bridge/ebt_mark_m.h", + "linux/netfilter_bridge/ebt_mark_t.h", + "linux/netfilter_bridge/ebt_nat.h", + "linux/netfilter_bridge/ebt_nflog.h", + "linux/netfilter_bridge/ebt_pkttype.h", + "linux/netfilter_bridge/ebt_redirect.h", + "linux/netfilter_bridge/ebt_stp.h", + "linux/netfilter_bridge/ebt_vlan.h", + "linux/netfilter_bridge/ebtables.h", + "linux/netfilter_ipv4/ip_tables.h", + "linux/netfilter_ipv4/ipt_CLUSTERIP.h", + "linux/netfilter_ipv4/ipt_ECN.h", + "linux/netfilter_ipv4/ipt_LOG.h", + "linux/netfilter_ipv4/ipt_REJECT.h", + "linux/netfilter_ipv4/ipt_TTL.h", + "linux/netfilter_ipv4/ipt_ah.h", + "linux/netfilter_ipv4/ipt_ecn.h", + "linux/netfilter_ipv4/ipt_ttl.h", + "linux/netfilter_ipv6/ip6_tables.h", + "linux/netfilter_ipv6/ip6t_HL.h", + "linux/netfilter_ipv6/ip6t_LOG.h", + "linux/netfilter_ipv6/ip6t_NPT.h", + "linux/netfilter_ipv6/ip6t_REJECT.h", + "linux/netfilter_ipv6/ip6t_ah.h", + "linux/netfilter_ipv6/ip6t_frag.h", + "linux/netfilter_ipv6/ip6t_hl.h", + "linux/netfilter_ipv6/ip6t_ipv6header.h", + "linux/netfilter_ipv6/ip6t_mh.h", + "linux/netfilter_ipv6/ip6t_opts.h", + "linux/netfilter_ipv6/ip6t_rt.h", + "linux/nfc/nfcinfo.h", + "linux/nfsd/cld.h", + "linux/nfsd/debug.h", + "linux/nfsd/export.h", + "linux/nfsd/nfsfh.h", + "linux/nfsd/stats.h", + "linux/raid/md_p.h", + "linux/raid/md_u.h", + "linux/spi/spidev.h", + "linux/sunrpc/debug.h", + "linux/tc_act/tc_bpf.h", + "linux/tc_act/tc_connmark.h", + "linux/tc_act/tc_csum.h", + "linux/tc_act/tc_defact.h", + "linux/tc_act/tc_gact.h", + "linux/tc_act/tc_ipt.h", + "linux/tc_act/tc_mirred.h", + "linux/tc_act/tc_nat.h", + "linux/tc_act/tc_pedit.h", + "linux/tc_act/tc_skbedit.h", + "linux/tc_act/tc_vlan.h", + "linux/tc_ematch/tc_em_cmp.h", + "linux/tc_ematch/tc_em_meta.h", + "linux/tc_ematch/tc_em_nbyte.h", + "linux/tc_ematch/tc_em_text.h", + "linux/usb/audio.h", + "linux/usb/cdc-wdm.h", + "linux/usb/cdc.h", + "linux/usb/ch11.h", + "linux/usb/ch9.h", + "linux/usb/functionfs.h", + "linux/usb/g_printer.h", + "linux/usb/gadgetfs.h", + "linux/usb/midi.h", + "linux/usb/tmc.h", + "linux/usb/usb_ctrl_qti.h", + "linux/usb/video.h", + "linux/wimax/i2400m.h", + "media/ais/msm_ais.h", + "media/ais/msm_ais_buf_mgr.h", + "media/ais/msm_ais_isp.h", + "media/ais/msm_ais_ispif.h", + "media/ais/msm_ais_mgr.h", + "media/ais/msm_ais_sensor.h", + "media/ais/msm_ais_sensor_sdk.h", + "rdma/hfi/hfi1_user.h", + "scsi/fc/fc_els.h", + "scsi/fc/fc_fs.h", + "scsi/fc/fc_gs.h", + "scsi/fc/fc_ns.h", + "scsi/ufs/ioctl.h", + "scsi/ufs/ufs.h", + "linux/mfd/wcd9xxx/wcd9320_registers.h", + "linux/mfd/wcd9xxx/wcd9xxx_registers.h", + "linux/netfilter/ipset/ip_set.h", + "linux/netfilter/ipset/ip_set_bitmap.h", + "linux/netfilter/ipset/ip_set_hash.h", + "linux/netfilter/ipset/ip_set_list.h", + + // From arch/arm64/include/uapi/**/*.h + + "asm/auxvec.h", + "asm/bitsperlong.h", + "asm/byteorder.h", + "asm/fcntl.h", + "asm/hwcap.h", + "asm/kvm.h", + "asm/param.h", + "asm/perf_regs.h", + "asm/posix_types.h", + "asm/ptrace.h", + "asm/setup.h", + "asm/sigcontext.h", + "asm/siginfo.h", + "asm/signal.h", + "asm/stat.h", + "asm/statfs.h", + "asm/ucontext.h", + "asm/unistd.h", +] + +genrule { + // This module generates the gen_headers_<arch>.bp file + // (i.e., a new version of this file) so that it can be + // checked later to ensure that it matches the checked- + // in version (this file). + name: "qti_generate_gen_headers_arm64", + srcs: gen_headers_srcs_arm64, + exclude_srcs: gen_headers_exclude_srcs_arm64, + tool_files: ["kernel_headers.py"], + cmd: "python3 $(location kernel_headers.py) " + + kernel_headers_verbose + + "--header_arch arm64 " + + "--gen_dir $(genDir) " + + "--arch_asm_kbuild $(location arch/arm64/include/uapi/asm/Kbuild) " + + "--arch_include_uapi $(locations arch/arm64/include/uapi/**/*.h) " + + "--asm_generic_kbuild $(location include/uapi/asm-generic/Kbuild.asm) " + + "blueprints " + + "# $(in)", + out: ["gen_headers_arm64.bp"], +} + +genrule { + name: "qti_generate_kernel_headers_arm64", + tools: ["headers_install.sh"], + tool_files: [ + "kernel_headers.py", + ], + srcs: gen_headers_srcs_arm64 +[ + "gen_headers_arm64.bp", + ":qti_generate_gen_headers_arm64", + ], + exclude_srcs: gen_headers_exclude_srcs_arm64, + cmd: "python3 $(location kernel_headers.py) " + + kernel_headers_verbose + + "--header_arch arm64 " + + "--gen_dir $(genDir) " + + "--arch_asm_kbuild $(location arch/arm64/include/uapi/asm/Kbuild) " + + "--arch_include_uapi $(locations arch/arm64/include/uapi/**/*.h) " + + "--asm_generic_kbuild $(location include/uapi/asm-generic/Kbuild.asm) " + + "headers " + + "--old_gen_headers_bp $(location gen_headers_arm64.bp) " + + "--new_gen_headers_bp $(location :qti_generate_gen_headers_arm64) " + + "--version_makefile $(location Makefile) " + + "--headers_install $(location headers_install.sh) " + + "--include_uapi $(locations include/uapi/**/*.h)", + out: ["linux/version.h"] + gen_headers_out_arm64, +} diff --git a/include/Kbuild b/include/Kbuild deleted file mode 100644 index bab1145bc7a7..000000000000 --- a/include/Kbuild +++ /dev/null @@ -1,2 +0,0 @@ -# Top-level Makefile calls into asm-$(ARCH) -# List only non-arch directories below diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm deleted file mode 100644 index d2ee86b4c091..000000000000 --- a/include/asm-generic/Kbuild.asm +++ /dev/null @@ -1 +0,0 @@ -include include/uapi/asm-generic/Kbuild.asm diff --git a/include/scsi/fc/Kbuild b/include/scsi/fc/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/scsi/fc/Kbuild +++ /dev/null diff --git a/include/soc/qcom/profiler.h b/include/soc/qcom/profiler.h index ffcf6ec91187..7ccea6f43228 100644 --- a/include/soc/qcom/profiler.h +++ b/include/soc/qcom/profiler.h @@ -82,11 +82,11 @@ struct tz_bw_svc_resp { enum tz_bw_svc_err status; } __packed; -__packed union tz_bw_svc_req { +union tz_bw_svc_req { struct tz_bw_svc_start_req *start_req; struct tz_bw_svc_get_req *get_req; struct tz_bw_svc_stop_req *stop_req; -}; +} __packed; struct tz_bw_svc_buf { union tz_bw_svc_req bwreq; diff --git a/include/uapi/Kbuild b/include/uapi/Kbuild deleted file mode 100644 index aeb3366db4fc..000000000000 --- a/include/uapi/Kbuild +++ /dev/null @@ -1,16 +0,0 @@ -# UAPI Header export list -# Top-level Makefile calls into asm-$(ARCH) -# List only non-arch directories below - - -header-y += asm-generic/ -header-y += linux/ -header-y += sound/ -header-y += mtd/ -header-y += rdma/ -header-y += video/ -header-y += drm/ -header-y += xen/ -header-y += scsi/ -header-y += misc/ -header-y += media/ diff --git a/include/uapi/asm-generic/Kbuild b/include/uapi/asm-generic/Kbuild deleted file mode 100644 index b73de7bb7a62..000000000000 --- a/include/uapi/asm-generic/Kbuild +++ /dev/null @@ -1,36 +0,0 @@ -# UAPI Header export list -header-y += auxvec.h -header-y += bitsperlong.h -header-y += errno-base.h -header-y += errno.h -header-y += fcntl.h -header-y += int-l64.h -header-y += int-ll64.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += kvm_para.h -header-y += mman-common.h -header-y += mman.h -header-y += msgbuf.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += resource.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += shmparam.h -header-y += siginfo.h -header-y += signal-defs.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += ucontext.h -header-y += unistd.h diff --git a/include/uapi/asm-generic/Kbuild.asm b/include/uapi/asm-generic/Kbuild.asm index fcd50b759217..21381449d98a 100644 --- a/include/uapi/asm-generic/Kbuild.asm +++ b/include/uapi/asm-generic/Kbuild.asm @@ -1,49 +1,33 @@ # -# Headers that are optional in usr/include/asm/ -# -opt-header += kvm.h -opt-header += kvm_para.h -opt-header += a.out.h - -# # Headers that are mandatory in usr/include/asm/ # -header-y += auxvec.h -header-y += bitsperlong.h -header-y += byteorder.h -header-y += errno.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += mman.h -header-y += msgbuf.h -header-y += param.h -header-y += poll.h -header-y += posix_types.h -header-y += ptrace.h -header-y += resource.h -header-y += sembuf.h -header-y += setup.h -header-y += shmbuf.h -header-y += sigcontext.h -header-y += siginfo.h -header-y += signal.h -header-y += socket.h -header-y += sockios.h -header-y += stat.h -header-y += statfs.h -header-y += swab.h -header-y += termbits.h -header-y += termios.h -header-y += types.h -header-y += unistd.h - -header-y += $(foreach hdr,$(opt-header), \ - $(if \ - $(wildcard \ - $(srctree)/arch/$(SRCARCH)/include/uapi/asm/$(hdr) \ - $(srctree)/arch/$(SRCARCH)/include/asm/$(hdr) \ - ), \ - $(hdr) \ - )) +mandatory-y += auxvec.h +mandatory-y += bitsperlong.h +mandatory-y += byteorder.h +mandatory-y += errno.h +mandatory-y += fcntl.h +mandatory-y += ioctl.h +mandatory-y += ioctls.h +mandatory-y += ipcbuf.h +mandatory-y += mman.h +mandatory-y += msgbuf.h +mandatory-y += param.h +mandatory-y += poll.h +mandatory-y += posix_types.h +mandatory-y += ptrace.h +mandatory-y += resource.h +mandatory-y += sembuf.h +mandatory-y += setup.h +mandatory-y += shmbuf.h +mandatory-y += sigcontext.h +mandatory-y += siginfo.h +mandatory-y += signal.h +mandatory-y += socket.h +mandatory-y += sockios.h +mandatory-y += stat.h +mandatory-y += statfs.h +mandatory-y += swab.h +mandatory-y += termbits.h +mandatory-y += termios.h +mandatory-y += types.h +mandatory-y += unistd.h diff --git a/include/uapi/drm/Kbuild b/include/uapi/drm/Kbuild index c3c78a0d0052..bafc163da5b8 100644 --- a/include/uapi/drm/Kbuild +++ b/include/uapi/drm/Kbuild @@ -1,22 +1,4 @@ # UAPI Header export list -header-y += drm.h -header-y += drm_fourcc.h -header-y += drm_mode.h -header-y += drm_sarea.h -header-y += exynos_drm.h -header-y += i810_drm.h -header-y += i915_drm.h -header-y += mga_drm.h -header-y += nouveau_drm.h -header-y += qxl_drm.h -header-y += r128_drm.h -header-y += radeon_drm.h -header-y += savage_drm.h -header-y += sis_drm.h -header-y += tegra_drm.h -header-y += via_drm.h -header-y += vmwgfx_drm.h -header-y += msm_drm.h -header-y += virtgpu_drm.h -header-y += sde_drm.h -header-y += msm_drm_pp.h +no-export-headers += amdgpu_drm.h +no-export-headers += armada_drm.h +no-export-headers += omap_drm.h diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 01269fa43e77..5d86acfa0bfd 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -1,535 +1,34 @@ # UAPI Header export list -header-y += android/ -header-y += byteorder/ -header-y += can/ -header-y += caif/ -header-y += dvb/ -header-y += hdlc/ -header-y += hsi/ -header-y += iio/ -header-y += isdn/ -header-y += mmc/ -header-y += nfsd/ -header-y += raid/ -header-y += spi/ -header-y += sunrpc/ -header-y += tc_act/ -header-y += tc_ematch/ -header-y += netfilter/ -header-y += netfilter_arp/ -header-y += netfilter_bridge/ -header-y += netfilter_ipv4/ -header-y += netfilter_ipv6/ -header-y += usb/ -header-y += wimax/ -header-y += mfd/ -header-y += nfc/ -genhdr-y += version.h - -ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h \ - $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h),) -header-y += a.out.h +ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),) +no-export-headers += a.out.h endif -header-y += ashmem.h -header-y += acct.h -header-y += adb.h -header-y += adfs_fs.h -header-y += affs_hardblocks.h -header-y += agpgart.h -header-y += aio_abi.h -header-y += am437x-vpfe.h -header-y += apm_bios.h -header-y += arcfb.h -header-y += atalk.h -header-y += atmapi.h -header-y += atmarp.h -header-y += atmbr2684.h -header-y += atmclip.h -header-y += atmdev.h -header-y += atm_eni.h -header-y += atm.h -header-y += atm_he.h -header-y += atm_idt77105.h -header-y += atmioc.h -header-y += atmlec.h -header-y += atmmpc.h -header-y += atm_nicstar.h -header-y += atmppp.h -header-y += atmsap.h -header-y += atmsvc.h -header-y += atm_tcp.h -header-y += atm_zatm.h -header-y += audit.h -header-y += auto_fs4.h -header-y += auto_fs.h -header-y += auxvec.h -header-y += avtimer.h -header-y += ax25.h -header-y += b1lli.h -header-y += batterydata-interface.h -header-y += baycom.h -header-y += bcm933xx_hcs.h -header-y += bfs_fs.h -header-y += binfmts.h -header-y += blkpg.h -header-y += blktrace_api.h -header-y += bpf_common.h -header-y += bpf.h -header-y += bpqether.h -header-y += bsg.h -header-y += btrfs.h -header-y += can.h -header-y += capability.h -header-y += capi.h -header-y += cciss_defs.h -header-y += cciss_ioctl.h -header-y += cdrom.h -header-y += cec.h -header-y += cec-funcs.h -header-y += cgroupstats.h -header-y += chio.h -header-y += cm4000_cs.h -header-y += cn_proc.h -header-y += coda.h -header-y += coda_psdev.h -header-y += coff.h -header-y += connector.h -header-y += const.h -header-y += cramfs_fs.h -header-y += cuda.h -header-y += cyclades.h -header-y += cycx_cfm.h -header-y += dcbnl.h -header-y += dccp.h -header-y += dlmconstants.h -header-y += dlm_device.h -header-y += dlm.h -header-y += dlm_netlink.h -header-y += dlm_plock.h -header-y += dm-ioctl.h -header-y += dm-log-userspace.h -header-y += dn.h -header-y += dqblk_xfs.h -header-y += edd.h -header-y += efs_fs_sb.h -header-y += elfcore.h -header-y += elf-em.h -header-y += elf-fdpic.h -header-y += elf.h -header-y += epm_adc.h -header-y += errno.h -header-y += errqueue.h -header-y += esoc_ctrl.h -header-y += ethtool.h -header-y += eventpoll.h -header-y += fadvise.h -header-y += falloc.h -header-y += fanotify.h -header-y += fb.h -header-y += fcntl.h -header-y += fd.h -header-y += fdreg.h -header-y += fib_rules.h -header-y += fiemap.h -header-y += filter.h -header-y += fips_status.h -header-y += firewire-cdev.h -header-y += firewire-constants.h -header-y += flat.h -header-y += fou.h -header-y += fs.h -header-y += fsl_hypervisor.h -header-y += fuse.h -header-y += futex.h -header-y += gameport.h -header-y += genetlink.h -header-y += gen_stats.h -header-y += gfs2_ondisk.h -header-y += gigaset_dev.h -header-y += gsmmux.h -header-y += hbtp_input.h -header-y += hbtp_vm.h -header-y += hdlcdrv.h -header-y += hdlc.h -header-y += hdreg.h -header-y += hiddev.h -header-y += hid.h -header-y += hidraw.h -header-y += hpet.h -header-y += hsr_netlink.h -header-y += hyperv.h -header-y += hysdn_if.h -header-y += i2c-dev.h -header-y += i2c.h -header-y += i2o-dev.h -header-y += i8k.h -header-y += icmp.h -header-y += icmpv6.h -header-y += if_addr.h -header-y += if_addrlabel.h -header-y += if_alg.h -header-y += if_arcnet.h -header-y += if_arp.h -header-y += if_bonding.h -header-y += if_bridge.h -header-y += if_cablemodem.h -header-y += if_eql.h -header-y += if_ether.h -header-y += if_fc.h -header-y += if_fddi.h -header-y += if_frad.h -header-y += if.h -header-y += if_hippi.h -header-y += if_infiniband.h -header-y += if_link.h -header-y += if_ltalk.h -header-y += if_packet.h -header-y += if_phonet.h -header-y += if_plip.h -header-y += if_ppp.h -header-y += if_pppol2tp.h -header-y += if_pppox.h -header-y += if_slip.h -header-y += if_team.h -header-y += if_tun.h -header-y += if_tunnel.h -header-y += if_vlan.h -header-y += if_x25.h -header-y += igmp.h -header-y += ila.h -header-y += in6.h -header-y += inet_diag.h -header-y += in.h -header-y += inotify.h -header-y += input.h -header-y += input-event-codes.h -header-y += in_route.h -header-y += ioctl.h -header-y += ion.h -header-y += ion_test.h -header-y += ip6_tunnel.h -header-y += ipc.h -header-y += ip.h -header-y += ipmi.h -header-y += ipmi_msgdefs.h -header-y += ipsec.h -header-y += ipv6.h -header-y += ipv6_route.h -header-y += ip_vs.h -header-y += ipx.h -header-y += irda.h -header-y += irqnr.h -header-y += isdn_divertif.h -header-y += isdn.h -header-y += isdnif.h -header-y += isdn_ppp.h -header-y += iso_fs.h -header-y += ivtvfb.h -header-y += ivtv.h -header-y += ixjuser.h -header-y += jffs2.h -header-y += joystick.h -header-y += kcmp.h -header-y += kdev_t.h -header-y += kd.h -header-y += kernelcapi.h -header-y += kernel.h -header-y += kernel-page-flags.h -header-y += kexec.h -header-y += keyboard.h -header-y += keyctl.h -ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h \ - $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h),) -header-y += kvm.h +ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h),) +no-export-headers += kvm.h endif - -ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h \ - $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h),) -header-y += kvm_para.h +ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),) +no-export-headers += kvm_para.h endif -header-y += hw_breakpoint.h -header-y += l2tp.h -header-y += libc-compat.h -header-y += limits.h -header-y += llc.h -header-y += loop.h -header-y += lp.h -header-y += lwtunnel.h -header-y += magic.h -header-y += major.h -header-y += map_to_7segment.h -header-y += matroxfb.h -header-y += maxim_sti.h -header-y += mdio.h -header-y += mdss_rotator.h -header-y += media.h -header-y += media-bus-format.h -header-y += mei.h -header-y += membarrier.h -header-y += memfd.h -header-y += mempolicy.h -header-y += meye.h -header-y += mhi.h -header-y += mic_common.h -header-y += mic_ioctl.h -header-y += mii.h -header-y += minix_fs.h -header-y += mman.h -header-y += mmtimer.h -header-y += mpls.h -header-y += mpls_iptunnel.h -header-y += mqueue.h -header-y += mroute6.h -header-y += mroute.h -header-y += msdos_fs.h -header-y += msg.h -header-y += msm_adsp.h -header-y += msm_audio.h -header-y += msm_audio_aac.h -header-y += msm_audio_ac3.h -header-y += msm_audio_amrnb.h -header-y += msm_audio_amrwb.h -header-y += msm_audio_amrwbplus.h -header-y += msm_audio_calibration.h -header-y += msm_audio_anc.h -header-y += msm_audio_mvs.h -header-y += msm_audio_qcp.h -header-y += msm_audio_sbc.h -header-y += msm_audio_voicememo.h -header-y += msm_audio_wma.h -header-y += msm_audio_wmapro.h -header-y += msm_audio_alac.h -header-y += msm_audio_ape.h -header-y += msm_audio_g711.h -header-y += msm_audio_g711_dec.h -header-y += msm_ion.h -header-y += msm_ipc.h -header-y += msm_kgsl.h -header-y += msm_pft.h -header-y += msm_mdp.h -header-y += msm_mdp_ext.h -header-y += msm_rmnet.h -header-y += msm_rotator.h -header-y += msm_vidc_dec.h -header-y += msm_vidc_enc.h -header-y += mtio.h -header-y += nbd.h -header-y += ncp_fs.h -header-y += ncp.h -header-y += ncp_mount.h -header-y += ncp_no.h -header-y += ndctl.h -header-y += neighbour.h -header-y += netconf.h -header-y += netdevice.h -header-y += net_dropmon.h -header-y += net_map.h -header-y += netfilter_arp.h -header-y += netfilter_bridge.h -header-y += netfilter_decnet.h -header-y += netfilter.h -header-y += netfilter_ipv4.h -header-y += netfilter_ipv6.h -header-y += net.h -header-y += netlink_diag.h -header-y += netlink.h -header-y += netrom.h -header-y += net_namespace.h -header-y += net_tstamp.h -header-y += nfc.h -header-y += nfs2.h -header-y += nfs3.h -header-y += nfs4.h -header-y += nfs4_mount.h -header-y += nfsacl.h -header-y += nfs_fs.h -header-y += nfs.h -header-y += nfs_idmap.h -header-y += nfs_mount.h -header-y += nl80211.h -header-y += n_r3964.h -header-y += nubus.h -header-y += nvme_ioctl.h -header-y += nvram.h -header-y += omap3isp.h -header-y += omapfb.h -header-y += oneshot_sync.h -header-y += oom.h -header-y += openvswitch.h -header-y += packet_diag.h -header-y += param.h -header-y += parport.h -header-y += patchkey.h -header-y += pci.h -header-y += pci_regs.h -header-y += perf_event.h -header-y += personality.h -header-y += pfkeyv2.h -header-y += pg.h -header-y += phantom.h -header-y += phonet.h -header-y += pktcdvd.h -header-y += pkt_cls.h -header-y += pkt_sched.h -header-y += pmu.h -header-y += poll.h -header-y += posix_types.h -header-y += ppdev.h -header-y += ppp-comp.h -header-y += ppp_defs.h -header-y += ppp-ioctl.h -header-y += pps.h -header-y += prctl.h -header-y += psci.h -header-y += ptp_clock.h -header-y += ptrace.h -header-y += qbt1000.h -header-y += qcedev.h -header-y += qcota.h -header-y += qnx4_fs.h -header-y += qnxtypes.h -header-y += qseecom.h -header-y += qrng.h -header-y += quota.h -header-y += radeonfb.h -header-y += random.h -header-y += raw.h -header-y += rds.h -header-y += reboot.h -header-y += reiserfs_fs.h -header-y += reiserfs_xattr.h -header-y += resource.h -header-y += rfkill.h -header-y += rmnet_data.h -header-y += rmnet.h -header-y += romfs_fs.h -header-y += rose.h -header-y += route.h -header-y += rtc.h -header-y += rtnetlink.h -header-y += scc.h -header-y += sched.h -header-y += scif_ioctl.h -header-y += screen_info.h -header-y += sctp.h -header-y += sdla.h -header-y += seccomp.h -header-y += securebits.h -header-y += seemp_api.h -header-y += seemp_param_id.h -header-y += selinux_netlink.h -header-y += sem.h -header-y += serial_core.h -header-y += serial.h -header-y += serial_reg.h -header-y += serio.h -header-y += shm.h -header-y += signalfd.h -header-y += signal.h -header-y += smiapp.h -header-y += snmp.h -header-y += sock_diag.h -header-y += socket.h -header-y += sockev.h -header-y += sockios.h -header-y += sonet.h -header-y += sonypi.h -header-y += soundcard.h -header-y += sound.h -header-y += spcom.h -header-y += stat.h -header-y += stddef.h -header-y += string.h -header-y += suspend_ioctls.h -header-y += sw_sync.h -header-y += swab.h -header-y += sync.h -header-y += synclink.h -header-y += sysctl.h -header-y += sysinfo.h -header-y += target_core_user.h -header-y += taskstats.h -header-y += tcp.h -header-y += tcp_metrics.h -header-y += telephony.h -header-y += termios.h -header-y += thermal.h -header-y += time.h -header-y += times.h -header-y += timex.h -header-y += tiocl.h -header-y += tipc_config.h -header-y += tipc_netlink.h -header-y += tipc.h -header-y += toshiba.h -header-y += tty_flags.h -header-y += tty.h -header-y += types.h -header-y += udf_fs_i.h -header-y += udp.h -header-y += uhid.h -header-y += uinput.h -header-y += uio.h -header-y += ultrasound.h -header-y += un.h -header-y += unistd.h -header-y += unix_diag.h -header-y += usbdevice_fs.h -header-y += usbip.h -header-y += utime.h -header-y += utsname.h -header-y += uuid.h -header-y += uvcvideo.h -header-y += v4l2-common.h -header-y += v4l2-controls.h -header-y += v4l2-dv-timings.h -header-y += v4l2-mediabus.h -header-y += v4l2-subdev.h -header-y += veth.h -header-y += vfio.h -header-y += vhost.h -header-y += videodev2.h -header-y += virtio_9p.h -header-y += virtio_balloon.h -header-y += virtio_blk.h -header-y += virtio_config.h -header-y += virtio_console.h -header-y += virtio_gpu.h -header-y += virtio_ids.h -header-y += virtio_input.h -header-y += virtio_net.h -header-y += virtio_pci.h -header-y += virtio_ring.h -header-y += virtio_rng.h -header-y += virtio_scsi.h -header-y += virtio_types.h -header-y += virtio_vsock.h -header-y += vm_sockets.h -header-y += vt.h -header-y += wait.h -header-y += wanrouter.h -header-y += watchdog.h -header-y += wimax.h -header-y += wireless.h -header-y += x25.h -header-y += xattr.h -header-y += xfrm.h -header-y += xilinx-v4l2-controls.h -header-y += zorro.h -header-y += zorro_ids.h -header-y += userfaultfd.h -header-y += msm_dsps.h -header-y += msm-core-interface.h -header-y += msm_thermal_ioctl.h -header-y += android_pmem.h -header-y += ipa_qmi_service_v01.h -header-y += rmnet_ipa_fd_ioctl.h -header-y += msm_ipa.h -header-y += smcinvoke.h -header-y += habmmid.h -header-y += hab_ioctl.h +no-export-headers += bcache.h +no-export-headers += cryptouser.h +no-export-headers += coresight-stm.h +no-export-headers += hash_info.h +no-export-headers += kcov.h +no-export-headers += keychord.h +no-export-headers += kfd_ioctl.h +no-export-headers += lightnvm.h +no-export-headers += module.h +no-export-headers += pr.h +no-export-headers += stm.h +no-export-headers += tee.h +no-export-headers += userio.h +no-export-headers += vsp1.h +no-export-headers += wil6210_uapi.h + +ifeq ($(VSERVICES_SUPPORT), "") +include include/linux/Kbuild.vservices +endif diff --git a/include/uapi/linux/android/Kbuild b/include/uapi/linux/android/Kbuild deleted file mode 100644 index ca011eec252a..000000000000 --- a/include/uapi/linux/android/Kbuild +++ /dev/null @@ -1,2 +0,0 @@ -# UAPI Header export list -header-y += binder.h diff --git a/include/uapi/linux/byteorder/Kbuild b/include/uapi/linux/byteorder/Kbuild deleted file mode 100644 index 619225b9ff2e..000000000000 --- a/include/uapi/linux/byteorder/Kbuild +++ /dev/null @@ -1,3 +0,0 @@ -# UAPI Header export list -header-y += big_endian.h -header-y += little_endian.h diff --git a/include/uapi/linux/caif/Kbuild b/include/uapi/linux/caif/Kbuild deleted file mode 100644 index 43396612d3a3..000000000000 --- a/include/uapi/linux/caif/Kbuild +++ /dev/null @@ -1,3 +0,0 @@ -# UAPI Header export list -header-y += caif_socket.h -header-y += if_caif.h diff --git a/include/uapi/linux/can/Kbuild b/include/uapi/linux/can/Kbuild deleted file mode 100644 index 21c91bf25a29..000000000000 --- a/include/uapi/linux/can/Kbuild +++ /dev/null @@ -1,6 +0,0 @@ -# UAPI Header export list -header-y += bcm.h -header-y += error.h -header-y += gw.h -header-y += netlink.h -header-y += raw.h diff --git a/include/uapi/linux/cifs/Kbuild b/include/uapi/linux/cifs/Kbuild new file mode 100644 index 000000000000..c922dbeb0ef4 --- /dev/null +++ b/include/uapi/linux/cifs/Kbuild @@ -0,0 +1,2 @@ +# UAPI Header export list +no-export-headers += cifs_mount.h diff --git a/include/uapi/linux/dvb/Kbuild b/include/uapi/linux/dvb/Kbuild deleted file mode 100644 index d40942cfc627..000000000000 --- a/include/uapi/linux/dvb/Kbuild +++ /dev/null @@ -1,9 +0,0 @@ -# UAPI Header export list -header-y += audio.h -header-y += ca.h -header-y += dmx.h -header-y += frontend.h -header-y += net.h -header-y += osd.h -header-y += version.h -header-y += video.h diff --git a/include/uapi/linux/genwqe/Kbuild b/include/uapi/linux/genwqe/Kbuild new file mode 100644 index 000000000000..b50fc2179a2e --- /dev/null +++ b/include/uapi/linux/genwqe/Kbuild @@ -0,0 +1,2 @@ +# UAPI Header export list +no-export-headers += genwqe_card.h diff --git a/include/uapi/linux/goldfish/Kbuild b/include/uapi/linux/goldfish/Kbuild new file mode 100644 index 000000000000..4f706f880ab2 --- /dev/null +++ b/include/uapi/linux/goldfish/Kbuild @@ -0,0 +1,2 @@ +# UAPI Header export list +no-export-headers += goldfish_dma.h diff --git a/include/uapi/linux/hdlc/Kbuild b/include/uapi/linux/hdlc/Kbuild deleted file mode 100644 index 8c1d2cb75e33..000000000000 --- a/include/uapi/linux/hdlc/Kbuild +++ /dev/null @@ -1,2 +0,0 @@ -# UAPI Header export list -header-y += ioctl.h diff --git a/include/uapi/linux/hsi/Kbuild b/include/uapi/linux/hsi/Kbuild deleted file mode 100644 index a16a00544258..000000000000 --- a/include/uapi/linux/hsi/Kbuild +++ /dev/null @@ -1,2 +0,0 @@ -# UAPI Header export list -header-y += hsi_char.h cs-protocol.h diff --git a/include/uapi/linux/iio/Kbuild b/include/uapi/linux/iio/Kbuild deleted file mode 100644 index 86f76d84c44f..000000000000 --- a/include/uapi/linux/iio/Kbuild +++ /dev/null @@ -1,3 +0,0 @@ -# UAPI Header export list -header-y += events.h -header-y += types.h diff --git a/include/uapi/linux/isdn/Kbuild b/include/uapi/linux/isdn/Kbuild deleted file mode 100644 index 89e52850bf29..000000000000 --- a/include/uapi/linux/isdn/Kbuild +++ /dev/null @@ -1,2 +0,0 @@ -# UAPI Header export list -header-y += capicmd.h diff --git a/include/uapi/linux/mmc/Kbuild b/include/uapi/linux/mmc/Kbuild deleted file mode 100644 index ce4e88593605..000000000000 --- a/include/uapi/linux/mmc/Kbuild +++ /dev/null @@ -1,6 +0,0 @@ -# UAPI Header export list -header-y += core.h -header-y += core.h -header-y += ioctl.h -header-y += mmc.h -header-y += mmc.h diff --git a/include/uapi/linux/netfilter/Kbuild b/include/uapi/linux/netfilter/Kbuild index 1d973d2ba417..5cf04b4a93c3 100644 --- a/include/uapi/linux/netfilter/Kbuild +++ b/include/uapi/linux/netfilter/Kbuild @@ -1,87 +1,3 @@ # UAPI Header export list -header-y += ipset/ -header-y += nf_conntrack_common.h -header-y += nf_conntrack_ftp.h -header-y += nf_conntrack_sctp.h -header-y += nf_conntrack_tcp.h -header-y += nf_conntrack_tuple_common.h -header-y += nf_tables.h -header-y += nf_tables_compat.h -header-y += nf_nat.h -header-y += nfnetlink.h -header-y += nfnetlink_acct.h -header-y += nfnetlink_compat.h -header-y += nfnetlink_conntrack.h -header-y += nfnetlink_cthelper.h -header-y += nfnetlink_cttimeout.h -header-y += nfnetlink_log.h -header-y += nfnetlink_queue.h -header-y += x_tables.h -header-y += xt_AUDIT.h -header-y += xt_CHECKSUM.h -header-y += xt_CLASSIFY.h -header-y += xt_CONNMARK.h -header-y += xt_CONNSECMARK.h -header-y += xt_CT.h -header-y += xt_DSCP.h -header-y += xt_HMARK.h -header-y += xt_IDLETIMER.h -header-y += xt_LED.h -header-y += xt_LOG.h -header-y += xt_MARK.h -header-y += xt_NFLOG.h -header-y += xt_NFQUEUE.h -header-y += xt_RATEEST.h -header-y += xt_SECMARK.h -header-y += xt_TCPMSS.h -header-y += xt_TCPOPTSTRIP.h -header-y += xt_TEE.h -header-y += xt_TPROXY.h -header-y += xt_addrtype.h -header-y += xt_bpf.h -header-y += xt_cgroup.h -header-y += xt_cluster.h -header-y += xt_comment.h -header-y += xt_connbytes.h -header-y += xt_connlabel.h -header-y += xt_connlimit.h -header-y += xt_connmark.h -header-y += xt_conntrack.h -header-y += xt_cpu.h -header-y += xt_dccp.h -header-y += xt_devgroup.h -header-y += xt_dscp.h -header-y += xt_ecn.h -header-y += xt_esp.h -header-y += xt_hashlimit.h -header-y += xt_helper.h -header-y += xt_ipcomp.h -header-y += xt_iprange.h -header-y += xt_ipvs.h -header-y += xt_l2tp.h -header-y += xt_length.h -header-y += xt_limit.h -header-y += xt_mac.h -header-y += xt_mark.h -header-y += xt_multiport.h -header-y += xt_nfacct.h -header-y += xt_osf.h -header-y += xt_owner.h -header-y += xt_physdev.h -header-y += xt_pkttype.h -header-y += xt_policy.h -header-y += xt_quota.h -header-y += xt_rateest.h -header-y += xt_realm.h -header-y += xt_recent.h -header-y += xt_rpfilter.h -header-y += xt_sctp.h -header-y += xt_set.h -header-y += xt_socket.h -header-y += xt_state.h -header-y += xt_statistic.h -header-y += xt_string.h -header-y += xt_tcpmss.h -header-y += xt_tcpudp.h -header-y += xt_time.h -header-y += xt_u32.h +no-export-headers += xt_HARDIDLETIMER.h +no-export-headers += xt_SYNPROXY.h diff --git a/include/uapi/linux/netfilter/ipset/Kbuild b/include/uapi/linux/netfilter/ipset/Kbuild deleted file mode 100644 index d2680423d9ab..000000000000 --- a/include/uapi/linux/netfilter/ipset/Kbuild +++ /dev/null @@ -1,5 +0,0 @@ -# UAPI Header export list -header-y += ip_set.h -header-y += ip_set_bitmap.h -header-y += ip_set_hash.h -header-y += ip_set_list.h diff --git a/include/uapi/linux/netfilter_arp/Kbuild b/include/uapi/linux/netfilter_arp/Kbuild deleted file mode 100644 index 62d5637cc0ac..000000000000 --- a/include/uapi/linux/netfilter_arp/Kbuild +++ /dev/null @@ -1,3 +0,0 @@ -# UAPI Header export list -header-y += arp_tables.h -header-y += arpt_mangle.h diff --git a/include/uapi/linux/netfilter_bridge/Kbuild b/include/uapi/linux/netfilter_bridge/Kbuild deleted file mode 100644 index 0fbad8ef96de..000000000000 --- a/include/uapi/linux/netfilter_bridge/Kbuild +++ /dev/null @@ -1,18 +0,0 @@ -# UAPI Header export list -header-y += ebt_802_3.h -header-y += ebt_among.h -header-y += ebt_arp.h -header-y += ebt_arpreply.h -header-y += ebt_ip.h -header-y += ebt_ip6.h -header-y += ebt_limit.h -header-y += ebt_log.h -header-y += ebt_mark_m.h -header-y += ebt_mark_t.h -header-y += ebt_nat.h -header-y += ebt_nflog.h -header-y += ebt_pkttype.h -header-y += ebt_redirect.h -header-y += ebt_stp.h -header-y += ebt_vlan.h -header-y += ebtables.h diff --git a/include/uapi/linux/netfilter_ipv4/Kbuild b/include/uapi/linux/netfilter_ipv4/Kbuild deleted file mode 100644 index ecb291df390e..000000000000 --- a/include/uapi/linux/netfilter_ipv4/Kbuild +++ /dev/null @@ -1,10 +0,0 @@ -# UAPI Header export list -header-y += ip_tables.h -header-y += ipt_CLUSTERIP.h -header-y += ipt_ECN.h -header-y += ipt_LOG.h -header-y += ipt_REJECT.h -header-y += ipt_TTL.h -header-y += ipt_ah.h -header-y += ipt_ecn.h -header-y += ipt_ttl.h diff --git a/include/uapi/linux/netfilter_ipv6/Kbuild b/include/uapi/linux/netfilter_ipv6/Kbuild deleted file mode 100644 index 75a668ca2353..000000000000 --- a/include/uapi/linux/netfilter_ipv6/Kbuild +++ /dev/null @@ -1,13 +0,0 @@ -# UAPI Header export list -header-y += ip6_tables.h -header-y += ip6t_HL.h -header-y += ip6t_LOG.h -header-y += ip6t_NPT.h -header-y += ip6t_REJECT.h -header-y += ip6t_ah.h -header-y += ip6t_frag.h -header-y += ip6t_hl.h -header-y += ip6t_ipv6header.h -header-y += ip6t_mh.h -header-y += ip6t_opts.h -header-y += ip6t_rt.h diff --git a/include/uapi/linux/nfsd/Kbuild b/include/uapi/linux/nfsd/Kbuild deleted file mode 100644 index c11bc404053c..000000000000 --- a/include/uapi/linux/nfsd/Kbuild +++ /dev/null @@ -1,6 +0,0 @@ -# UAPI Header export list -header-y += cld.h -header-y += debug.h -header-y += export.h -header-y += nfsfh.h -header-y += stats.h diff --git a/include/uapi/linux/raid/Kbuild b/include/uapi/linux/raid/Kbuild deleted file mode 100644 index e2c3d25405d7..000000000000 --- a/include/uapi/linux/raid/Kbuild +++ /dev/null @@ -1,3 +0,0 @@ -# UAPI Header export list -header-y += md_p.h -header-y += md_u.h diff --git a/include/uapi/linux/spi/Kbuild b/include/uapi/linux/spi/Kbuild deleted file mode 100644 index 0cc747eff165..000000000000 --- a/include/uapi/linux/spi/Kbuild +++ /dev/null @@ -1,2 +0,0 @@ -# UAPI Header export list -header-y += spidev.h diff --git a/include/uapi/linux/sunrpc/Kbuild b/include/uapi/linux/sunrpc/Kbuild deleted file mode 100644 index 8e02e47c20fb..000000000000 --- a/include/uapi/linux/sunrpc/Kbuild +++ /dev/null @@ -1,2 +0,0 @@ -# UAPI Header export list -header-y += debug.h diff --git a/include/uapi/linux/tc_act/Kbuild b/include/uapi/linux/tc_act/Kbuild deleted file mode 100644 index 242cf0c6e33d..000000000000 --- a/include/uapi/linux/tc_act/Kbuild +++ /dev/null @@ -1,12 +0,0 @@ -# UAPI Header export list -header-y += tc_csum.h -header-y += tc_defact.h -header-y += tc_gact.h -header-y += tc_ipt.h -header-y += tc_mirred.h -header-y += tc_nat.h -header-y += tc_pedit.h -header-y += tc_skbedit.h -header-y += tc_vlan.h -header-y += tc_bpf.h -header-y += tc_connmark.h diff --git a/include/uapi/linux/tc_ematch/Kbuild b/include/uapi/linux/tc_ematch/Kbuild deleted file mode 100644 index 53fca3925535..000000000000 --- a/include/uapi/linux/tc_ematch/Kbuild +++ /dev/null @@ -1,5 +0,0 @@ -# UAPI Header export list -header-y += tc_em_cmp.h -header-y += tc_em_meta.h -header-y += tc_em_nbyte.h -header-y += tc_em_text.h diff --git a/include/uapi/linux/usb/Kbuild b/include/uapi/linux/usb/Kbuild index ba153d582422..e511bf63ff7b 100644 --- a/include/uapi/linux/usb/Kbuild +++ b/include/uapi/linux/usb/Kbuild @@ -1,13 +1,3 @@ # UAPI Header export list -header-y += audio.h -header-y += cdc.h -header-y += cdc-wdm.h -header-y += ch11.h -header-y += ch9.h -header-y += functionfs.h -header-y += g_printer.h -header-y += gadgetfs.h -header-y += midi.h -header-y += tmc.h -header-y += usb_ctrl_qti.h -header-y += video.h +no-export-headers += f_accessory.h +no-export-headers += f_mtp.h diff --git a/include/uapi/linux/wimax/Kbuild b/include/uapi/linux/wimax/Kbuild deleted file mode 100644 index 1c97be49971f..000000000000 --- a/include/uapi/linux/wimax/Kbuild +++ /dev/null @@ -1,2 +0,0 @@ -# UAPI Header export list -header-y += i2400m.h diff --git a/include/uapi/misc/Kbuild b/include/uapi/misc/Kbuild deleted file mode 100644 index e96cae7d58c9..000000000000 --- a/include/uapi/misc/Kbuild +++ /dev/null @@ -1,2 +0,0 @@ -# misc Header export list -header-y += cxl.h diff --git a/include/uapi/mtd/Kbuild b/include/uapi/mtd/Kbuild deleted file mode 100644 index 5a691e10cd0e..000000000000 --- a/include/uapi/mtd/Kbuild +++ /dev/null @@ -1,6 +0,0 @@ -# UAPI Header export list -header-y += inftl-user.h -header-y += mtd-abi.h -header-y += mtd-user.h -header-y += nftl-user.h -header-y += ubi-user.h diff --git a/include/uapi/rdma/Kbuild b/include/uapi/rdma/Kbuild index 231901b08f6c..aafaa5aa54d4 100644 --- a/include/uapi/rdma/Kbuild +++ b/include/uapi/rdma/Kbuild @@ -1,8 +1 @@ # UAPI Header export list -header-y += ib_user_cm.h -header-y += ib_user_mad.h -header-y += ib_user_sa.h -header-y += ib_user_verbs.h -header-y += rdma_netlink.h -header-y += rdma_user_cm.h -header-y += hfi/ diff --git a/include/uapi/rdma/hfi/Kbuild b/include/uapi/rdma/hfi/Kbuild deleted file mode 100644 index ef23c294fc71..000000000000 --- a/include/uapi/rdma/hfi/Kbuild +++ /dev/null @@ -1,2 +0,0 @@ -# UAPI Header export list -header-y += hfi1_user.h diff --git a/include/uapi/scsi/Kbuild b/include/uapi/scsi/Kbuild deleted file mode 100644 index 9a0da849dab7..000000000000 --- a/include/uapi/scsi/Kbuild +++ /dev/null @@ -1,9 +0,0 @@ -# UAPI Header export list -header-y += fc/ -header-y += ufs/ -header-y += scsi_bsg_fc.h -header-y += sg.h -header-y += scsi_ioctl.h -header-y += scsi_netlink.h -header-y += scsi_netlink_fc.h -header-y += cxlflash_ioctl.h diff --git a/include/uapi/scsi/fc/Kbuild b/include/uapi/scsi/fc/Kbuild deleted file mode 100644 index 5ead9fac265c..000000000000 --- a/include/uapi/scsi/fc/Kbuild +++ /dev/null @@ -1,5 +0,0 @@ -# UAPI Header export list -header-y += fc_els.h -header-y += fc_fs.h -header-y += fc_gs.h -header-y += fc_ns.h diff --git a/include/uapi/sound/Kbuild b/include/uapi/sound/Kbuild index a19a02471367..ea551c706330 100644 --- a/include/uapi/sound/Kbuild +++ b/include/uapi/sound/Kbuild @@ -1,21 +1,3 @@ -# UAPI Header export list -header-y += asequencer.h -header-y += asound.h -header-y += asound_fm.h -header-y += compress_offload.h -header-y += compress_params.h -header-y += emu10k1.h -header-y += firewire.h -header-y += hdsp.h -header-y += hdspm.h -header-y += sb16_csp.h -header-y += sfnt_info.h -header-y += tlv.h -header-y += lsm_params.h -header-y += audio_slimslave.h -header-y += voice_params.h -header-y += audio_effects.h -header-y += voice_svc.h -header-y += devdep_params.h -header-y += msmcal-hwdep.h -header-y += wcd-dsp-glink.h +#UAPI Header export list +no-export-headers += asoc.h +no-export-headers += usb_stream.h diff --git a/include/sound/audio_slimslave.h b/include/uapi/sound/audio_slimslave.h index 316a5573f5b4..316a5573f5b4 100644 --- a/include/sound/audio_slimslave.h +++ b/include/uapi/sound/audio_slimslave.h diff --git a/include/sound/voice_params.h b/include/uapi/sound/voice_params.h index 43e3b9d0aa49..43e3b9d0aa49 100644 --- a/include/sound/voice_params.h +++ b/include/uapi/sound/voice_params.h diff --git a/include/sound/voice_svc.h b/include/uapi/sound/voice_svc.h index 035053f091ef..035053f091ef 100644 --- a/include/sound/voice_svc.h +++ b/include/uapi/sound/voice_svc.h diff --git a/include/uapi/video/Kbuild b/include/uapi/video/Kbuild index e50d84d8747e..35ee3b643680 100644 --- a/include/uapi/video/Kbuild +++ b/include/uapi/video/Kbuild @@ -1,6 +1,2 @@ # UAPI Header export list -header-y += edid.h -header-y += sisfb.h -header-y += uvesafb.h -header-y += msm_hdmi_modes.h -header-y += msm_hdmi_hdcp_mgr.h +no-export-headers += adf.h diff --git a/include/uapi/xen/Kbuild b/include/uapi/xen/Kbuild deleted file mode 100644 index 5c459628e8c7..000000000000 --- a/include/uapi/xen/Kbuild +++ /dev/null @@ -1,5 +0,0 @@ -# UAPI Header export list -header-y += evtchn.h -header-y += gntalloc.h -header-y += gntdev.h -header-y += privcmd.h diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 38c8539edb17..90cc450dff7e 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1152,7 +1152,6 @@ extern unsigned int __read_mostly sched_small_wakee_task_load; extern unsigned int __read_mostly sched_spill_load; extern unsigned int __read_mostly sched_upmigrate; extern unsigned int __read_mostly sched_downmigrate; -extern unsigned int __read_mostly sysctl_sched_spill_nr_run; extern unsigned int __read_mostly sched_load_granule; extern void init_new_task_load(struct task_struct *p); diff --git a/kernel_headers.py b/kernel_headers.py new file mode 100644 index 000000000000..d36ca87d8cb4 --- /dev/null +++ b/kernel_headers.py @@ -0,0 +1,1076 @@ +# Copyright 2019 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Generates gen_headers_<arch>.bp or generates/checks kernel headers.""" + +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function + +import argparse +import filecmp +import os +import re +import subprocess +import sys + + +def gen_version_h(verbose, gen_dir, version_makefile): + """Generate linux/version.h + + Scan the version_makefile for the version info, and then generate + linux/version.h in the gen_dir as done in kernel Makefile function + filechk_version.h + + Args: + verbose: Set True to print progress messages. + gen_dir: Where to place the generated files. + version_makefile: The makefile that contains version info. + Return: + If version info not found, False. Otherwise, True. + """ + + version_re = re.compile(r'VERSION\s*=\s*(\d+)') + patchlevel_re = re.compile(r'PATCHLEVEL\s*=\s*(\d+)') + sublevel_re = re.compile(r'SUBLEVEL\s*=\s*(\d+)') + + version_str = None + patchlevel_str = None + sublevel_str = None + + if verbose: + print('gen_version_h: processing [%s]' % version_makefile) + + with open(version_makefile, 'r') as f: + while not version_str or not patchlevel_str or not sublevel_str: + line = f.readline() + + if not line: + print( + 'error: gen_version_h: failed to parse kernel version from %s' % + version_makefile) + return False + + line = line.rstrip() + + if verbose: + print('gen_version_h: line is %s' % line) + + if not version_str: + match = version_re.match(line) + if match: + if verbose: + print('gen_version_h: matched version [%s]' % line) + version_str = match.group(1) + continue + + if not patchlevel_str: + match = patchlevel_re.match(line) + if match: + if verbose: + print('gen_version_h: matched patchlevel [%s]' % line) + patchlevel_str = match.group(1) + continue + + if not sublevel_str: + match = sublevel_re.match(line) + if match: + if verbose: + print('gen_version_h: matched sublevel [%s]' % line) + sublevel_str = match.group(1) + continue + + version = int(version_str) + patchlevel = int(patchlevel_str) + sublevel = int(sublevel_str) + + if verbose: + print( + 'gen_version_h: found kernel version %d.%d.%d' % + (version, patchlevel, sublevel)) + + version_h = os.path.join(gen_dir, 'linux', 'version.h') + + with open(version_h, 'w') as f: + # This code must match the code in Makefile in the make function + # filechk_version.h + version_code = (version << 16) + (patchlevel << 8) + sublevel + f.write('#define LINUX_VERSION_CODE %d\n' % version_code) + f.write( + '#define KERNEL_VERSION(a,b,c) ' + + '(((a) << 16) + ((b) << 8) + (c))\n') + + return True + + +def scan_arch_kbuild(verbose, arch_asm_kbuild, asm_generic_kbuild, arch_include_uapi): + """Scan arch_asm_kbuild for generated headers. + + This function processes the Kbuild file to scan for three types of files that + need to be generated. The first type are syscall generated headers, which are + identified by adding to the generated-y make variable. The second type are + generic headers, which are arch-specific headers that simply wrap the + asm-generic counterpart, and are identified by adding to the generic-y make + variable. The third type are mandatory headers that should be present in the + /usr/include/asm folder. + + Args: + verbose: Set True to print progress messages. + arch_asm_kbuild: The Kbuild file containing lists of headers to generate. + asm_generic_kbuild: The Kbuild file containing lists of mandatory headers. + arch_include_uapi: Headers in /arch/<arch>/include/uapi directory + Return: + Two lists of discovered headers, one for generated and one for generic. + """ + + generated_y_re = re.compile(r'generated-y\s*\+=\s*(\S+)') + generic_y_re = re.compile(r'generic-y\s*\+=\s*(\S+)') + mandatory_y_re = re.compile(r'mandatory-y\s*\+=\s*(\S+)') + + # This loop parses arch_asm_kbuild for various kinds of headers to generate. + + if verbose: + print('scan_arch_kbuild: processing [%s]' % arch_asm_kbuild) + + generated_list = [] + generic_list = [] + arch_include_uapi_list = [os.path.basename(x) for x in arch_include_uapi] + mandatory_pre_list = [] + mandatory_list = [] + + + with open(arch_asm_kbuild, 'r') as f: + while True: + line = f.readline() + + if not line: + break + + line = line.rstrip() + + if verbose: + print('scan_arch_kbuild: line is %s' % line) + + match = generated_y_re.match(line) + + if match: + if verbose: + print('scan_arch_kbuild: matched [%s]' % line) + generated_list.append(match.group(1)) + continue + + match = generic_y_re.match(line) + + if match: + if verbose: + print('scan_arch_kbuild: matched [%s]' % line) + generic_list.append(match.group(1)) + continue + + # This loop parses asm_generic_kbuild for various kinds of headers to generate. + + if verbose: + print('scan_arch_kbuild: processing [%s]' % asm_generic_kbuild) + + with open(asm_generic_kbuild, 'r') as f: + while True: + line = f.readline() + + if not line: + break + + line = line.rstrip() + + if verbose: + print('scan_arch_kbuild: line is %s' % line) + + match = mandatory_y_re.match(line) + + if match: + if verbose: + print('scan_arch_kbuild: matched [%s]' % line) + mandatory_pre_list.append(match.group(1)) + continue + + # Mandatory headers need to be generated if they are not already generated. + comb_list = generic_list + generated_list + arch_include_uapi_list + mandatory_list = [x for x in mandatory_pre_list if x not in comb_list] + if verbose: + print("generic") + for x in generic_list: + print(x) + print("generated") + for x in generated_list: + print(x) + print("mandatory") + for x in mandatory_list: + print(x) + print("arch_include_uapi_list") + for x in arch_include_uapi_list: + print(x) + + return (generated_list, generic_list, mandatory_list) + + +def gen_arch_headers( + verbose, gen_dir, arch_asm_kbuild, asm_generic_kbuild, arch_syscall_tool, arch_syscall_tbl, arch_include_uapi): + """Process arch-specific and asm-generic uapi/asm/Kbuild to generate headers. + + The function consists of a call to scan_arch_kbuild followed by three loops. + The first loop generates headers found and placed in the generated_list by + scan_arch_kbuild. The second loop generates headers found and placed in the + generic_list by the scan_arch_kbuild. The third loop generates headers found + in mandatory_list by scan_arch_kbuild. + + The function does some parsing of file names and tool invocations. If that + parsing fails for some reason (e.g., we don't know how to generate the + header) or a tool invocation fails, then this function will count that as + an error but keep processing. In the end, the function returns the number of + errors encountered. + + Args: + verbose: Set True to print progress messages. + gen_dir: Where to place the generated files. + arch_asm_kbuild: The Kbuild file containing lists of headers to generate. + asm_generic_kbuild: The Kbuild file containing lists of mandatory headers. + arch_syscall_tool: The arch script that generates syscall headers, or None. + arch_syscall_tbl: The arch script that defines syscall vectors, or None. + arch_include_uapi: Headers in arch/<arch>/include/uapi directory. + Return: + The number of parsing errors encountered. + """ + + error_count = 0 + + # First generate the lists + + (generated_list, generic_list, mandatory_list) = scan_arch_kbuild(verbose, arch_asm_kbuild, asm_generic_kbuild ,arch_include_uapi) + + # Now we're at the first loop, which is able to generate syscall headers + # found in the first loop, and placed in generated_list. It's okay for this + # list to be empty. In that case, of course, the loop does nothing. + + abi_re = re.compile(r'unistd-(\S+)\.h') + + for generated in generated_list: + gen_h = os.path.join(gen_dir, 'asm', generated) + match = abi_re.match(generated) + + if match: + abi = match.group(1) + + cmd = [ + '/bin/bash', + arch_syscall_tool, + arch_syscall_tbl, + gen_h, + abi, + '', + '__NR_SYSCALL_BASE', + ] + + if verbose: + print('gen_arch_headers: cmd is %s' % cmd) + + result = subprocess.call(cmd) + + if result != 0: + print('error: gen_arch_headers: cmd %s failed %d' % (cmd, result)) + error_count += 1 + else: + print('error: gen_arch_headers: syscall header has bad filename: %s' % generated) + error_count += 1 + + # Now we're at the second loop, which generates wrappers from arch-specific + # headers listed in generic_list to the corresponding asm-generic header. + + for generic in generic_list: + wrap_h = os.path.join(gen_dir, 'asm', generic) + with open(wrap_h, 'w') as f: + f.write('#include <asm-generic/%s>\n' % generic) + + # Now we're at the third loop, which generates wrappers from asm + # headers listed in mandatory_list to the corresponding asm-generic header. + + for mandatory in mandatory_list: + wrap_h = os.path.join(gen_dir, 'asm', mandatory) + with open(wrap_h, 'w') as f: + f.write('#include <asm-generic/%s>\n' % mandatory) + return error_count + + +def run_headers_install(verbose, gen_dir, headers_install, prefix, h): + """Process a header through the headers_install script. + + The headers_install script does some processing of a header so that it is + appropriate for inclusion in a userland program. This function invokes that + script for one header file. + + The input file is a header file found in the directory named by prefix. This + function stips the prefix from the header to generate the name of the + processed header. + + Args: + verbose: Set True to print progress messages. + gen_dir: Where to place the generated files. + headers_install: The script that munges the header. + prefix: The prefix to strip from h to generate the output filename. + h: The input header to process. + Return: + If parsing or the tool fails, False. Otherwise, True + """ + + if not h.startswith(prefix): + print('error: expected prefix [%s] on header [%s]' % (prefix, h)) + return False + + out_h = os.path.join(gen_dir, h[len(prefix):]) + (out_h_dirname, out_h_basename) = os.path.split(out_h) + h_dirname = os.path.dirname(h) + + cmd = [headers_install, out_h_dirname, h_dirname, out_h_basename] + + if verbose: + print('run_headers_install: cmd is %s' % cmd) + + result = subprocess.call(cmd) + + if result != 0: + print('error: run_headers_install: cmd %s failed %d' % (cmd, result)) + return False + + return True + + +def glob_headers(prefix, rel_glob, excludes): + """Recursively scan the a directory for headers. + + This function recursively scans the directory identified by prefix for + headers. We don't yet have a new enough version of python3 to use the + better glob function, so right now we assume the glob is '**/*.h'. + + The function filters out any files that match the items in excludes. + + Args: + prefix: The directory to recursively scan for headers. + rel_glob: The shell-style glob that identifies the header pattern. + excludes: A list of headers to exclude from the glob. + Return: + A list of headers discovered with excludes excluded. + """ + + # If we had python 3.5+, we could use the fancy new glob.glob. + # full_glob = os.path.join(prefix, rel_glob) + # full_srcs = glob.glob(full_glob, recursive=True) + + full_dirs = [prefix] + full_srcs = [] + + while full_dirs: + full_dir = full_dirs.pop(0) + items = sorted(os.listdir(full_dir)) + + for item in items: + full_item = os.path.join(full_dir, item) + + if os.path.isdir(full_item): + full_dirs.append(full_item) + continue + + if full_item in excludes: + continue + + if full_item.endswith('.h'): + full_srcs.append(full_item) + + return full_srcs + + +def find_out(verbose, module_dir, prefix, rel_glob, excludes, outs): + """Build a list of outputs for the genrule that creates kernel headers. + + This function scans for headers in the source tree and produces a list of + output (generated) headers. + + Args: + verbose: Set True to print progress messages. + module_dir: The root directory of the kernel source. + prefix: The prefix with in the kernel source tree to search for headers. + rel_glob: The pattern to use when matching headers under prefix. + excludes: A list of files to exclude from the glob. + outs: The list to populdate with the headers that will be generated. + Return: + The number of errors encountered. + """ + + # Turn prefix, which is relative to the soong module, to a full prefix that + # is relative to the Android source tree. + + full_prefix = os.path.join(module_dir, prefix) + + # Convert the list of excludes, which are relative to the soong module, to a + # set of excludes (for easy hashing), relative to the Android source tree. + + full_excludes = set() + + if excludes: + for exclude in excludes: + full_exclude = os.path.join(full_prefix, exclude) + full_excludes.add(full_exclude) + + # Glob those headers. + + full_srcs = glob_headers(full_prefix, rel_glob, full_excludes) + + # Now convert the file names, which are relative to the Android source tree, + # to be relative to the gen dir. This means stripping off the module prefix + # and the directory within this module. + + module_dir_sep = module_dir + os.sep + prefix_sep = prefix + os.sep + + if verbose: + print('find_out: module_dir_sep [%s]' % module_dir_sep) + print('find_out: prefix_sep [%s]' % prefix_sep) + + error_count = 0 + + for full_src in full_srcs: + if verbose: + print('find_out: full_src [%s]' % full_src) + + if not full_src.startswith(module_dir_sep): + print('error: expected %s to start with %s' % (full_src, module_dir_sep)) + error_count += 1 + continue + + local_src = full_src[len(module_dir_sep):] + + if verbose: + print('find_out: local_src [%s]' % local_src) + + if not local_src.startswith(prefix_sep): + print('error: expected %s to start with %s' % (local_src, prefix_sep)) + error_count += 1 + continue + + # After stripping the module directory and the prefix, we're left with the + # name of a header that we'll generate, relative to the base of of a the + # the include path. + + local_out = local_src[len(prefix_sep):] + + if verbose: + print('find_out: local_out [%s]' % local_out) + + outs.append(local_out) + + return error_count + +def scan_no_export_headers(verbose, module_dir, prefix): + """Scan include/uapi kbuild for no-export-headers + + This function processes the Kbuild file to scan for no-export files that + should not export to usr/include/uapi which is identified by adding + to the no-export-headers make variable. + + Args: + verbose: Set True to print progress messages. + module_dir: The root directory of the kernel source. + prefix: The prefix with in the kernel source tree to search for headers. + Return: + lists of no-export-headers. + """ + + no_export_headers_re = re.compile(r'no-export-headers\s*\+=\s*(\S+)') + header_re = re.compile(r'include/uapi/') + full_dirs_ = os.path.join(module_dir, prefix) + full_dirs = [full_dirs_] + + if verbose: + print('scan_no_export_headers: processing [%s]' % full_dirs) + + full_srcs = [] + no_export_headers_lists = [] + + while full_dirs: + full_dir = full_dirs.pop(0) + items = sorted(os.listdir(full_dir)) + + for item in items: + full_item = os.path.join(full_dir, item) + + if os.path.isdir(full_item): + full_dirs.append(full_item) + continue + + if (full_item.find('Kbuild') != -1): + full_srcs.append(full_item) + + for full_src in full_srcs: + with open(full_src, 'r') as f: + while True: + line = f.readline() + + if not line: + break + + line = line.rstrip() + + match = no_export_headers_re.match(line) + + if match: + if verbose: + print('scan_no_export_headers: matched [%s]' % line) + + if (match.group(1) == "kvm.h" or + match.group(1) == "kvm_para.h" or + match.group(1) == "a.out.h"): + continue + + (full_src_dir_name, full_src_base_name) = full_src.split('include/uapi/') + no_export_header_file_name = os.path.join(os.path.dirname(full_src_base_name),match.group(1)) + + if verbose: + print('scan_no_export_headers: no_export_header_file_name = ',no_export_header_file_name) + + no_export_headers_lists.append(no_export_header_file_name) + continue + + if verbose: + for x in no_export_headers_lists: + print('scan_no_export_headers: no_export_headers_lists [%s]' % x) + + return no_export_headers_lists + +def gen_blueprints( + verbose, header_arch, gen_dir, arch_asm_kbuild, asm_generic_kbuild, module_dir, + rel_arch_asm_kbuild, rel_asm_generic_kbuild, arch_include_uapi, techpack_include_uapi): + """Generate a blueprints file containing modules that invoke this script. + + This function generates a blueprints file that contains modules that + invoke this script to generate kernel headers. We generate the blueprints + file as needed, but we don't actually use the generated file. The blueprints + file that we generate ends up in the out directory, and we can use it to + detect if the checked-in version of the file (in the source directory) is out + of date. This pattern occurs in the Android source tree in several places. + + Args: + verbose: Set True to print progress messages. + header_arch: The arch for which to generate headers. + gen_dir: Where to place the generated files. + arch_asm_kbuild: The Kbuild file containing lists of headers to generate. + asm_generic_kbuild: The Kbuild file containing lists of mandatory headers. + module_dir: The root directory of the kernel source. + rel_arch_asm_kbuild: arch_asm_kbuild relative to module_dir. + Return: + The number of errors encountered. + """ + error_count = 0 + + # The old and new blueprints files. We generate the new one, but we need to + # refer to the old one in the modules that we generate. + old_gen_headers_bp = 'gen_headers_%s.bp' % header_arch + new_gen_headers_bp = os.path.join(gen_dir, old_gen_headers_bp) + + # Tools and tool files. + headers_install_sh = 'headers_install.sh' + kernel_headers_py = 'kernel_headers.py' + arm_syscall_tool = 'arch/arm/tools/syscallhdr.sh' + + # Sources + makefile = 'Makefile' + arm_syscall_tbl = 'arch/arm/tools/syscall.tbl' + rel_glob = '**/*.h' + generic_prefix = 'include/uapi' + arch_prefix = os.path.join('arch', header_arch, generic_prefix) + generic_src = os.path.join(generic_prefix, rel_glob) + arch_src = os.path.join(arch_prefix, rel_glob) + techpack_src = os.path.join('techpack/*',generic_prefix, '*',rel_glob) + + # Excluded sources, architecture specific. + exclude_srcs = [] + + if header_arch == "arm": + exclude_srcs = ['linux/a.out.h'] + + if header_arch == "arm64": + exclude_srcs = ['linux/a.out.h', 'linux/kvm_para.h'] + + no_export_headers_lists = scan_no_export_headers(verbose, module_dir, generic_prefix) + + for no_export_headers_list in no_export_headers_lists: + exclude_srcs.append(no_export_headers_list) + + if verbose: + for x in exclude_srcs: + print('gen_blueprints : exclude_srcs [%s]' % x) + + # Scan the arch_asm_kbuild file for files that need to be generated and those + # that are generic (i.e., need to be wrapped). + + (generated_list, generic_list, mandatory_list) = scan_arch_kbuild(verbose, + arch_asm_kbuild, asm_generic_kbuild, arch_include_uapi) + + generic_out = [] + error_count += find_out( + verbose, module_dir, generic_prefix, rel_glob, exclude_srcs, generic_out) + + arch_out = [] + error_count += find_out( + verbose, module_dir, arch_prefix, rel_glob, None, arch_out) + + techpack_out = [x.split('include/uapi/')[1] for x in techpack_include_uapi] + + if error_count != 0: + return error_count + + # Generate the blueprints file. + + if verbose: + print('gen_blueprints: generating %s' % new_gen_headers_bp) + + with open(new_gen_headers_bp, 'w') as f: + f.write('// ***** DO NOT EDIT *****\n') + f.write('// This file is generated by %s\n' % kernel_headers_py) + f.write('\n') + f.write('gen_headers_srcs_%s = [\n' % header_arch) + f.write(' "%s",\n' % rel_arch_asm_kbuild) + f.write(' "%s",\n' % rel_asm_generic_kbuild) + f.write(' "%s",\n' % makefile) + + if header_arch == "arm": + f.write(' "%s",\n' % arm_syscall_tbl) + + f.write(' "%s",\n' % generic_src) + f.write(' "%s",\n' % arch_src) + f.write(']\n') + f.write('\n') + + if exclude_srcs: + f.write('gen_headers_exclude_srcs_%s = [\n' % header_arch) + for h in exclude_srcs: + f.write(' "%s",\n' % os.path.join(generic_prefix, h)) + f.write(']\n') + f.write('\n') + + f.write('gen_headers_out_%s = [\n' % header_arch) + + if generated_list: + f.write('\n') + f.write(' // Matching generated-y:\n') + f.write('\n') + for h in generated_list: + f.write(' "asm/%s",\n' % h) + + if generic_list: + f.write('\n') + f.write(' // Matching generic-y:\n') + f.write('\n') + for h in generic_list: + f.write(' "asm/%s",\n' % h) + + if mandatory_list: + f.write('\n') + f.write(' // Matching mandatory-y:\n') + f.write('\n') + for h in mandatory_list: + f.write(' "asm/%s",\n' % h) + + if generic_out: + f.write('\n') + f.write(' // From %s\n' % generic_src) + f.write('\n') + for h in generic_out: + f.write(' "%s",\n' % h) + + if arch_out: + f.write('\n') + f.write(' // From %s\n' % arch_src) + f.write('\n') + for h in arch_out: + f.write(' "%s",\n' % h) + + if techpack_out: + f.write('\n') + f.write(' // From %s\n' % techpack_src) + f.write('\n') + for h in techpack_out: + f.write(' "%s",\n' % h) + + f.write(']\n') + f.write('\n') + + gen_blueprints_module_name = 'qti_generate_gen_headers_%s' % header_arch + + f.write('genrule {\n') + f.write(' // This module generates the gen_headers_<arch>.bp file\n') + f.write(' // (i.e., a new version of this file) so that it can be\n') + f.write(' // checked later to ensure that it matches the checked-\n') + f.write(' // in version (this file).\n') + f.write(' name: "%s",\n' % gen_blueprints_module_name) + f.write(' srcs: gen_headers_srcs_%s,\n' % header_arch) + if exclude_srcs: + f.write(' exclude_srcs: gen_headers_exclude_srcs_%s,\n' % header_arch) + + f.write(' tool_files: ["kernel_headers.py"],\n') + f.write(' cmd: "python3 $(location kernel_headers.py) " +\n') + f.write(' kernel_headers_verbose +\n') + f.write(' "--header_arch %s " +\n' % header_arch) + f.write(' "--gen_dir $(genDir) " +\n') + f.write(' "--arch_asm_kbuild $(location %s) " +\n' % rel_arch_asm_kbuild) + f.write(' "--arch_include_uapi $(locations %s) " +\n' % arch_src) + f.write(' "--asm_generic_kbuild $(location %s) " +\n' % rel_asm_generic_kbuild) + f.write(' "blueprints " +\n') + f.write(' "# $(in)",\n') + f.write(' out: ["gen_headers_%s.bp"],\n' % header_arch) + f.write('}\n') + f.write('\n') + + f.write('genrule {\n') + f.write(' name: "qti_generate_kernel_headers_%s",\n' % header_arch) + f.write(' tools: ["%s"],\n' % headers_install_sh) + f.write(' tool_files: [\n') + f.write(' "%s",\n' % kernel_headers_py) + + if header_arch == "arm": + f.write(' "%s",\n' % arm_syscall_tool) + + f.write(' ],\n') + f.write(' srcs: gen_headers_srcs_%s +[\n' % header_arch) + f.write(' "%s",\n' % old_gen_headers_bp) + f.write(' ":%s",\n' % gen_blueprints_module_name) + f.write(' ],\n') + + if exclude_srcs: + f.write(' exclude_srcs: gen_headers_exclude_srcs_%s,\n' % header_arch) + + f.write(' cmd: "python3 $(location %s) " +\n' % kernel_headers_py) + f.write(' kernel_headers_verbose +\n') + f.write(' "--header_arch %s " +\n' % header_arch) + f.write(' "--gen_dir $(genDir) " +\n') + f.write(' "--arch_asm_kbuild $(location %s) " +\n' % rel_arch_asm_kbuild) + f.write(' "--arch_include_uapi $(locations %s) " +\n' % arch_src) + f.write(' "--asm_generic_kbuild $(location %s) " +\n' % rel_asm_generic_kbuild) + f.write(' "headers " +\n') + f.write(' "--old_gen_headers_bp $(location %s) " +\n' % old_gen_headers_bp) + f.write(' "--new_gen_headers_bp $(location :%s) " +\n' % gen_blueprints_module_name) + f.write(' "--version_makefile $(location %s) " +\n' % makefile) + + if header_arch == "arm": + f.write(' "--arch_syscall_tool $(location %s) " +\n' % arm_syscall_tool) + f.write(' "--arch_syscall_tbl $(location %s) " +\n' % arm_syscall_tbl) + + f.write(' "--headers_install $(location %s) " +\n' % headers_install_sh) + f.write(' "--include_uapi $(locations %s)",\n' % generic_src) + f.write(' out: ["linux/version.h"] + gen_headers_out_%s,\n' % header_arch) + f.write('}\n') + + return 0 + +def parse_bp_for_headers(file_name, headers): + parsing_headers = False + pattern = re.compile("gen_headers_out_[a-zA-Z0-9]+\s*=\s*\[\s*") + with open(file_name, 'r') as f: + for line in f: + line = line.strip() + if pattern.match(line): + parsing_headers = True + continue + + if line.find("]") != -1 and parsing_headers: + break + + if not parsing_headers: + continue + + if line.find("//") == 0: + continue + + headers.add(line[1:-2]) + +def headers_diff(old_file, new_file): + old_headers = set() + new_headers = set() + diff_detected = False + + parse_bp_for_headers(old_file, old_headers) + parse_bp_for_headers(new_file, new_headers) + + diff = old_headers - new_headers + if len(diff): + diff_detected = True + print("Headers to remove:") + for x in diff: + print("\t{}".format(x)) + + diff = new_headers - old_headers + if len(diff): + diff_detected = True + print("Headers to add:") + for x in diff: + print("\t{}".format(x)) + + return diff_detected + +def gen_headers( + verbose, header_arch, gen_dir, arch_asm_kbuild, asm_generic_kbuild, module_dir, + old_gen_headers_bp, new_gen_headers_bp, version_makefile, + arch_syscall_tool, arch_syscall_tbl, headers_install, include_uapi, + arch_include_uapi, techpack_include_uapi): + """Generate the kernel headers. + + This script generates the version.h file, the arch-specific headers including + syscall-related generated files and wrappers around generic files, and uses + the headers_install tool to process other generic uapi and arch-specific uapi + files. + + Args: + verbose: Set True to print progress messages. + header_arch: The arch for which to generate headers. + gen_dir: Where to place the generated files. + arch_asm_kbuild: The Kbuild file containing lists of headers to generate. + asm_generic_kbuild: The Kbuild file containing mandatory headers. + module_dir: The root directory of the kernel source. + old_gen_headers_bp: The old gen_headers_<arch>.bp file to check. + new_gen_headers_bp: The new gen_headers_<arch>.bp file to check. + version_makefile: The kernel Makefile that contains version info. + arch_syscall_tool: The arch script that generates syscall headers. + arch_syscall_tbl: The arch script that defines syscall vectors. + headers_install: The headers_install tool to process input headers. + include_uapi: The list of include/uapi header files. + arch_include_uapi: The list of arch/<arch>/include/uapi header files. + Return: + The number of errors encountered. + """ + + if headers_diff(old_gen_headers_bp, new_gen_headers_bp): + print('error: gen_headers blueprints file is out of date, suggested fix:') + print('#######Please add or remove the above mentioned headers from %s' % (old_gen_headers_bp)) + print('then re-run the build') + return 1 + + error_count = 0 + + if not gen_version_h(verbose, gen_dir, version_makefile): + error_count += 1 + + error_count += gen_arch_headers( + verbose, gen_dir, arch_asm_kbuild, asm_generic_kbuild, arch_syscall_tool, arch_syscall_tbl ,arch_include_uapi) + + uapi_include_prefix = os.path.join(module_dir, 'include', 'uapi') + os.sep + + arch_uapi_include_prefix = os.path.join( + module_dir, 'arch', header_arch, 'include', 'uapi') + os.sep + + for h in include_uapi: + if not run_headers_install( + verbose, gen_dir, headers_install, + uapi_include_prefix, h): + error_count += 1 + + for h in arch_include_uapi: + if not run_headers_install( + verbose, gen_dir, headers_install, + arch_uapi_include_prefix, h): + error_count += 1 + + for h in techpack_include_uapi: + techpack_uapi_include_prefix = os.path.join(h.split('/include/uapi')[0], 'include', 'uapi') + os.sep + if not run_headers_install( + verbose, gen_dir, headers_install, + techpack_uapi_include_prefix, h): + error_count += 1 + + return error_count + +def extract_techpack_uapi_headers(verbose, module_dir): + + """EXtract list of uapi headers from techpack/* directories. We need to export + these headers to userspace. + + Args: + verbose: Verbose option is provided to script + module_dir: Base directory + Returs: + List of uapi headers + """ + + techpack_subdir = [] + techpack_dir = os.path.join(module_dir,'techpack') + techpack_uapi = [] + techpack_uapi_sub = [] + + #get list of techpack directories under techpack/ + if os.path.isdir(techpack_dir): + items = sorted(os.listdir(techpack_dir)) + for x in items: + p = os.path.join(techpack_dir, x) + if os.path.isdir(p): + techpack_subdir.append(p) + + #Print list of subdirs obtained + if (verbose): + for x in techpack_subdir: + print(x) + + #For every subdirectory get list of .h files under include/uapi and append to techpack_uapi list + for x in techpack_subdir: + techpack_uapi_path = os.path.join(x, 'include/uapi') + if (os.path.isdir(techpack_uapi_path)): + techpack_uapi_sub = [] + find_out(verbose, x, 'include/uapi', '**/*.h', None, techpack_uapi_sub) + tmp = [os.path.join(techpack_uapi_path, y) for y in techpack_uapi_sub] + techpack_uapi = techpack_uapi + tmp + + if (verbose): + for x in techpack_uapi: + print(x) + + return techpack_uapi + +def main(): + """Parse command line arguments and perform top level control.""" + + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter) + + # Arguments that apply to every invocation of this script. + + parser.add_argument( + '--verbose', + action='store_true', + help='Print output that describes the workings of this script.') + parser.add_argument( + '--header_arch', + required=True, + help='The arch for which to generate headers.') + parser.add_argument( + '--gen_dir', + required=True, + help='Where to place the generated files.') + parser.add_argument( + '--arch_asm_kbuild', + required=True, + help='The Kbuild file containing lists of headers to generate.') + parser.add_argument( + '--asm_generic_kbuild', + required=True, + help='The Kbuild file containing lists of mandatory headers.') + parser.add_argument( + '--arch_include_uapi', + required=True, + nargs='*', + help='The list of arch/<arch>/include/uapi header files.') + + # The modes. + + subparsers = parser.add_subparsers( + dest='mode', + help='Select mode') + parser_blueprints = subparsers.add_parser( + 'blueprints', + help='Generate the gen_headers_<arch>.bp file.') + parser_headers = subparsers.add_parser( + 'headers', + help='Check blueprints, then generate kernel headers.') + + # Arguments that apply to headers mode. + + parser_headers.add_argument( + '--old_gen_headers_bp', + required=True, + help='The old gen_headers_<arch>.bp file to check.') + parser_headers.add_argument( + '--new_gen_headers_bp', + required=True, + help='The new gen_headers_<arch>.bp file to check.') + parser_headers.add_argument( + '--version_makefile', + required=True, + help='The kernel Makefile that contains version info.') + parser_headers.add_argument( + '--arch_syscall_tool', + help='The arch script that generates syscall headers, if applicable.') + parser_headers.add_argument( + '--arch_syscall_tbl', + help='The arch script that defines syscall vectors, if applicable.') + parser_headers.add_argument( + '--headers_install', + required=True, + help='The headers_install tool to process input headers.') + parser_headers.add_argument( + '--include_uapi', + required=True, + nargs='*', + help='The list of include/uapi header files.') + + args = parser.parse_args() + + if args.verbose: + print('mode [%s]' % args.mode) + print('header_arch [%s]' % args.header_arch) + print('gen_dir [%s]' % args.gen_dir) + print('arch_asm_kbuild [%s]' % args.arch_asm_kbuild) + print('asm_generic_kbuild [%s]' % args.asm_generic_kbuild) + + # Extract the module_dir from args.arch_asm_kbuild and rel_arch_asm_kbuild. + + rel_arch_asm_kbuild = os.path.join( + 'arch', args.header_arch, 'include/uapi/asm/Kbuild') + + suffix = os.sep + rel_arch_asm_kbuild + + if not args.arch_asm_kbuild.endswith(suffix): + print('error: expected %s to end with %s' % (args.arch_asm_kbuild, suffix)) + return 1 + + module_dir = args.arch_asm_kbuild[:-len(suffix)] + + rel_asm_generic_kbuild = os.path.join('include/uapi/asm-generic', os.path.basename(args.asm_generic_kbuild)) + + + if args.verbose: + print('module_dir [%s]' % module_dir) + + techpack_include_uapi = [] + + + if args.mode == 'blueprints': + return gen_blueprints( + args.verbose, args.header_arch, args.gen_dir, args.arch_asm_kbuild, + args.asm_generic_kbuild, module_dir, rel_arch_asm_kbuild, rel_asm_generic_kbuild, args.arch_include_uapi, techpack_include_uapi) + + if args.mode == 'headers': + if args.verbose: + print('old_gen_headers_bp [%s]' % args.old_gen_headers_bp) + print('new_gen_headers_bp [%s]' % args.new_gen_headers_bp) + print('version_makefile [%s]' % args.version_makefile) + print('arch_syscall_tool [%s]' % args.arch_syscall_tool) + print('arch_syscall_tbl [%s]' % args.arch_syscall_tbl) + print('headers_install [%s]' % args.headers_install) + + return gen_headers( + args.verbose, args.header_arch, args.gen_dir, args.arch_asm_kbuild, + args.asm_generic_kbuild, module_dir, args.old_gen_headers_bp, args.new_gen_headers_bp, + args.version_makefile, args.arch_syscall_tool, args.arch_syscall_tbl, + args.headers_install, args.include_uapi, args.arch_include_uapi, techpack_include_uapi) + + print('error: unknown mode: %s' % args.mode) + return 1 + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 3608806b8afd..5fb21dca3b16 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -3880,8 +3880,10 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) if (err) return err; - err = validate_beacon_tx_rate(rdev, params.chandef.chan->band, - ¶ms.beacon_rate); + err = validate_beacon_tx_rate( + rdev, + (enum nl80211_band)(params.chandef.chan->band), + ¶ms.beacon_rate); if (err) return err; } @@ -6263,7 +6265,10 @@ static int parse_bss_select(struct nlattr *nla, struct wiphy *wiphy, bss_select->behaviour = NL80211_BSS_SELECT_ATTR_RSSI_ADJUST; bss_select->param.adjust.band = adj_param->band; bss_select->param.adjust.delta = adj_param->delta; - if (!is_band_valid(wiphy, bss_select->param.adjust.band)) + if (!is_band_valid( + wiphy, + ((enum ieee80211_band)(bss_select->param.adjust.band)) + )) return -EINVAL; } @@ -6972,7 +6977,10 @@ nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev, attrs[NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST]); request->rssi_adjust.band = rssi_adjust->band; request->rssi_adjust.delta = rssi_adjust->delta; - if (!is_band_valid(wiphy, request->rssi_adjust.band)) { + if (!is_band_valid( + wiphy, + (enum ieee80211_band)(request->rssi_adjust.band) + )) { err = -EINVAL; goto out_free; } @@ -9497,8 +9505,10 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info) if (err) return err; - err = validate_beacon_tx_rate(rdev, setup.chandef.chan->band, - &setup.beacon_rate); + err = validate_beacon_tx_rate( + rdev, + (enum nl80211_band)(setup.chandef.chan->band), + &setup.beacon_rate); if (err) return err; } diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic index 045e0098e962..95f7d8090152 100644 --- a/scripts/Makefile.asm-generic +++ b/scripts/Makefile.asm-generic @@ -13,11 +13,26 @@ include scripts/Kbuild.include # Create output directory if not already present _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) +# Stale wrappers when the corresponding files are removed from generic-y +# need removing. +generated-y := $(generic-y) $(generated-y) +all-files := $(patsubst %, $(obj)/%, $(generated-y)) +old-headers := $(wildcard $(obj)/*.h) +unwanted := $(filter-out $(all-files),$(old-headers)) + quiet_cmd_wrap = WRAP $@ cmd_wrap = echo "\#include <asm-generic/$*.h>" >$@ -all: $(patsubst %, $(obj)/%, $(generic-y)) +quiet_cmd_remove = REMOVE $(unwanted) +cmd_remove = rm -f $(unwanted) + +all: $(patsubst %, $(obj)/%, $(generic-y)) FORCE + $(if $(unwanted),$(call cmd,remove),) @: $(obj)/%.h: $(call cmd,wrap) + +PHONY += FORCE +.PHONY: $(PHONY) +FORCE: ; diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index ed95cb4e515f..82abf5a09e5d 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst @@ -1,33 +1,56 @@ # ========================================================================== # Installing headers # -# header-y - list files to be installed. They are preprocessed -# to remove __KERNEL__ section of the file -# genhdr-y - Same as header-y but in a generated/ directory +# All headers under include/uapi, include/generated/uapi, +# arch/<arch>/include/uapi and arch/<arch>/include/generated/uapi are +# exported. +# They are preprocessed to remove __KERNEL__ section of the file. # # ========================================================================== +PHONY := __headers +__headers: + +include scripts/Kbuild.include + +srcdir := $(srctree)/$(obj) +subdirs := $(patsubst $(srcdir)/%/.,%,$(wildcard $(srcdir)/*/.)) +# caller may set destination dir (when installing to asm/) +_dst := $(if $(dst),$(dst),$(obj)) + +# Recursion +__headers: $(subdirs) + +.PHONY: $(subdirs) +$(subdirs): + $(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(_dst)/$@ + +# Skip header install/check for include/uapi and arch/$(hdr-arch)/include/uapi. +# We have only sub-directories there. +skip-inst := $(if $(filter %/uapi,$(obj)),1) + +ifeq ($(skip-inst),) + # generated header directory gen := $(if $(gen),$(gen),$(subst include/,include/generated/,$(obj))) +# Kbuild file is optional kbuild-file := $(srctree)/$(obj)/Kbuild -include $(kbuild-file) - -# called may set destination dir (when installing to asm/) -_dst := $(if $(destination-y),$(destination-y),$(if $(dst),$(dst),$(obj))) +-include $(kbuild-file) old-kbuild-file := $(srctree)/$(subst uapi/,,$(obj))/Kbuild ifneq ($(wildcard $(old-kbuild-file)),) include $(old-kbuild-file) endif -include scripts/Kbuild.include - installdir := $(INSTALL_HDR_PATH)/$(subst uapi/,,$(_dst)) -header-y := $(sort $(header-y)) -subdirs := $(patsubst %/,%,$(filter %/, $(header-y))) -header-y := $(filter-out %/, $(header-y)) +gendir := $(objtree)/$(gen) +header-files := $(notdir $(wildcard $(srcdir)/*.h)) +header-files += $(notdir $(wildcard $(srcdir)/*.agh)) +header-files := $(filter-out $(no-export-headers), $(header-files)) +genhdr-files := $(notdir $(wildcard $(gendir)/*.h)) +genhdr-files := $(filter-out $(header-files), $(genhdr-files)) # files used to track state of install/check install-file := $(installdir)/.install @@ -35,36 +58,22 @@ check-file := $(installdir)/.check # generic-y list all files an architecture uses from asm-generic # Use this to build a list of headers which require a wrapper -wrapper-files := $(filter $(header-y), $(generic-y)) - -srcdir := $(srctree)/$(obj) -gendir := $(objtree)/$(gen) +generic-files := $(notdir $(wildcard $(srctree)/include/uapi/asm-generic/*.h)) +wrapper-files := $(filter $(generic-files), $(generic-y)) +wrapper-files := $(filter-out $(header-files), $(wrapper-files)) oldsrcdir := $(srctree)/$(subst /uapi,,$(obj)) # all headers files for this dir -header-y := $(filter-out $(generic-y), $(header-y)) -all-files := $(header-y) $(genhdr-y) $(wrapper-files) +all-files := $(header-files) $(genhdr-files) $(wrapper-files) output-files := $(addprefix $(installdir)/, $(all-files)) -input-files1 := $(foreach hdr, $(header-y), \ - $(if $(wildcard $(srcdir)/$(hdr)), \ - $(wildcard $(srcdir)/$(hdr))) \ - ) -input-files1-name := $(notdir $(input-files1)) -input-files2 := $(foreach hdr, $(header-y), \ - $(if $(wildcard $(srcdir)/$(hdr)),, \ - $(if $(wildcard $(oldsrcdir)/$(hdr)), \ - $(wildcard $(oldsrcdir)/$(hdr)), \ - $(error Missing UAPI file $(srcdir)/$(hdr))) \ - )) -input-files2-name := $(notdir $(input-files2)) -input-files3 := $(foreach hdr, $(genhdr-y), \ - $(if $(wildcard $(gendir)/$(hdr)), \ - $(wildcard $(gendir)/$(hdr)), \ - $(error Missing generated UAPI file $(gendir)/$(hdr)) \ - )) -input-files3-name := $(notdir $(input-files3)) +ifneq ($(mandatory-y),) +missing := $(filter-out $(all-files),$(mandatory-y)) +ifneq ($(missing),) +$(error Some mandatory headers ($(missing)) are missing in $(obj)) +endif +endif # Work out what needs to be removed oldheaders := $(patsubst $(installdir)/%,%,$(wildcard $(installdir)/*.h)) @@ -78,9 +87,8 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@)) quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ file$(if $(word 2, $(all-files)),s)) cmd_install = \ - $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(input-files1-name); \ - $(CONFIG_SHELL) $< $(installdir) $(oldsrcdir) $(input-files2-name); \ - $(CONFIG_SHELL) $< $(installdir) $(gendir) $(input-files3-name); \ + $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(header-files); \ + $(CONFIG_SHELL) $< $(installdir) $(gendir) $(genhdr-files); \ for F in $(wrapper-files); do \ echo "\#include <asm-generic/$$F>" > $(installdir)/$$F; \ done; \ @@ -98,21 +106,21 @@ quiet_cmd_check = CHECK $(printdir) ($(words $(all-files)) files) $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH); \ touch $@ -PHONY += __headersinst __headerscheck - ifndef HDRCHECK # Rules for installing headers -__headersinst: $(subdirs) $(install-file) +__headers: $(install-file) @: targets += $(install-file) -$(install-file): scripts/headers_install.sh $(input-files1) $(input-files2) $(input-files3) FORCE +$(install-file): scripts/headers_install.sh \ + $(addprefix $(srcdir)/,$(header-files)) \ + $(addprefix $(gendir)/,$(genhdr-files)) FORCE $(if $(unwanted),$(call cmd,remove),) $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@))) $(call if_changed,install) else -__headerscheck: $(subdirs) $(check-file) +__headers: $(check-file) @: targets += $(check-file) @@ -121,11 +129,6 @@ $(check-file): scripts/headers_check.pl $(output-files) FORCE endif -# Recursion -.PHONY: $(subdirs) -$(subdirs): - $(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(_dst)/$(subst drivers/staging,usr/include/linux/staging,$@) - targets := $(wildcard $(sort $(targets))) cmd_files := $(wildcard \ $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) @@ -134,6 +137,8 @@ ifneq ($(cmd_files),) include $(cmd_files) endif +endif # skip-inst + .PHONY: $(PHONY) PHONY += FORCE FORCE: ; diff --git a/sound/soc/codecs/msm_stub.c b/sound/soc/codecs/msm_stub.c index 9a9c54e4a74f..ffb3f84c0927 100755..100644 --- a/sound/soc/codecs/msm_stub.c +++ b/sound/soc/codecs/msm_stub.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2014, 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 @@ -24,9 +24,12 @@ static struct snd_soc_dai_driver msm_stub_dais[] = { .playback = { /* Support maximum range */ .stream_name = "Playback", .channels_min = 1, - .channels_max = 8, - .rates = SNDRV_PCM_RATE_8000_48000, - .formats = SNDRV_PCM_FMTBIT_S16_LE, + .channels_max = 16, + .rates = SNDRV_PCM_RATE_8000_384000, + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE | + SNDRV_PCM_FMTBIT_S32_LE), }, }, { @@ -34,10 +37,12 @@ static struct snd_soc_dai_driver msm_stub_dais[] = { .capture = { /* Support maximum range */ .stream_name = "Record", .channels_min = 1, - .channels_max = 8, + .channels_max = 16, .rates = SNDRV_PCM_RATE_8000_48000, .formats = (SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_LE), + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE | + SNDRV_PCM_FMTBIT_S32_LE), }, }, }; diff --git a/sound/soc/codecs/wcd_cpe_services.c b/sound/soc/codecs/wcd_cpe_services.c index 58f02f1f35f5..18cd44d3d9c7 100644 --- a/sound/soc/codecs/wcd_cpe_services.c +++ b/sound/soc/codecs/wcd_cpe_services.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2016, 2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2016, 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 @@ -663,7 +663,7 @@ static void cpe_notify_cmi_client(struct cpe_info *t_info, u8 *payload, hdr = CMI_GET_HEADER(payload); service = CMI_HDR_GET_SERVICE(hdr); - notif.event = CPE_SVC_CMI_MSG; + notif.event = (enum cmi_api_event)CPE_SVC_CMI_MSG; notif.result = result; notif.message = payload; @@ -1178,7 +1178,7 @@ static enum cpe_process_result cpe_boot_complete( } pr_debug("%s: boot complete\n", __func__); - return CPE_SVC_SUCCESS; + return CPE_PROC_SUCCESS; } static enum cpe_process_result cpe_process_send_msg( diff --git a/sound/soc/msm/msm-dai-fe.c b/sound/soc/msm/msm-dai-fe.c index c9178fb3b8a3..a3ffda22b456 100644 --- a/sound/soc/msm/msm-dai-fe.c +++ b/sound/soc/msm/msm-dai-fe.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-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 @@ -2164,7 +2164,10 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .aif_name = "MM_UL9", .rates = (SNDRV_PCM_RATE_8000_48000| SNDRV_PCM_RATE_KNOT), - .formats = SNDRV_PCM_FMTBIT_S16_LE, + .formats = (SNDRV_PCM_FMTBIT_S16_LE| + SNDRV_PCM_FMTBIT_S24_LE| + SNDRV_PCM_FMTBIT_S24_3LE| + SNDRV_PCM_FMTBIT_S32_LE), .channels_min = 1, .channels_max = 32, .rate_min = 8000, @@ -2840,6 +2843,138 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .name = "MultiMedia29", .probe = fe_dai_probe, }, + { + .playback = { + .stream_name = "MultiMedia30 Playback", + .aif_name = "MM_DL30", + .rates = (SNDRV_PCM_RATE_8000_384000| + SNDRV_PCM_RATE_KNOT), + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE | + SNDRV_PCM_FMTBIT_S32_LE), + .channels_min = 1, + .channels_max = 32, + .rate_min = 8000, + .rate_max = 384000, + }, + .capture = { + .stream_name = "MultiMedia30 Capture", + .aif_name = "MM_UL30", + .rates = (SNDRV_PCM_RATE_8000_48000| + SNDRV_PCM_RATE_KNOT), + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE | + SNDRV_PCM_FMTBIT_S32_LE), + .channels_min = 1, + .channels_max = 32, + .rate_min = 8000, + .rate_max = 384000, + }, + .ops = &msm_fe_Multimedia_dai_ops, + .name = "MultiMedia30", + .probe = fe_dai_probe, + }, + { + .playback = { + .stream_name = "MultiMedia31 Playback", + .aif_name = "MM_DL31", + .rates = (SNDRV_PCM_RATE_8000_384000| + SNDRV_PCM_RATE_KNOT), + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE | + SNDRV_PCM_FMTBIT_S32_LE), + .channels_min = 1, + .channels_max = 32, + .rate_min = 8000, + .rate_max = 384000, + }, + .capture = { + .stream_name = "MultiMedia31 Capture", + .aif_name = "MM_UL31", + .rates = (SNDRV_PCM_RATE_8000_48000| + SNDRV_PCM_RATE_KNOT), + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE | + SNDRV_PCM_FMTBIT_S32_LE), + .channels_min = 1, + .channels_max = 32, + .rate_min = 8000, + .rate_max = 48000, + }, + .ops = &msm_fe_Multimedia_dai_ops, + .name = "MultiMedia31", + .probe = fe_dai_probe, + }, + { + .playback = { + .stream_name = "MultiMedia32 Playback", + .aif_name = "MM_DL32", + .rates = (SNDRV_PCM_RATE_8000_384000| + SNDRV_PCM_RATE_KNOT), + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE | + SNDRV_PCM_FMTBIT_S32_LE), + .channels_min = 1, + .channels_max = 32, + .rate_min = 8000, + .rate_max = 384000, + }, + .capture = { + .stream_name = "MultiMedia32 Capture", + .aif_name = "MM_UL32", + .rates = (SNDRV_PCM_RATE_8000_48000| + SNDRV_PCM_RATE_KNOT), + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE | + SNDRV_PCM_FMTBIT_S32_LE), + .channels_min = 1, + .channels_max = 32, + .rate_min = 8000, + .rate_max = 48000, + }, + .ops = &msm_fe_Multimedia_dai_ops, + .name = "MultiMedia32", + .probe = fe_dai_probe, + }, + { + .playback = { + .stream_name = "MultiMedia33 Playback", + .aif_name = "MM_DL33", + .rates = (SNDRV_PCM_RATE_8000_384000| + SNDRV_PCM_RATE_KNOT), + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE | + SNDRV_PCM_FMTBIT_S32_LE), + .channels_min = 1, + .channels_max = 32, + .rate_min = 8000, + .rate_max = 384000, + }, + .capture = { + .stream_name = "MultiMedia33 Capture", + .aif_name = "MM_UL33", + .rates = (SNDRV_PCM_RATE_8000_48000| + SNDRV_PCM_RATE_KNOT), + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE | + SNDRV_PCM_FMTBIT_S32_LE), + .channels_min = 1, + .channels_max = 32, + .rate_min = 8000, + .rate_max = 48000, + }, + .ops = &msm_fe_Multimedia_dai_ops, + .name = "MultiMedia33", + .probe = fe_dai_probe, + }, }; static int msm_fe_dai_dev_probe(struct platform_device *pdev) diff --git a/sound/soc/msm/msm8998.c b/sound/soc/msm/msm8998.c index 1c1f65fb3f5c..c1b238e18f9e 100644 --- a/sound/soc/msm/msm8998.c +++ b/sound/soc/msm/msm8998.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-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 @@ -78,6 +78,30 @@ #define MSM_HIFI_ON 1 enum { + PRIMARY_TDM_RX_0, + PRIMARY_TDM_RX_1, + PRIMARY_TDM_RX_2, + PRIMARY_TDM_RX_3, + PRIMARY_TDM_RX_4, + PRIMARY_TDM_RX_5, + PRIMARY_TDM_RX_6, + PRIMARY_TDM_RX_7, + TDM_MAX_RX, +}; + +enum { + PRIMARY_TDM_TX_0, + PRIMARY_TDM_TX_1, + PRIMARY_TDM_TX_2, + PRIMARY_TDM_TX_3, + PRIMARY_TDM_TX_4, + PRIMARY_TDM_TX_5, + PRIMARY_TDM_TX_6, + PRIMARY_TDM_TX_7, + TDM_MAX_TX, +}; + +enum { SLIM_RX_0 = 0, SLIM_RX_1, SLIM_RX_2, @@ -306,18 +330,6 @@ static struct dev_config tdm_tx_cfg[TDM_INTERFACE_MAX][TDM_PORT_MAX] = { } }; -/*TDM default offset currently only supporting TDM_RX_0 and TDM_TX_0 */ -static unsigned int tdm_slot_offset[TDM_PORT_MAX][TDM_SLOT_OFFSET_MAX] = { - {0, 4, 8, 12, 16, 20, 24, 28},/* TX_0 | RX_0 */ - {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_1 | RX_1 */ - {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_2 | RX_2 */ - {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_3 | RX_3 */ - {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_4 | RX_4 */ - {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_5 | RX_5 */ - {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_6 | RX_6 */ - {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_7 | RX_7 */ -}; - /* Default configuration of slimbus channels */ static struct dev_config slim_rx_cfg[] = { [SLIM_RX_0] = {SAMPLING_RATE_48KHZ, SNDRV_PCM_FORMAT_S16_LE, 1}, @@ -3210,18 +3222,45 @@ static const struct snd_kcontrol_new msm_snd_controls[] = { SOC_ENUM_EXT("PRI_TDM_TX_0 SampleRate", tdm_tx_sample_rate, tdm_tx_sample_rate_get, tdm_tx_sample_rate_put), + SOC_ENUM_EXT("PRI_TDM_TX_1 SampleRate", tdm_tx_sample_rate, + tdm_tx_sample_rate_get, + tdm_tx_sample_rate_put), + SOC_ENUM_EXT("PRI_TDM_TX_2 SampleRate", tdm_tx_sample_rate, + tdm_tx_sample_rate_get, + tdm_tx_sample_rate_put), + SOC_ENUM_EXT("PRI_TDM_TX_3 SampleRate", tdm_tx_sample_rate, + tdm_tx_sample_rate_get, + tdm_tx_sample_rate_put), SOC_ENUM_EXT("PRI_TDM_RX_0 Format", tdm_rx_format, tdm_rx_format_get, tdm_rx_format_put), SOC_ENUM_EXT("PRI_TDM_TX_0 Format", tdm_tx_format, tdm_tx_format_get, tdm_tx_format_put), + SOC_ENUM_EXT("PRI_TDM_TX_1 Format", tdm_tx_format, + tdm_tx_format_get, + tdm_tx_format_put), + SOC_ENUM_EXT("PRI_TDM_TX_2 Format", tdm_tx_format, + tdm_tx_format_get, + tdm_tx_format_put), + SOC_ENUM_EXT("PRI_TDM_TX_3 Format", tdm_tx_format, + tdm_tx_format_get, + tdm_tx_format_put), SOC_ENUM_EXT("PRI_TDM_RX_0 Channels", tdm_rx_chs, tdm_rx_ch_get, tdm_rx_ch_put), SOC_ENUM_EXT("PRI_TDM_TX_0 Channels", tdm_tx_chs, tdm_tx_ch_get, tdm_tx_ch_put), + SOC_ENUM_EXT("PRI_TDM_TX_1 Channels", tdm_tx_chs, + tdm_tx_ch_get, + tdm_tx_ch_put), + SOC_ENUM_EXT("PRI_TDM_TX_2 Channels", tdm_tx_chs, + tdm_tx_ch_get, + tdm_tx_ch_put), + SOC_ENUM_EXT("PRI_TDM_TX_3 Channels", tdm_tx_chs, + tdm_tx_ch_get, + tdm_tx_ch_put), SOC_ENUM_EXT("SEC_TDM_RX_0 SampleRate", tdm_rx_sample_rate, tdm_rx_sample_rate_get, tdm_rx_sample_rate_put), @@ -3264,18 +3303,45 @@ static const struct snd_kcontrol_new msm_snd_controls[] = { SOC_ENUM_EXT("QUAT_TDM_TX_0 SampleRate", tdm_tx_sample_rate, tdm_tx_sample_rate_get, tdm_tx_sample_rate_put), + SOC_ENUM_EXT("QUAT_TDM_TX_1 SampleRate", tdm_tx_sample_rate, + tdm_tx_sample_rate_get, + tdm_tx_sample_rate_put), + SOC_ENUM_EXT("QUAT_TDM_TX_2 SampleRate", tdm_tx_sample_rate, + tdm_tx_sample_rate_get, + tdm_tx_sample_rate_put), + SOC_ENUM_EXT("QUAT_TDM_TX_3 SampleRate", tdm_tx_sample_rate, + tdm_tx_sample_rate_get, + tdm_tx_sample_rate_put), SOC_ENUM_EXT("QUAT_TDM_RX_0 Format", tdm_rx_format, tdm_rx_format_get, tdm_rx_format_put), SOC_ENUM_EXT("QUAT_TDM_TX_0 Format", tdm_tx_format, tdm_tx_format_get, tdm_tx_format_put), + SOC_ENUM_EXT("QUAT_TDM_TX_1 Format", tdm_tx_format, + tdm_tx_format_get, + tdm_tx_format_put), + SOC_ENUM_EXT("QUAT_TDM_TX_2 Format", tdm_tx_format, + tdm_tx_format_get, + tdm_tx_format_put), + SOC_ENUM_EXT("QUAT_TDM_TX_3 Format", tdm_tx_format, + tdm_tx_format_get, + tdm_tx_format_put), SOC_ENUM_EXT("QUAT_TDM_RX_0 Channels", tdm_rx_chs, tdm_rx_ch_get, tdm_rx_ch_put), SOC_ENUM_EXT("QUAT_TDM_TX_0 Channels", tdm_tx_chs, tdm_tx_ch_get, tdm_tx_ch_put), + SOC_ENUM_EXT("QUAT_TDM_TX_1 Channels", tdm_tx_chs, + tdm_tx_ch_get, + tdm_tx_ch_put), + SOC_ENUM_EXT("QUAT_TDM_TX_2 Channels", tdm_tx_chs, + tdm_tx_ch_get, + tdm_tx_ch_put), + SOC_ENUM_EXT("QUAT_TDM_TX_3 Channels", tdm_tx_chs, + tdm_tx_ch_get, + tdm_tx_ch_put), SOC_ENUM_EXT("PRI_TDM SlotNumber", tdm_slot_num, tdm_slot_num_get, tdm_slot_num_put), SOC_ENUM_EXT("PRI_TDM SlotWidth", tdm_slot_width, @@ -5663,19 +5729,84 @@ static int msm_tdm_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, return 0; } -static unsigned int tdm_param_set_slot_mask(int slots) +static unsigned int msm8998_tdm_param_set_slot_mask(u16 port_id, int slot_width, + int slots, int tdm_interface) { unsigned int slot_mask = 0; - int i = 0; + int upper, lower, i, j, rx_path = 0; + unsigned int *slot_offset; - if ((slots <= 0) || (slots > 32)) { - pr_err("%s: invalid slot number %d\n", __func__, slots); - return -EINVAL; - } + switch (port_id) { + case AFE_PORT_ID_PRIMARY_TDM_RX: + case AFE_PORT_ID_PRIMARY_TDM_RX_1: + case AFE_PORT_ID_PRIMARY_TDM_RX_2: + case AFE_PORT_ID_PRIMARY_TDM_RX_3: + case AFE_PORT_ID_PRIMARY_TDM_RX_4: + case AFE_PORT_ID_PRIMARY_TDM_RX_5: + case AFE_PORT_ID_PRIMARY_TDM_RX_6: + case AFE_PORT_ID_PRIMARY_TDM_RX_7: + lower = PRIMARY_TDM_RX_0; + upper = PRIMARY_TDM_RX_7; + rx_path = 1; + break; + case AFE_PORT_ID_QUATERNARY_TDM_RX: + case AFE_PORT_ID_QUATERNARY_TDM_RX_1: + case AFE_PORT_ID_QUATERNARY_TDM_RX_2: + case AFE_PORT_ID_QUATERNARY_TDM_RX_3: + case AFE_PORT_ID_QUATERNARY_TDM_RX_4: + case AFE_PORT_ID_QUATERNARY_TDM_RX_5: + case AFE_PORT_ID_QUATERNARY_TDM_RX_6: + case AFE_PORT_ID_QUATERNARY_TDM_RX_7: + lower = PRIMARY_TDM_RX_0; + upper = PRIMARY_TDM_RX_7; + rx_path = 1; + break; - for (i = 0; i < slots ; i++) - slot_mask |= 1 << i; + case AFE_PORT_ID_PRIMARY_TDM_TX: + case AFE_PORT_ID_PRIMARY_TDM_TX_1: + case AFE_PORT_ID_PRIMARY_TDM_TX_2: + case AFE_PORT_ID_PRIMARY_TDM_TX_3: + case AFE_PORT_ID_PRIMARY_TDM_TX_4: + case AFE_PORT_ID_PRIMARY_TDM_TX_5: + case AFE_PORT_ID_PRIMARY_TDM_TX_6: + case AFE_PORT_ID_PRIMARY_TDM_TX_7: + lower = PRIMARY_TDM_TX_0; + upper = PRIMARY_TDM_TX_7; + break; + case AFE_PORT_ID_QUATERNARY_TDM_TX: + case AFE_PORT_ID_QUATERNARY_TDM_TX_1: + case AFE_PORT_ID_QUATERNARY_TDM_TX_2: + case AFE_PORT_ID_QUATERNARY_TDM_TX_3: + case AFE_PORT_ID_QUATERNARY_TDM_TX_4: + case AFE_PORT_ID_QUATERNARY_TDM_TX_5: + case AFE_PORT_ID_QUATERNARY_TDM_TX_6: + case AFE_PORT_ID_QUATERNARY_TDM_TX_7: + lower = PRIMARY_TDM_TX_0; + upper = PRIMARY_TDM_TX_7; + break; + default: + return slot_mask; + } + for (i = lower; i <= upper; i++) { + if (rx_path) + slot_offset = tdm_rx_slot_offset[tdm_interface][i]; + else + slot_offset = tdm_tx_slot_offset[tdm_interface][i]; + + for (j = 0; j < TDM_SLOT_OFFSET_MAX; j++) { + if (slot_offset[j] != AFE_SLOT_MAPPING_OFFSET_INVALID) { + /* + * set the mask of active slot according to + * the offset table for the group of devices + */ + slot_mask |= + (1 << ((slot_offset[j] * 8) / slot_width)); + } else { + break; + } + } + } return slot_mask; } @@ -5685,7 +5816,7 @@ static int msm8998_tdm_snd_hw_params(struct snd_pcm_substream *substream, struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *cpu_dai = rtd->cpu_dai; int ret = 0; - int channels, slot_width, slots, rate, format; + int channels, slot_width, slots, rate, format, tdm_interface; unsigned int slot_mask; unsigned int *slot_offset; int offset_channels = 0; @@ -5720,321 +5851,385 @@ static int msm8998_tdm_snd_hw_params(struct snd_pcm_substream *substream, slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_rx_slot_offset[TDM_PRI][TDM_0]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_RX_1: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_rx_slot_offset[TDM_PRI][TDM_1]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_RX_2: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_rx_slot_offset[TDM_PRI][TDM_2]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_RX_3: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_rx_slot_offset[TDM_PRI][TDM_3]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_RX_4: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_rx_slot_offset[TDM_PRI][TDM_4]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_RX_5: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_rx_slot_offset[TDM_PRI][TDM_5]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_RX_6: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_rx_slot_offset[TDM_PRI][TDM_6]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_RX_7: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_rx_slot_offset[TDM_PRI][TDM_7]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_TX: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_tx_slot_offset[TDM_PRI][TDM_0]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_TX_1: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_tx_slot_offset[TDM_PRI][TDM_1]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_TX_2: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_tx_slot_offset[TDM_PRI][TDM_2]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_TX_3: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_tx_slot_offset[TDM_PRI][TDM_3]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_TX_4: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_tx_slot_offset[TDM_PRI][TDM_4]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_TX_5: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_tx_slot_offset[TDM_PRI][TDM_5]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_TX_6: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_tx_slot_offset[TDM_PRI][TDM_6]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_PRIMARY_TDM_TX_7: slots = tdm_slot[TDM_PRI].num; slot_width = tdm_slot[TDM_PRI].width; slot_offset = tdm_tx_slot_offset[TDM_PRI][TDM_7]; + tdm_interface = TDM_PRI; break; case AFE_PORT_ID_SECONDARY_TDM_RX: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_rx_slot_offset[TDM_SEC][TDM_0]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_RX_1: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_rx_slot_offset[TDM_SEC][TDM_1]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_RX_2: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_rx_slot_offset[TDM_SEC][TDM_2]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_RX_3: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_rx_slot_offset[TDM_SEC][TDM_3]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_RX_4: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_rx_slot_offset[TDM_SEC][TDM_4]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_RX_5: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_rx_slot_offset[TDM_SEC][TDM_5]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_RX_6: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_rx_slot_offset[TDM_SEC][TDM_6]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_RX_7: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_rx_slot_offset[TDM_SEC][TDM_7]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_TX: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_tx_slot_offset[TDM_SEC][TDM_0]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_TX_1: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_tx_slot_offset[TDM_SEC][TDM_1]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_TX_2: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_tx_slot_offset[TDM_SEC][TDM_2]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_TX_3: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_tx_slot_offset[TDM_SEC][TDM_3]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_TX_4: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_tx_slot_offset[TDM_SEC][TDM_4]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_TX_5: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_tx_slot_offset[TDM_SEC][TDM_5]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_TX_6: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_tx_slot_offset[TDM_SEC][TDM_6]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_SECONDARY_TDM_TX_7: slots = tdm_slot[TDM_SEC].num; slot_width = tdm_slot[TDM_SEC].width; slot_offset = tdm_tx_slot_offset[TDM_SEC][TDM_7]; + tdm_interface = TDM_SEC; break; case AFE_PORT_ID_TERTIARY_TDM_RX: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_rx_slot_offset[TDM_TERT][TDM_0]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_RX_1: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_rx_slot_offset[TDM_TERT][TDM_1]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_RX_2: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_rx_slot_offset[TDM_TERT][TDM_2]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_RX_3: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_rx_slot_offset[TDM_TERT][TDM_3]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_RX_4: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_rx_slot_offset[TDM_TERT][TDM_4]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_RX_5: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_rx_slot_offset[TDM_TERT][TDM_5]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_RX_6: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_rx_slot_offset[TDM_TERT][TDM_6]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_RX_7: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_rx_slot_offset[TDM_TERT][TDM_7]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_TX: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_tx_slot_offset[TDM_TERT][TDM_0]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_TX_1: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_tx_slot_offset[TDM_TERT][TDM_1]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_TX_2: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_tx_slot_offset[TDM_TERT][TDM_2]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_TX_3: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_tx_slot_offset[TDM_TERT][TDM_3]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_TX_4: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_tx_slot_offset[TDM_TERT][TDM_4]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_TX_5: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_tx_slot_offset[TDM_TERT][TDM_5]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_TX_6: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_tx_slot_offset[TDM_TERT][TDM_6]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_TERTIARY_TDM_TX_7: slots = tdm_slot[TDM_TERT].num; slot_width = tdm_slot[TDM_TERT].width; slot_offset = tdm_tx_slot_offset[TDM_TERT][TDM_7]; + tdm_interface = TDM_TERT; break; case AFE_PORT_ID_QUATERNARY_TDM_RX: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_rx_slot_offset[TDM_QUAT][TDM_0]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_RX_1: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_rx_slot_offset[TDM_QUAT][TDM_1]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_RX_2: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_rx_slot_offset[TDM_QUAT][TDM_2]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_RX_3: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_rx_slot_offset[TDM_QUAT][TDM_3]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_RX_4: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_rx_slot_offset[TDM_QUAT][TDM_4]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_RX_5: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_rx_slot_offset[TDM_QUAT][TDM_5]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_RX_6: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_rx_slot_offset[TDM_QUAT][TDM_6]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_RX_7: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_rx_slot_offset[TDM_QUAT][TDM_7]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_TX: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_tx_slot_offset[TDM_QUAT][TDM_0]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_TX_1: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_tx_slot_offset[TDM_QUAT][TDM_1]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_TX_2: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_tx_slot_offset[TDM_QUAT][TDM_2]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_TX_3: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_tx_slot_offset[TDM_QUAT][TDM_3]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_TX_4: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_tx_slot_offset[TDM_QUAT][TDM_4]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_TX_5: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_tx_slot_offset[TDM_QUAT][TDM_5]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_TX_6: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_tx_slot_offset[TDM_QUAT][TDM_6]; + tdm_interface = TDM_QUAT; break; case AFE_PORT_ID_QUATERNARY_TDM_TX_7: slots = tdm_slot[TDM_QUAT].num; slot_width = tdm_slot[TDM_QUAT].width; slot_offset = tdm_tx_slot_offset[TDM_QUAT][TDM_7]; + tdm_interface = TDM_QUAT; break; default: pr_err("%s: dai id 0x%x not supported\n", @@ -6061,7 +6256,10 @@ static int msm8998_tdm_snd_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } - slot_mask = tdm_param_set_slot_mask(slots); + slot_mask = msm8998_tdm_param_set_slot_mask(cpu_dai->id, + slot_width, slots, tdm_interface); + pr_debug("%s: slot_mask :%x\n", __func__, slot_mask); + if (!slot_mask) { pr_err("%s: invalid slot_mask 0x%x\n", __func__, slot_mask); @@ -6282,133 +6480,6 @@ static struct snd_soc_ops msm_aux_pcm_be_ops = { .shutdown = msm_aux_pcm_snd_shutdown, }; -static int msm_tdm_snd_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params) -{ - struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct snd_soc_dai *cpu_dai = rtd->cpu_dai; - int ret = 0; - int channels, slot_width, slots; - unsigned int slot_mask; - unsigned int *slot_offset; - int offset_channels = 0; - int i; - - pr_debug("%s: dai id = 0x%x\n", __func__, cpu_dai->id); - - channels = params_channels(params); - switch (channels) { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - switch (params_format(params)) { - case SNDRV_PCM_FORMAT_S32_LE: - case SNDRV_PCM_FORMAT_S24_LE: - case SNDRV_PCM_FORMAT_S16_LE: - /* - * up to 8 channels HW config should - * use 32 bit slot width for max support of - * stream bit width. (slot_width > bit_width) - */ - slot_width = 32; - break; - default: - pr_err("%s: invalid param format 0x%x\n", - __func__, params_format(params)); - return -EINVAL; - } - slots = 8; - slot_mask = tdm_param_set_slot_mask(slots); - if (!slot_mask) { - pr_err("%s: invalid slot_mask 0x%x\n", - __func__, slot_mask); - return -EINVAL; - } - break; - default: - pr_err("%s: invalid param channels %d\n", - __func__, channels); - return -EINVAL; - } - /* currently only supporting TDM_RX_0 and TDM_TX_0 */ - switch (cpu_dai->id) { - case AFE_PORT_ID_PRIMARY_TDM_RX: - case AFE_PORT_ID_SECONDARY_TDM_RX: - case AFE_PORT_ID_TERTIARY_TDM_RX: - case AFE_PORT_ID_QUATERNARY_TDM_RX: - case AFE_PORT_ID_PRIMARY_TDM_TX: - case AFE_PORT_ID_SECONDARY_TDM_TX: - case AFE_PORT_ID_TERTIARY_TDM_TX: - case AFE_PORT_ID_QUATERNARY_TDM_TX: - slot_offset = tdm_slot_offset[TDM_0]; - break; - default: - pr_err("%s: dai id 0x%x not supported\n", - __func__, cpu_dai->id); - return -EINVAL; - } - - for (i = 0; i < TDM_SLOT_OFFSET_MAX; i++) { - if (slot_offset[i] != AFE_SLOT_MAPPING_OFFSET_INVALID) - offset_channels++; - else - break; - } - - if (offset_channels == 0) { - pr_err("%s: slot offset not supported, offset_channels %d\n", - __func__, offset_channels); - return -EINVAL; - } - - if (channels > offset_channels) { - pr_err("%s: channels %d exceed offset_channels %d\n", - __func__, channels, offset_channels); - return -EINVAL; - } - - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0, slot_mask, - slots, slot_width); - if (ret < 0) { - pr_err("%s: failed to set tdm slot, err:%d\n", - __func__, ret); - goto end; - } - - ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL, - channels, slot_offset); - if (ret < 0) { - pr_err("%s: failed to set channel map, err:%d\n", - __func__, ret); - goto end; - } - } else { - ret = snd_soc_dai_set_tdm_slot(cpu_dai, slot_mask, 0, - slots, slot_width); - if (ret < 0) { - pr_err("%s: failed to set tdm slot, err:%d\n", - __func__, ret); - goto end; - } - - ret = snd_soc_dai_set_channel_map(cpu_dai, channels, - slot_offset, 0, NULL); - if (ret < 0) { - pr_err("%s: failed to set channel map, err:%d\n", - __func__, ret); - goto end; - } - } -end: - return ret; -} - static struct snd_soc_ops msm_be_ops = { .hw_params = msm_snd_hw_params, }; @@ -6425,10 +6496,6 @@ static struct snd_soc_ops msm_wcn_ops = { .hw_params = msm_wcn_hw_params, }; -static struct snd_soc_ops msm_tdm_be_ops = { - .hw_params = msm_tdm_snd_hw_params -}; - /* Digital audio interface glue - connects codec <---> CPU */ static struct snd_soc_dai_link msm_common_dai_links[] = { /* FrontEnd DAI Links */ @@ -7282,6 +7349,78 @@ static struct snd_soc_dai_link msm_common_misc_fe_dai_links[] = { }, }; +static struct snd_soc_dai_link msm_ext_common_fe_dai[] = { + /* Extra FrontEnd DAI Links after compress fe*/ + {/* hw:x,66 */ + .name = MSM_DAILINK_NAME(Media30), + .stream_name = "MultiMedia30", + .cpu_dai_name = "MultiMedia30", + .platform_name = "msm-pcm-dsp.0", + .dynamic = 1, + .dpcm_capture = 1, + .dpcm_playback = 1, + .trigger = {SND_SOC_DPCM_TRIGGER_POST, + SND_SOC_DPCM_TRIGGER_POST}, + .codec_dai_name = "snd-soc-dummy-dai", + .codec_name = "snd-soc-dummy", + .ignore_suspend = 1, + .ignore_pmdown_time = 1, + /* this dai link has playback support */ + .be_id = MSM_FRONTEND_DAI_MULTIMEDIA30, + }, + {/* hw:x,67 */ + .name = MSM_DAILINK_NAME(Media31), + .stream_name = "MultiMedia31", + .cpu_dai_name = "MultiMedia31", + .platform_name = "msm-pcm-dsp.0", + .dynamic = 1, + .dpcm_capture = 1, + .dpcm_playback = 1, + .trigger = {SND_SOC_DPCM_TRIGGER_POST, + SND_SOC_DPCM_TRIGGER_POST}, + .codec_dai_name = "snd-soc-dummy-dai", + .codec_name = "snd-soc-dummy", + .ignore_suspend = 1, + .ignore_pmdown_time = 1, + /* this dai link has playback support */ + .be_id = MSM_FRONTEND_DAI_MULTIMEDIA31, + }, + {/* hw:x,68 */ + .name = MSM_DAILINK_NAME(Media32), + .stream_name = "MultiMedia32", + .cpu_dai_name = "MultiMedia32", + .platform_name = "msm-pcm-dsp.0", + .dynamic = 1, + .dpcm_capture = 1, + .dpcm_playback = 1, + .trigger = {SND_SOC_DPCM_TRIGGER_POST, + SND_SOC_DPCM_TRIGGER_POST}, + .codec_dai_name = "snd-soc-dummy-dai", + .codec_name = "snd-soc-dummy", + .ignore_suspend = 1, + .ignore_pmdown_time = 1, + /* this dai link has playback support */ + .be_id = MSM_FRONTEND_DAI_MULTIMEDIA32, + }, + {/* hw:x,69 */ + .name = MSM_DAILINK_NAME(Media33), + .stream_name = "MultiMedia33", + .cpu_dai_name = "MultiMedia33", + .platform_name = "msm-pcm-dsp.0", + .dynamic = 1, + .dpcm_capture = 1, + .dpcm_playback = 1, + .trigger = {SND_SOC_DPCM_TRIGGER_POST, + SND_SOC_DPCM_TRIGGER_POST}, + .codec_dai_name = "snd-soc-dummy-dai", + .codec_name = "snd-soc-dummy", + .ignore_suspend = 1, + .ignore_pmdown_time = 1, + /* this dai link has playback support */ + .be_id = MSM_FRONTEND_DAI_MULTIMEDIA33, + }, +}; + static struct snd_soc_dai_link msm_common_be_dai_links[] = { /* Backend AFE DAI Links */ { @@ -7434,7 +7573,7 @@ static struct snd_soc_dai_link msm_common_be_dai_links[] = { .dpcm_playback = 1, .be_id = MSM_BACKEND_DAI_SEC_TDM_RX_0, .be_hw_params_fixup = msm_be_hw_params_fixup, - .ops = &msm_tdm_be_ops, + .ops = &msm8998_tdm_be_ops, .ignore_suspend = 1, }, { @@ -7448,7 +7587,7 @@ static struct snd_soc_dai_link msm_common_be_dai_links[] = { .dpcm_capture = 1, .be_id = MSM_BACKEND_DAI_SEC_TDM_TX_0, .be_hw_params_fixup = msm_be_hw_params_fixup, - .ops = &msm_tdm_be_ops, + .ops = &msm8998_tdm_be_ops, .ignore_suspend = 1, }, { @@ -7462,7 +7601,7 @@ static struct snd_soc_dai_link msm_common_be_dai_links[] = { .dpcm_playback = 1, .be_id = MSM_BACKEND_DAI_TERT_TDM_RX_0, .be_hw_params_fixup = msm_be_hw_params_fixup, - .ops = &msm_tdm_be_ops, + .ops = &msm8998_tdm_be_ops, .ignore_suspend = 1, }, { @@ -7476,7 +7615,7 @@ static struct snd_soc_dai_link msm_common_be_dai_links[] = { .dpcm_capture = 1, .be_id = MSM_BACKEND_DAI_TERT_TDM_TX_0, .be_hw_params_fixup = msm_be_hw_params_fixup, - .ops = &msm_tdm_be_ops, + .ops = &msm8998_tdm_be_ops, .ignore_suspend = 1, }, { @@ -8201,6 +8340,93 @@ static struct snd_soc_dai_link msm_auxpcm_be_dai_links[] = { }, }; +static struct snd_soc_dai_link msm_ext_tdm_tx_group_be_dai[] = { + { + .name = LPASS_BE_PRI_TDM_TX_1, + .stream_name = "Primary TDM1 Capture", + .cpu_dai_name = "msm-dai-q6-tdm.36867", + .platform_name = "msm-pcm-routing", + .codec_name = "msm-stub-codec.1", + .codec_dai_name = "msm-stub-tx", + .no_pcm = 1, + .dpcm_capture = 1, + .be_id = MSM_BACKEND_DAI_PRI_TDM_TX_1, + .be_hw_params_fixup = msm_tdm_be_hw_params_fixup, + .ops = &msm8998_tdm_be_ops, + .ignore_suspend = 1, + }, + { + .name = LPASS_BE_PRI_TDM_TX_2, + .stream_name = "Primary TDM2 Capture", + .cpu_dai_name = "msm-dai-q6-tdm.36869", + .platform_name = "msm-pcm-routing", + .codec_name = "msm-stub-codec.1", + .codec_dai_name = "msm-stub-tx", + .no_pcm = 1, + .dpcm_capture = 1, + .be_id = MSM_BACKEND_DAI_PRI_TDM_TX_2, + .be_hw_params_fixup = msm_tdm_be_hw_params_fixup, + .ops = &msm8998_tdm_be_ops, + .ignore_suspend = 1, + }, + { + .name = LPASS_BE_PRI_TDM_TX_3, + .stream_name = "Primary TDM3 Capture", + .cpu_dai_name = "msm-dai-q6-tdm.36871", + .platform_name = "msm-pcm-routing", + .codec_name = "msm-stub-codec.1", + .codec_dai_name = "msm-stub-tx", + .no_pcm = 1, + .dpcm_capture = 1, + .be_id = MSM_BACKEND_DAI_PRI_TDM_TX_3, + .be_hw_params_fixup = msm_tdm_be_hw_params_fixup, + .ops = &msm8998_tdm_be_ops, + .ignore_suspend = 1, + }, + { + .name = LPASS_BE_QUAT_TDM_TX_1, + .stream_name = "Quaternary TDM1 Capture", + .cpu_dai_name = "msm-dai-q6-tdm.36915", + .platform_name = "msm-pcm-routing", + .codec_name = "msm-stub-codec.1", + .codec_dai_name = "msm-stub-tx", + .no_pcm = 1, + .dpcm_capture = 1, + .be_id = MSM_BACKEND_DAI_QUAT_TDM_TX_1, + .be_hw_params_fixup = msm_tdm_be_hw_params_fixup, + .ops = &msm8998_tdm_be_ops, + .ignore_suspend = 1, + }, + { + .name = LPASS_BE_QUAT_TDM_TX_2, + .stream_name = "Quaternary TDM2 Capture", + .cpu_dai_name = "msm-dai-q6-tdm.36917", + .platform_name = "msm-pcm-routing", + .codec_name = "msm-stub-codec.1", + .codec_dai_name = "msm-stub-tx", + .no_pcm = 1, + .dpcm_capture = 1, + .be_id = MSM_BACKEND_DAI_QUAT_TDM_TX_2, + .be_hw_params_fixup = msm_tdm_be_hw_params_fixup, + .ops = &msm8998_tdm_be_ops, + .ignore_suspend = 1, + }, + { + .name = LPASS_BE_QUAT_TDM_TX_3, + .stream_name = "Quaternary TDM3 Capture", + .cpu_dai_name = "msm-dai-q6-tdm.36919", + .platform_name = "msm-pcm-routing", + .codec_name = "msm-stub-codec.1", + .codec_dai_name = "msm-stub-tx", + .no_pcm = 1, + .dpcm_capture = 1, + .be_id = MSM_BACKEND_DAI_QUAT_TDM_TX_3, + .be_hw_params_fixup = msm_tdm_be_hw_params_fixup, + .ops = &msm8998_tdm_be_ops, + .ignore_suspend = 1, + }, +}; + static struct snd_soc_dai_link msm_tasha_dai_links[ ARRAY_SIZE(msm_common_dai_links) + ARRAY_SIZE(msm_tasha_fe_dai_links) + @@ -8210,7 +8436,9 @@ static struct snd_soc_dai_link msm_tasha_dai_links[ ARRAY_SIZE(msm_wcn_be_dai_links) + ARRAY_SIZE(ext_disp_be_dai_link) + ARRAY_SIZE(msm_mi2s_be_dai_links) + - ARRAY_SIZE(msm_auxpcm_be_dai_links)]; + ARRAY_SIZE(msm_auxpcm_be_dai_links) + + ARRAY_SIZE(msm_ext_tdm_tx_group_be_dai) + + ARRAY_SIZE(msm_ext_common_fe_dai)]; static struct snd_soc_dai_link msm_tavil_dai_links[ ARRAY_SIZE(msm_common_dai_links) + @@ -8549,7 +8777,7 @@ static struct snd_soc_card *populate_snd_card_dailinks(struct device *dev) { struct snd_soc_card *card = NULL; struct snd_soc_dai_link *dailink; - int len_1, len_2, len_3, len_4; + int len_1, len_2, len_3, len_4, len3_t; int total_links; const struct of_device_id *match; @@ -8565,7 +8793,8 @@ static struct snd_soc_card *populate_snd_card_dailinks(struct device *dev) len_1 = ARRAY_SIZE(msm_common_dai_links); len_2 = len_1 + ARRAY_SIZE(msm_tasha_fe_dai_links); len_3 = len_2 + ARRAY_SIZE(msm_common_misc_fe_dai_links); - len_4 = len_3 + ARRAY_SIZE(msm_common_be_dai_links); + len3_t = len_3 + ARRAY_SIZE(msm_ext_common_fe_dai); + len_4 = len3_t + ARRAY_SIZE(msm_common_be_dai_links); total_links = len_4 + ARRAY_SIZE(msm_tasha_be_dai_links); memcpy(msm_tasha_dai_links, msm_common_dai_links, @@ -8577,6 +8806,9 @@ static struct snd_soc_card *populate_snd_card_dailinks(struct device *dev) msm_common_misc_fe_dai_links, sizeof(msm_common_misc_fe_dai_links)); memcpy(msm_tasha_dai_links + len_3, + msm_ext_common_fe_dai, + sizeof(msm_ext_common_fe_dai)); + memcpy(msm_tasha_dai_links + len3_t, msm_common_be_dai_links, sizeof(msm_common_be_dai_links)); memcpy(msm_tasha_dai_links + len_4, @@ -8615,6 +8847,14 @@ static struct snd_soc_card *populate_snd_card_dailinks(struct device *dev) sizeof(msm_auxpcm_be_dai_links)); total_links += ARRAY_SIZE(msm_auxpcm_be_dai_links); } + if (of_property_read_bool(dev->of_node, + "qcom,tdm-tx-group-enable")) { + dev_dbg(dev, "%s(): TDM Tx group enable\n", __func__); + memcpy(msm_tasha_dai_links + total_links, + msm_ext_tdm_tx_group_be_dai, + sizeof(msm_ext_tdm_tx_group_be_dai)); + total_links += ARRAY_SIZE(msm_ext_tdm_tx_group_be_dai); + } dailink = msm_tasha_dai_links; } else if (!strcmp(match->data, "tavil_codec")) { card = &snd_soc_card_tavil_msm; diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c index ed3ee03553b3..d0fdf190d63d 100644 --- a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.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 @@ -688,6 +688,18 @@ static struct msm_pcm_routing_fdai_data /* MULTIMEDIA29 */ {{0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} }, {0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} } }, + /* MULTIMEDIA30 */ + {{0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} }, + {0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} } }, + /* MULTIMEDIA31 */ + {{0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} }, + {0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} } }, + /* MULTIMEDIA32 */ + {{0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} }, + {0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} } }, + /* MULTIMEDIA33 */ + {{0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} }, + {0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} } }, /* CS_VOICE */ {{0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} }, {0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} } }, @@ -4171,6 +4183,22 @@ static const struct snd_kcontrol_new pri_i2s_rx_mixer_controls[] = { MSM_BACKEND_DAI_PRI_I2S_RX, MSM_FRONTEND_DAI_MULTIMEDIA29, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_I2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_I2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_I2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_I2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new sec_i2s_rx_mixer_controls[] = { @@ -4717,6 +4745,22 @@ static const struct snd_kcontrol_new mi2s_rx_mixer_controls[] = { MSM_BACKEND_DAI_MI2S_RX, MSM_FRONTEND_DAI_MULTIMEDIA29, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new quaternary_mi2s_rx_mixer_controls[] = { @@ -6271,6 +6315,22 @@ static const struct snd_kcontrol_new primary_mi2s_rx_mixer_controls[] = { MSM_BACKEND_DAI_PRI_MI2S_RX, MSM_FRONTEND_DAI_MULTIMEDIA29, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new int0_mi2s_rx_mixer_controls[] = { @@ -7661,6 +7721,22 @@ static const struct snd_kcontrol_new pri_tdm_rx_0_mixer_controls[] = { MSM_BACKEND_DAI_PRI_TDM_RX_0, MSM_FRONTEND_DAI_MULTIMEDIA26, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_0, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_0, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_0, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_0, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new pri_tdm_rx_1_mixer_controls[] = { @@ -7740,6 +7816,22 @@ static const struct snd_kcontrol_new pri_tdm_rx_1_mixer_controls[] = { MSM_BACKEND_DAI_PRI_TDM_RX_1, MSM_FRONTEND_DAI_MULTIMEDIA26, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_1, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_1, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_1, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_1, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new pri_tdm_rx_2_mixer_controls[] = { @@ -7819,6 +7911,22 @@ static const struct snd_kcontrol_new pri_tdm_rx_2_mixer_controls[] = { MSM_BACKEND_DAI_PRI_TDM_RX_2, MSM_FRONTEND_DAI_MULTIMEDIA26, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_2, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_2, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_2, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_2, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new pri_tdm_rx_3_mixer_controls[] = { @@ -7898,6 +8006,22 @@ static const struct snd_kcontrol_new pri_tdm_rx_3_mixer_controls[] = { MSM_BACKEND_DAI_PRI_TDM_RX_3, MSM_FRONTEND_DAI_MULTIMEDIA26, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_3, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_3, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_3, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_3, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new pri_tdm_tx_0_mixer_controls[] = { @@ -7965,6 +8089,274 @@ static const struct snd_kcontrol_new pri_tdm_tx_0_mixer_controls[] = { MSM_BACKEND_DAI_PRI_TDM_TX_0, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), +}; + +static const struct snd_kcontrol_new pri_tdm_tx_1_mixer_controls[] = { + SOC_DOUBLE_EXT("MultiMedia1", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia2", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia3", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia4", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia5", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia6", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia7", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia8", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia9", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia10", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA10, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia11", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA11, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia12", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA12, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia13", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA13, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia14", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA14, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia15", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA15, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia16", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + +}; + +static const struct snd_kcontrol_new pri_tdm_tx_2_mixer_controls[] = { + SOC_DOUBLE_EXT("MultiMedia1", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia2", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia3", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia4", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia5", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia6", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia7", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia8", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia9", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia10", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA10, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia11", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA11, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia12", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA12, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia13", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA13, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia14", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA14, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia15", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA15, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia16", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + +}; + +static const struct snd_kcontrol_new pri_tdm_tx_3_mixer_controls[] = { + SOC_DOUBLE_EXT("MultiMedia1", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia2", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia3", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia4", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia5", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia6", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia7", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia8", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia9", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia10", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA10, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia11", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA11, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia12", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA12, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia13", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA13, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia14", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA14, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia15", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA15, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia16", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + }; static const struct snd_kcontrol_new sec_tdm_rx_0_mixer_controls[] = { @@ -8044,6 +8436,22 @@ static const struct snd_kcontrol_new sec_tdm_rx_0_mixer_controls[] = { MSM_BACKEND_DAI_SEC_TDM_RX_0, MSM_FRONTEND_DAI_MULTIMEDIA26, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_0, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_0, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_0, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_0, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new sec_tdm_rx_1_mixer_controls[] = { @@ -8123,6 +8531,22 @@ static const struct snd_kcontrol_new sec_tdm_rx_1_mixer_controls[] = { MSM_BACKEND_DAI_SEC_TDM_RX_1, MSM_FRONTEND_DAI_MULTIMEDIA26, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_1, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_1, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_1, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_1, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new sec_tdm_rx_2_mixer_controls[] = { @@ -8202,6 +8626,22 @@ static const struct snd_kcontrol_new sec_tdm_rx_2_mixer_controls[] = { MSM_BACKEND_DAI_SEC_TDM_RX_2, MSM_FRONTEND_DAI_MULTIMEDIA26, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_2, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_2, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_2, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_2, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new sec_tdm_rx_3_mixer_controls[] = { @@ -8281,6 +8721,22 @@ static const struct snd_kcontrol_new sec_tdm_rx_3_mixer_controls[] = { MSM_BACKEND_DAI_SEC_TDM_RX_3, MSM_FRONTEND_DAI_MULTIMEDIA26, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_3, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_3, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_3, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_RX_3, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new sec_tdm_tx_0_mixer_controls[] = { @@ -8348,6 +8804,22 @@ static const struct snd_kcontrol_new sec_tdm_tx_0_mixer_controls[] = { MSM_BACKEND_DAI_SEC_TDM_TX_0, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new tert_tdm_rx_0_mixer_controls[] = { @@ -8427,6 +8899,22 @@ static const struct snd_kcontrol_new tert_tdm_rx_0_mixer_controls[] = { MSM_BACKEND_DAI_TERT_TDM_RX_0, MSM_FRONTEND_DAI_MULTIMEDIA26, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_RX_0, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_RX_0, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_RX_0, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_RX_0, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new tert_tdm_tx_0_mixer_controls[] = { @@ -8494,6 +8982,272 @@ static const struct snd_kcontrol_new tert_tdm_tx_0_mixer_controls[] = { MSM_BACKEND_DAI_TERT_TDM_TX_0, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), +}; + + +static const struct snd_kcontrol_new tert_tdm_tx_1_mixer_controls[] = { + SOC_DOUBLE_EXT("MultiMedia1", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia2", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia3", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia4", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia5", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia6", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia7", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia8", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia9", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia10", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA10, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia11", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA11, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia12", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA12, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia13", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA13, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia14", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA14, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia15", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA15, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia16", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), +}; + +static const struct snd_kcontrol_new tert_tdm_tx_2_mixer_controls[] = { + SOC_DOUBLE_EXT("MultiMedia1", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia2", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia3", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia4", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia5", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia6", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia7", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia8", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia9", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia10", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA10, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia11", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA11, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia12", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA12, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia13", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA13, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia14", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA14, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia15", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA15, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia16", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), +}; + +static const struct snd_kcontrol_new tert_tdm_tx_3_mixer_controls[] = { + SOC_DOUBLE_EXT("MultiMedia1", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia2", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia3", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia4", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia5", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia6", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia7", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia8", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia9", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia10", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA10, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia11", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA11, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia12", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA12, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia13", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA13, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia14", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA14, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia15", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA15, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia16", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia30", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia31", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia32", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("MultiMedia33", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new tert_tdm_rx_1_mixer_controls[] = { @@ -10504,6 +11258,22 @@ static const struct snd_kcontrol_new mmul9_mixer_controls[] = { MSM_BACKEND_DAI_SLIMBUS_6_TX, MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), SOC_DOUBLE_EXT("TERT_TDM_TX_0", SND_SOC_NOPM, MSM_BACKEND_DAI_TERT_TDM_TX_0, MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer, @@ -11010,6 +11780,210 @@ static const struct snd_kcontrol_new mmul29_mixer_controls[] = { msm_routing_put_audio_mixer), }; +static const struct snd_kcontrol_new mmul30_mixer_controls[] = { + SOC_DOUBLE_EXT("PRI_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA30, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), +}; + +static const struct snd_kcontrol_new mmul31_mixer_controls[] = { + SOC_DOUBLE_EXT("PRI_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA31, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), +}; + +static const struct snd_kcontrol_new mmul32_mixer_controls[] = { + SOC_DOUBLE_EXT("PRI_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA32, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), +}; + +static const struct snd_kcontrol_new mmul33_mixer_controls[] = { + SOC_DOUBLE_EXT("PRI_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("PRI_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("SEC_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_SEC_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_0, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_1, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_2, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_TERT_TDM_TX_3, + MSM_FRONTEND_DAI_MULTIMEDIA33, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), +}; + static const struct snd_kcontrol_new pri_rx_voice_mixer_controls[] = { SOC_DOUBLE_EXT("CSVoice", SND_SOC_NOPM, MSM_BACKEND_DAI_PRI_I2S_RX, @@ -13233,6 +14207,26 @@ static const struct snd_kcontrol_new pri_tdm_rx_0_port_mixer_controls[] = { MSM_BACKEND_DAI_PRI_TDM_TX_3, 1, 0, msm_routing_get_port_mixer, msm_routing_put_port_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_0", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_0, + MSM_BACKEND_DAI_TERT_TDM_TX_0, 1, 0, + msm_routing_get_port_mixer, + msm_routing_put_port_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_1", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_0, + MSM_BACKEND_DAI_TERT_TDM_TX_1, 1, 0, + msm_routing_get_port_mixer, + msm_routing_put_port_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_2", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_0, + MSM_BACKEND_DAI_TERT_TDM_TX_2, 1, 0, + msm_routing_get_port_mixer, + msm_routing_put_port_mixer), + SOC_DOUBLE_EXT("TERT_TDM_TX_3", SND_SOC_NOPM, + MSM_BACKEND_DAI_PRI_TDM_RX_0, + MSM_BACKEND_DAI_TERT_TDM_TX_3, 1, 0, + msm_routing_get_port_mixer, + msm_routing_put_port_mixer), SOC_DOUBLE_EXT("QUAT_TDM_TX_0", SND_SOC_NOPM, MSM_BACKEND_DAI_PRI_TDM_RX_0, MSM_BACKEND_DAI_QUAT_TDM_TX_0, 1, 0, @@ -15987,6 +16981,10 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = { SND_SOC_DAPM_AIF_IN("MM_DL24", "MultiMedia24 Playback", 0, 0, 0, 0), SND_SOC_DAPM_AIF_IN("MM_DL25", "MultiMedia25 Playback", 0, 0, 0, 0), SND_SOC_DAPM_AIF_IN("MM_DL26", "MultiMedia26 Playback", 0, 0, 0, 0), + SND_SOC_DAPM_AIF_IN("MM_DL30", "MultiMedia30 Playback", 0, 0, 0, 0), + SND_SOC_DAPM_AIF_IN("MM_DL31", "MultiMedia31 Playback", 0, 0, 0, 0), + SND_SOC_DAPM_AIF_IN("MM_DL32", "MultiMedia32 Playback", 0, 0, 0, 0), + SND_SOC_DAPM_AIF_IN("MM_DL33", "MultiMedia33 Playback", 0, 0, 0, 0), SND_SOC_DAPM_AIF_IN("VOIP_DL", "VoIP Playback", 0, 0, 0, 0), SND_SOC_DAPM_AIF_OUT("MM_UL1", "MultiMedia1 Capture", 0, 0, 0, 0), SND_SOC_DAPM_AIF_OUT("MM_UL2", "MultiMedia2 Capture", 0, 0, 0, 0), @@ -16003,6 +17001,10 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = { SND_SOC_DAPM_AIF_OUT("MM_UL20", "MultiMedia20 Capture", 0, 0, 0, 0), SND_SOC_DAPM_AIF_OUT("MM_UL21", "MultiMedia21 Capture", 0, 0, 0, 0), SND_SOC_DAPM_AIF_OUT("MM_UL27", "MultiMedia27 Capture", 0, 0, 0, 0), + SND_SOC_DAPM_AIF_OUT("MM_UL30", "MultiMedia30 Capture", 0, 0, 0, 0), + SND_SOC_DAPM_AIF_OUT("MM_UL31", "MultiMedia31 Capture", 0, 0, 0, 0), + SND_SOC_DAPM_AIF_OUT("MM_UL32", "MultiMedia32 Capture", 0, 0, 0, 0), + SND_SOC_DAPM_AIF_OUT("MM_UL33", "MultiMedia33 Capture", 0, 0, 0, 0), SND_SOC_DAPM_AIF_IN("CS-VOICE_DL1", "CS-VOICE Playback", 0, 0, 0, 0), SND_SOC_DAPM_AIF_OUT("CS-VOICE_UL1", "CS-VOICE Capture", 0, 0, 0, 0), SND_SOC_DAPM_AIF_IN("VOICE2_DL", "Voice2 Playback", 0, 0, 0, 0), @@ -16767,6 +17769,15 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = { SND_SOC_DAPM_MIXER("PRI_TDM_TX_0 Audio Mixer", SND_SOC_NOPM, 0, 0, pri_tdm_tx_0_mixer_controls, ARRAY_SIZE(pri_tdm_tx_0_mixer_controls)), + SND_SOC_DAPM_MIXER("PRI_TDM_TX_1 Audio Mixer", SND_SOC_NOPM, 0, 0, + pri_tdm_tx_1_mixer_controls, + ARRAY_SIZE(pri_tdm_tx_1_mixer_controls)), + SND_SOC_DAPM_MIXER("PRI_TDM_TX_2 Audio Mixer", SND_SOC_NOPM, 0, 0, + pri_tdm_tx_2_mixer_controls, + ARRAY_SIZE(pri_tdm_tx_2_mixer_controls)), + SND_SOC_DAPM_MIXER("PRI_TDM_TX_3 Audio Mixer", SND_SOC_NOPM, 0, 0, + pri_tdm_tx_3_mixer_controls, + ARRAY_SIZE(pri_tdm_tx_3_mixer_controls)), SND_SOC_DAPM_MIXER("SEC_TDM_RX_0 Audio Mixer", SND_SOC_NOPM, 0, 0, sec_tdm_rx_0_mixer_controls, ARRAY_SIZE(sec_tdm_rx_0_mixer_controls)), @@ -16788,6 +17799,15 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = { SND_SOC_DAPM_MIXER("TERT_TDM_TX_0 Audio Mixer", SND_SOC_NOPM, 0, 0, tert_tdm_tx_0_mixer_controls, ARRAY_SIZE(tert_tdm_tx_0_mixer_controls)), + SND_SOC_DAPM_MIXER("TERT_TDM_TX_1 Audio Mixer", SND_SOC_NOPM, 0, 0, + tert_tdm_tx_1_mixer_controls, + ARRAY_SIZE(tert_tdm_tx_1_mixer_controls)), + SND_SOC_DAPM_MIXER("TERT_TDM_TX_2 Audio Mixer", SND_SOC_NOPM, 0, 0, + tert_tdm_tx_2_mixer_controls, + ARRAY_SIZE(tert_tdm_tx_2_mixer_controls)), + SND_SOC_DAPM_MIXER("TERT_TDM_TX_3 Audio Mixer", SND_SOC_NOPM, 0, 0, + tert_tdm_tx_3_mixer_controls, + ARRAY_SIZE(tert_tdm_tx_3_mixer_controls)), SND_SOC_DAPM_MIXER("TERT_TDM_RX_1 Audio Mixer", SND_SOC_NOPM, 0, 0, tert_tdm_rx_1_mixer_controls, ARRAY_SIZE(tert_tdm_rx_1_mixer_controls)), @@ -16849,6 +17869,14 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = { mmul28_mixer_controls, ARRAY_SIZE(mmul28_mixer_controls)), SND_SOC_DAPM_MIXER("MultiMedia29 Mixer", SND_SOC_NOPM, 0, 0, mmul29_mixer_controls, ARRAY_SIZE(mmul29_mixer_controls)), + SND_SOC_DAPM_MIXER("MultiMedia30 Mixer", SND_SOC_NOPM, 0, 0, + mmul30_mixer_controls, ARRAY_SIZE(mmul30_mixer_controls)), + SND_SOC_DAPM_MIXER("MultiMedia31 Mixer", SND_SOC_NOPM, 0, 0, + mmul31_mixer_controls, ARRAY_SIZE(mmul31_mixer_controls)), + SND_SOC_DAPM_MIXER("MultiMedia32 Mixer", SND_SOC_NOPM, 0, 0, + mmul32_mixer_controls, ARRAY_SIZE(mmul32_mixer_controls)), + SND_SOC_DAPM_MIXER("MultiMedia33 Mixer", SND_SOC_NOPM, 0, 0, + mmul33_mixer_controls, ARRAY_SIZE(mmul33_mixer_controls)), SND_SOC_DAPM_MIXER("AUX_PCM_RX Audio Mixer", SND_SOC_NOPM, 0, 0, auxpcm_rx_mixer_controls, ARRAY_SIZE(auxpcm_rx_mixer_controls)), SND_SOC_DAPM_MIXER("SEC_AUX_PCM_RX Audio Mixer", SND_SOC_NOPM, 0, 0, @@ -17199,6 +18227,10 @@ static const struct snd_soc_dapm_route intercon[] = { {"PRI_RX Audio Mixer", "MultiMedia15", "MM_DL15"}, {"PRI_RX Audio Mixer", "MultiMedia16", "MM_DL16"}, {"PRI_RX Audio Mixer", "MultiMedia26", "MM_DL26"}, + {"PRI_RX Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"PRI_RX Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"PRI_RX Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"PRI_RX Audio Mixer", "MultiMedia33", "MM_DL33"}, {"PRI_I2S_RX", NULL, "PRI_RX Audio Mixer"}, {"SEC_RX Audio Mixer", "MultiMedia1", "MM_DL1"}, @@ -17488,6 +18520,10 @@ static const struct snd_soc_dapm_route intercon[] = { {"MI2S_RX Audio Mixer", "MultiMedia15", "MM_DL15"}, {"MI2S_RX Audio Mixer", "MultiMedia16", "MM_DL16"}, {"MI2S_RX Audio Mixer", "MultiMedia26", "MM_DL26"}, + {"MI2S_RX Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"MI2S_RX Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"MI2S_RX Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"MI2S_RX Audio Mixer", "MultiMedia33", "MM_DL33"}, {"MI2S_RX", NULL, "MI2S_RX Audio Mixer"}, {"QUAT_MI2S_RX Audio Mixer", "MultiMedia1", "MM_DL1"}, @@ -17567,6 +18603,10 @@ static const struct snd_soc_dapm_route intercon[] = { {"PRI_MI2S_RX Audio Mixer", "MultiMedia15", "MM_DL15"}, {"PRI_MI2S_RX Audio Mixer", "MultiMedia16", "MM_DL16"}, {"PRI_MI2S_RX Audio Mixer", "MultiMedia26", "MM_DL26"}, + {"PRI_MI2S_RX Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"PRI_MI2S_RX Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"PRI_MI2S_RX Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"PRI_MI2S_RX Audio Mixer", "MultiMedia33", "MM_DL33"}, {"PRI_MI2S_RX", NULL, "PRI_MI2S_RX Audio Mixer"}, {"INT0_MI2S_RX Audio Mixer", "MultiMedia1", "MM_DL1"}, @@ -17644,6 +18684,10 @@ static const struct snd_soc_dapm_route intercon[] = { {"PRI_TDM_RX_0 Audio Mixer", "MultiMedia21", "MM_DL21"}, {"PRI_TDM_RX_0 Audio Mixer", "MultiMedia22", "MM_DL22"}, {"PRI_TDM_RX_0 Audio Mixer", "MultiMedia26", "MM_DL26"}, + {"PRI_TDM_RX_0 Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"PRI_TDM_RX_0 Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"PRI_TDM_RX_0 Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"PRI_TDM_RX_0 Audio Mixer", "MultiMedia33", "MM_DL33"}, {"PRI_TDM_RX_0", NULL, "PRI_TDM_RX_0 Audio Mixer"}, {"PRI_TDM_RX_1 Audio Mixer", "MultiMedia1", "MM_DL1"}, @@ -17665,6 +18709,10 @@ static const struct snd_soc_dapm_route intercon[] = { {"PRI_TDM_RX_1 Audio Mixer", "MultiMedia21", "MM_DL21"}, {"PRI_TDM_RX_1 Audio Mixer", "MultiMedia22", "MM_DL22"}, {"PRI_TDM_RX_1 Audio Mixer", "MultiMedia26", "MM_DL26"}, + {"PRI_TDM_RX_1 Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"PRI_TDM_RX_1 Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"PRI_TDM_RX_1 Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"PRI_TDM_RX_1 Audio Mixer", "MultiMedia33", "MM_DL33"}, {"PRI_TDM_RX_1", NULL, "PRI_TDM_RX_1 Audio Mixer"}, {"PRI_TDM_RX_2 Audio Mixer", "MultiMedia1", "MM_DL1"}, @@ -17686,6 +18734,10 @@ static const struct snd_soc_dapm_route intercon[] = { {"PRI_TDM_RX_2 Audio Mixer", "MultiMedia21", "MM_DL21"}, {"PRI_TDM_RX_2 Audio Mixer", "MultiMedia22", "MM_DL22"}, {"PRI_TDM_RX_2 Audio Mixer", "MultiMedia26", "MM_DL26"}, + {"PRI_TDM_RX_2 Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"PRI_TDM_RX_2 Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"PRI_TDM_RX_2 Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"PRI_TDM_RX_2 Audio Mixer", "MultiMedia33", "MM_DL33"}, {"PRI_TDM_RX_2", NULL, "PRI_TDM_RX_2 Audio Mixer"}, {"PRI_TDM_RX_3 Audio Mixer", "MultiMedia1", "MM_DL1"}, @@ -17707,6 +18759,10 @@ static const struct snd_soc_dapm_route intercon[] = { {"PRI_TDM_RX_3 Audio Mixer", "MultiMedia21", "MM_DL21"}, {"PRI_TDM_RX_3 Audio Mixer", "MultiMedia22", "MM_DL22"}, {"PRI_TDM_RX_3 Audio Mixer", "MultiMedia26", "MM_DL26"}, + {"PRI_TDM_RX_3 Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"PRI_TDM_RX_3 Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"PRI_TDM_RX_3 Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"PRI_TDM_RX_3 Audio Mixer", "MultiMedia33", "MM_DL33"}, {"PRI_TDM_RX_3", NULL, "PRI_TDM_RX_3 Audio Mixer"}, {"PRI_TDM_TX_0 Audio Mixer", "MultiMedia1", "MM_DL1"}, @@ -17725,8 +18781,78 @@ static const struct snd_soc_dapm_route intercon[] = { {"PRI_TDM_TX_0 Audio Mixer", "MultiMedia14", "MM_DL14"}, {"PRI_TDM_TX_0 Audio Mixer", "MultiMedia15", "MM_DL15"}, {"PRI_TDM_TX_0 Audio Mixer", "MultiMedia16", "MM_DL16"}, + {"PRI_TDM_TX_0 Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"PRI_TDM_TX_0 Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"PRI_TDM_TX_0 Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"PRI_TDM_TX_0 Audio Mixer", "MultiMedia33", "MM_DL33"}, {"PRI_TDM_TX_0", NULL, "PRI_TDM_TX_0 Audio Mixer"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia1", "MM_DL1"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia2", "MM_DL2"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia3", "MM_DL3"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia4", "MM_DL4"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia5", "MM_DL5"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia6", "MM_DL6"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia7", "MM_DL7"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia8", "MM_DL8"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia9", "MM_DL9"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia10", "MM_DL10"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia11", "MM_DL11"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia12", "MM_DL12"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia13", "MM_DL13"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia14", "MM_DL14"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia15", "MM_DL15"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia16", "MM_DL16"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"PRI_TDM_TX_1 Audio Mixer", "MultiMedia33", "MM_DL33"}, + {"PRI_TDM_TX_1", NULL, "PRI_TDM_TX_1 Audio Mixer"}, + + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia1", "MM_DL1"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia2", "MM_DL2"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia3", "MM_DL3"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia4", "MM_DL4"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia5", "MM_DL5"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia6", "MM_DL6"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia7", "MM_DL7"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia8", "MM_DL8"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia9", "MM_DL9"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia10", "MM_DL10"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia11", "MM_DL11"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia12", "MM_DL12"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia13", "MM_DL13"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia14", "MM_DL14"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia15", "MM_DL15"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia16", "MM_DL16"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"PRI_TDM_TX_2 Audio Mixer", "MultiMedia33", "MM_DL33"}, + {"PRI_TDM_TX_2", NULL, "PRI_TDM_TX_2 Audio Mixer"}, + + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia1", "MM_DL1"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia2", "MM_DL2"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia3", "MM_DL3"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia4", "MM_DL4"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia5", "MM_DL5"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia6", "MM_DL6"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia7", "MM_DL7"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia8", "MM_DL8"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia9", "MM_DL9"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia10", "MM_DL10"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia11", "MM_DL11"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia12", "MM_DL12"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia13", "MM_DL13"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia14", "MM_DL14"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia15", "MM_DL15"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia16", "MM_DL16"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"PRI_TDM_TX_3 Audio Mixer", "MultiMedia33", "MM_DL33"}, + {"PRI_TDM_TX_3", NULL, "PRI_TDM_TX_3 Audio Mixer"}, + {"SEC_TDM_RX_0 Audio Mixer", "MultiMedia1", "MM_DL1"}, {"SEC_TDM_RX_0 Audio Mixer", "MultiMedia2", "MM_DL2"}, {"SEC_TDM_RX_0 Audio Mixer", "MultiMedia3", "MM_DL3"}, @@ -17848,6 +18974,10 @@ static const struct snd_soc_dapm_route intercon[] = { {"TERT_TDM_RX_0 Audio Mixer", "MultiMedia21", "MM_DL21"}, {"TERT_TDM_RX_0 Audio Mixer", "MultiMedia22", "MM_DL22"}, {"TERT_TDM_RX_0 Audio Mixer", "MultiMedia26", "MM_DL26"}, + {"TERT_TDM_RX_0 Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"TERT_TDM_RX_0 Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"TERT_TDM_RX_0 Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"TERT_TDM_RX_0 Audio Mixer", "MultiMedia33", "MM_DL33"}, {"TERT_TDM_RX_0", NULL, "TERT_TDM_RX_0 Audio Mixer"}, {"TERT_TDM_TX_0 Audio Mixer", "MultiMedia1", "MM_DL1"}, @@ -17866,8 +18996,79 @@ static const struct snd_soc_dapm_route intercon[] = { {"TERT_TDM_TX_0 Audio Mixer", "MultiMedia14", "MM_DL14"}, {"TERT_TDM_TX_0 Audio Mixer", "MultiMedia15", "MM_DL15"}, {"TERT_TDM_TX_0 Audio Mixer", "MultiMedia16", "MM_DL16"}, + {"TERT_TDM_TX_0 Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"TERT_TDM_TX_0 Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"TERT_TDM_TX_0 Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"TERT_TDM_TX_0 Audio Mixer", "MultiMedia33", "MM_DL33"}, {"TERT_TDM_TX_0", NULL, "TERT_TDM_TX_0 Audio Mixer"}, + + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia1", "MM_DL1"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia2", "MM_DL2"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia3", "MM_DL3"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia4", "MM_DL4"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia5", "MM_DL5"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia6", "MM_DL6"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia7", "MM_DL7"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia8", "MM_DL8"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia9", "MM_DL9"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia10", "MM_DL10"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia11", "MM_DL11"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia12", "MM_DL12"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia13", "MM_DL13"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia14", "MM_DL14"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia15", "MM_DL15"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia16", "MM_DL16"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"TERT_TDM_TX_1 Audio Mixer", "MultiMedia33", "MM_DL33"}, + {"TERT_TDM_TX_1", NULL, "TERT_TDM_TX_1 Audio Mixer"}, + + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia1", "MM_DL1"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia2", "MM_DL2"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia3", "MM_DL3"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia4", "MM_DL4"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia5", "MM_DL5"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia6", "MM_DL6"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia7", "MM_DL7"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia8", "MM_DL8"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia9", "MM_DL9"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia10", "MM_DL10"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia11", "MM_DL11"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia12", "MM_DL12"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia13", "MM_DL13"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia14", "MM_DL14"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia15", "MM_DL15"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia16", "MM_DL16"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"TERT_TDM_TX_2 Audio Mixer", "MultiMedia33", "MM_DL33"}, + {"TERT_TDM_TX_2", NULL, "TERT_TDM_TX_2 Audio Mixer"}, + + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia1", "MM_DL1"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia2", "MM_DL2"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia3", "MM_DL3"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia4", "MM_DL4"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia5", "MM_DL5"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia6", "MM_DL6"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia7", "MM_DL7"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia8", "MM_DL8"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia9", "MM_DL9"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia10", "MM_DL10"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia11", "MM_DL11"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia12", "MM_DL12"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia13", "MM_DL13"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia14", "MM_DL14"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia15", "MM_DL15"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia16", "MM_DL16"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia30", "MM_DL30"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia31", "MM_DL31"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia32", "MM_DL32"}, + {"TERT_TDM_TX_3 Audio Mixer", "MultiMedia33", "MM_DL33"}, + {"TERT_TDM_TX_3", NULL, "TERT_TDM_TX_3 Audio Mixer"}, + {"TERT_TDM_RX_1 Audio Mixer", "MultiMedia1", "MM_DL1"}, {"TERT_TDM_RX_1 Audio Mixer", "MultiMedia2", "MM_DL2"}, {"TERT_TDM_RX_1 Audio Mixer", "MultiMedia3", "MM_DL3"}, @@ -18508,6 +19709,10 @@ static const struct snd_soc_dapm_route intercon[] = { {"MultiMedia8 Mixer", "QUAT_TDM_TX_2", "QUAT_TDM_TX_2"}, {"MultiMedia8 Mixer", "QUAT_TDM_TX_3", "QUAT_TDM_TX_3"}, + {"MultiMedia9 Mixer", "PRI_TDM_TX_0", "PRI_TDM_TX_0"}, + {"MultiMedia9 Mixer", "PRI_TDM_TX_1", "PRI_TDM_TX_1"}, + {"MultiMedia9 Mixer", "PRI_TDM_TX_2", "PRI_TDM_TX_2"}, + {"MultiMedia9 Mixer", "PRI_TDM_TX_3", "PRI_TDM_TX_3"}, {"MultiMedia9 Mixer", "TERT_TDM_TX_0", "TERT_TDM_TX_0"}, {"MultiMedia9 Mixer", "TERT_TDM_TX_1", "TERT_TDM_TX_1"}, {"MultiMedia9 Mixer", "TERT_TDM_TX_2", "TERT_TDM_TX_2"}, @@ -18606,6 +19811,66 @@ static const struct snd_soc_dapm_route intercon[] = { {"MultiMedia16 Mixer", "QUAT_TDM_TX_3", "QUAT_TDM_TX_3"}, {"MultiMedia16 Mixer", "USB_AUDIO_TX", "USB_AUDIO_TX"}, + {"MultiMedia30 Mixer", "PRI_TDM_TX_0", "PRI_TDM_TX_0"}, + {"MultiMedia30 Mixer", "PRI_TDM_TX_1", "PRI_TDM_TX_1"}, + {"MultiMedia30 Mixer", "PRI_TDM_TX_2", "PRI_TDM_TX_2"}, + {"MultiMedia30 Mixer", "PRI_TDM_TX_3", "PRI_TDM_TX_3"}, + + {"MultiMedia31 Mixer", "PRI_TDM_TX_0", "PRI_TDM_TX_0"}, + {"MultiMedia31 Mixer", "PRI_TDM_TX_1", "PRI_TDM_TX_1"}, + {"MultiMedia31 Mixer", "PRI_TDM_TX_2", "PRI_TDM_TX_2"}, + {"MultiMedia31 Mixer", "PRI_TDM_TX_3", "PRI_TDM_TX_3"}, + + {"MultiMedia32 Mixer", "PRI_TDM_TX_0", "PRI_TDM_TX_0"}, + {"MultiMedia32 Mixer", "PRI_TDM_TX_1", "PRI_TDM_TX_1"}, + {"MultiMedia32 Mixer", "PRI_TDM_TX_2", "PRI_TDM_TX_2"}, + {"MultiMedia32 Mixer", "PRI_TDM_TX_3", "PRI_TDM_TX_3"}, + + {"MultiMedia33 Mixer", "PRI_TDM_TX_0", "PRI_TDM_TX_0"}, + {"MultiMedia33 Mixer", "PRI_TDM_TX_1", "PRI_TDM_TX_1"}, + {"MultiMedia33 Mixer", "PRI_TDM_TX_2", "PRI_TDM_TX_2"}, + {"MultiMedia33 Mixer", "PRI_TDM_TX_3", "PRI_TDM_TX_3"}, + + {"MultiMedia30 Mixer", "SEC_TDM_TX_0", "SEC_TDM_TX_0"}, + {"MultiMedia30 Mixer", "SEC_TDM_TX_1", "SEC_TDM_TX_1"}, + {"MultiMedia30 Mixer", "SEC_TDM_TX_2", "SEC_TDM_TX_2"}, + {"MultiMedia30 Mixer", "SEC_TDM_TX_3", "SEC_TDM_TX_3"}, + + {"MultiMedia31 Mixer", "SEC_TDM_TX_0", "SEC_TDM_TX_0"}, + {"MultiMedia31 Mixer", "SEC_TDM_TX_1", "SEC_TDM_TX_1"}, + {"MultiMedia31 Mixer", "SEC_TDM_TX_2", "SEC_TDM_TX_2"}, + {"MultiMedia31 Mixer", "SEC_TDM_TX_3", "SEC_TDM_TX_3"}, + + {"MultiMedia32 Mixer", "SEC_TDM_TX_0", "SEC_TDM_TX_0"}, + {"MultiMedia32 Mixer", "SEC_TDM_TX_1", "SEC_TDM_TX_1"}, + {"MultiMedia32 Mixer", "SEC_TDM_TX_2", "SEC_TDM_TX_2"}, + {"MultiMedia32 Mixer", "SEC_TDM_TX_3", "SEC_TDM_TX_3"}, + + {"MultiMedia33 Mixer", "SEC_TDM_TX_0", "SEC_TDM_TX_0"}, + {"MultiMedia33 Mixer", "SEC_TDM_TX_1", "SEC_TDM_TX_1"}, + {"MultiMedia33 Mixer", "SEC_TDM_TX_2", "SEC_TDM_TX_2"}, + {"MultiMedia33 Mixer", "SEC_TDM_TX_3", "SEC_TDM_TX_3"}, + + {"MultiMedia30 Mixer", "TERT_TDM_TX_0", "TERT_TDM_TX_0"}, + {"MultiMedia30 Mixer", "TERT_TDM_TX_1", "TERT_TDM_TX_1"}, + {"MultiMedia30 Mixer", "TERT_TDM_TX_2", "TERT_TDM_TX_2"}, + {"MultiMedia30 Mixer", "TERT_TDM_TX_3", "TERT_TDM_TX_3"}, + + {"MultiMedia31 Mixer", "TERT_TDM_TX_0", "TERT_TDM_TX_0"}, + {"MultiMedia31 Mixer", "TERT_TDM_TX_1", "TERT_TDM_TX_1"}, + {"MultiMedia31 Mixer", "TERT_TDM_TX_2", "TERT_TDM_TX_2"}, + {"MultiMedia31 Mixer", "TERT_TDM_TX_3", "TERT_TDM_TX_3"}, + + {"MultiMedia32 Mixer", "TERT_TDM_TX_0", "TERT_TDM_TX_0"}, + {"MultiMedia32 Mixer", "TERT_TDM_TX_1", "TERT_TDM_TX_1"}, + {"MultiMedia32 Mixer", "TERT_TDM_TX_2", "TERT_TDM_TX_2"}, + {"MultiMedia32 Mixer", "TERT_TDM_TX_3", "TERT_TDM_TX_3"}, + + {"MultiMedia33 Mixer", "TERT_TDM_TX_0", "TERT_TDM_TX_0"}, + {"MultiMedia33 Mixer", "TERT_TDM_TX_1", "TERT_TDM_TX_1"}, + {"MultiMedia33 Mixer", "TERT_TDM_TX_2", "TERT_TDM_TX_2"}, + {"MultiMedia33 Mixer", "TERT_TDM_TX_3", "TERT_TDM_TX_3"}, + {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia1", "MM_DL1"}, {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia2", "MM_DL2"}, {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia3", "MM_DL3"}, @@ -18732,6 +19997,10 @@ static const struct snd_soc_dapm_route intercon[] = { {"MM_UL27", NULL, "MultiMedia27 Mixer"}, {"MM_UL28", NULL, "MultiMedia28 Mixer"}, {"MM_UL29", NULL, "MultiMedia29 Mixer"}, + {"MM_UL30", NULL, "MultiMedia30 Mixer"}, + {"MM_UL31", NULL, "MultiMedia31 Mixer"}, + {"MM_UL32", NULL, "MultiMedia32 Mixer"}, + {"MM_UL33", NULL, "MultiMedia33 Mixer"}, {"AUX_PCM_RX Audio Mixer", "MultiMedia1", "MM_DL1"}, {"AUX_PCM_RX Audio Mixer", "MultiMedia2", "MM_DL2"}, diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.h b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.h index bfeee4ad3607..70a4152ad05a 100644 --- a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.h +++ b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-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 @@ -231,6 +231,10 @@ enum { MSM_FRONTEND_DAI_MULTIMEDIA27, MSM_FRONTEND_DAI_MULTIMEDIA28, MSM_FRONTEND_DAI_MULTIMEDIA29, + MSM_FRONTEND_DAI_MULTIMEDIA30, + MSM_FRONTEND_DAI_MULTIMEDIA31, + MSM_FRONTEND_DAI_MULTIMEDIA32, + MSM_FRONTEND_DAI_MULTIMEDIA33, MSM_FRONTEND_DAI_CS_VOICE, MSM_FRONTEND_DAI_VOIP, MSM_FRONTEND_DAI_AFE_RX, @@ -256,8 +260,8 @@ enum { MSM_FRONTEND_DAI_MAX, }; -#define MSM_FRONTEND_DAI_MM_SIZE (MSM_FRONTEND_DAI_MULTIMEDIA29 + 1) -#define MSM_FRONTEND_DAI_MM_MAX_ID MSM_FRONTEND_DAI_MULTIMEDIA29 +#define MSM_FRONTEND_DAI_MM_SIZE (MSM_FRONTEND_DAI_MULTIMEDIA33 + 1) +#define MSM_FRONTEND_DAI_MM_MAX_ID MSM_FRONTEND_DAI_MULTIMEDIA33 enum { MSM_BACKEND_DAI_PRI_I2S_RX = 0, diff --git a/sound/soc/msm/qdsp6v2/q6lsm.c b/sound/soc/msm/qdsp6v2/q6lsm.c index db697e765a3e..a19f0447c4b4 100644 --- a/sound/soc/msm/qdsp6v2/q6lsm.c +++ b/sound/soc/msm/qdsp6v2/q6lsm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2019, Linux Foundation. All rights reserved. + * Copyright (c) 2013-2020, 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 diff --git a/sound/soc/msm/qdsp6v2/q6voice.c b/sound/soc/msm/qdsp6v2/q6voice.c index a748f3671da7..e437a1c7985f 100644 --- a/sound/soc/msm/qdsp6v2/q6voice.c +++ b/sound/soc/msm/qdsp6v2/q6voice.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-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 @@ -7112,8 +7112,8 @@ static int32_t qdsp_cvp_callback(struct apr_client_data *data, void *priv) break; } } - } else if (data->opcode == VSS_ICOMMON_RSP_GET_PARAM || - VSS_ICOMMON_RSP_GET_PARAM_V3) { + } else if ((data->opcode == VSS_ICOMMON_RSP_GET_PARAM) || + (data->opcode == VSS_ICOMMON_RSP_GET_PARAM_V3)) { pr_debug("%s: VSS_ICOMMON_RSP_GET_PARAM\n", __func__); ptr = data->payload; if (ptr[0] != 0) { |