Add support for audio on SDM845 SoC
Subsystems (5)
v5 cover Add support for audio on SDM845 SoC
This provides initial patchset to support audio on Qualcomm Techonologies Inc. SDM845 SoC. Currently, it supports audio playback/capture over Primary MI2S and Quaternary TDM ports.
Changes since v4:
- Used snd_mask_set_format() instead of snd_mask_set() to avoid sparse warning.
Rohit kumar (4):
ASoC: qcom: dt-bindings: Add sdm845 machine bindings
ASoC: dt-bindings: Update dt binding name for apq8096
ASoC: qcom: Add support to parse common audio device nodes
ASoC: qcom: add sdm845 sound card support
.../devicetree/bindings/sound/qcom,apq8096.txt | 15 +- .../devicetree/bindings/sound/qcom,sdm845.txt | 80 ++++++ sound/soc/qcom/Kconfig | 8 + sound/soc/qcom/Makefile | 4 +- sound/soc/qcom/apq8096.c | 111 +------- sound/soc/qcom/common.c | 112 ++++++++ sound/soc/qcom/common.h | 12 + sound/soc/qcom/sdm845.c | 286 +++++++++++++++++++++ 8 files changed, 525 insertions(+), 103 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,sdm845.txt create mode 100644 sound/soc/qcom/common.c create mode 100644 sound/soc/qcom/common.h create mode 100644 sound/soc/qcom/sdm845.c
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 1/4 ASoC: qcom: dt-bindings: Add sdm845 machine bindings
Add devicetree bindings documentation file for SDM845 sound card.
--- .../devicetree/bindings/sound/qcom,sdm845.txt | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,sdm845.txt
Documentation/devicetree/bindings/sound/qcom,sdm845.txt new file +80 -0
@@ -0,0 +1,80 @@ +* Qualcomm Technologies Inc. SDM845 ASoC sound card driver + +This binding describes the SDM845 sound card, which uses qdsp for audio. + +- compatible: + Usage: required + Value type: <stringlist> + Definition: must be "qcom,sdm845-sndcard" + +- audio-routing: + Usage: Optional + Value type: <stringlist> + Definition: A list of the connections between audio components. + Each entry is a pair of strings, the first being the + connection's sink, the second being the connection's + source. Valid names could be power supplies, MicBias + of codec and the jacks on the board. + +- model: + Usage: required + Value type: <stringlist> + Definition: The user-visible name of this sound card. + += dailinks +Each subnode of sndcard represents either a dailink, and subnodes of each +dailinks would be cpu/codec/platform dais. + +- link-name: + Usage: required + Value type: <string> + Definition: User friendly name for dai link + += CPU, PLATFORM, CODEC dais subnodes +- cpu: + Usage: required + Value type: <subnode> + Definition: cpu dai sub-node + +- codec: + Usage: required + Value type: <subnode> + Definition: codec dai sub-node + +- platform: + Usage: Optional + Value type: <subnode> + Definition: platform dai sub-node + +- sound-dai: + Usage: required + Value type: <phandle> + Definition: dai phandle/s and port of CPU/CODEC/PLATFORM node. + +Example: + +audio { + compatible = "qcom,sdm845-sndcard"; + model = "sdm845-snd-card"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&pri_mi2s_active &pri_mi2s_ws_active>; + pinctrl-1 = <&pri_mi2s_sleep &pri_mi2s_ws_sleep>; + + mm1-dai-link { + link-name = "MultiMedia1"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; + }; + }; + + pri-mi2s-dai-link { + link-name = "PRI MI2S Playback"; + cpu { + sound-dai = <&q6afedai PRIMARY_MI2S_RX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + }; +};
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 2/4 ASoC: dt-bindings: Update dt binding name for apq8096
In reply to Rohit kumarRemove qcom prefix from machine driver dt bindings of apq8096 SoC.
--- Documentation/devicetree/bindings/sound/qcom,apq8096.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/sound/qcom,apq8096.txt +13 -2
@@ -7,7 +7,7 @@ This binding describes the APQ8096 sound card, which uses qdsp for audio. Value type: <stringlist> Definition: must be "qcom,apq8096-sndcard" -- qcom,audio-routing: +- audio-routing: Usage: Optional Value type: <stringlist> Definition: A list of the connections between audio components.
@@ -49,6 +49,12 @@ This binding describes the APQ8096 sound card, which uses qdsp for audio. "DMIC1" "DMIC2" "DMIC3" + +- model: + Usage: required + Value type: <stringlist> + Definition: The user-visible name of this sound card. + = dailinks Each subnode of sndcard represents either a dailink, and subnodes of each dailinks would be cpu/codec/platform dais.
@@ -79,11 +85,16 @@ dailinks would be cpu/codec/platform dais. Value type: <phandle with arguments> Definition: dai phandle/s and port of CPU/CODEC/PLATFORM node. +Obsolete: + qcom,model: String for soundcard name (Use model instead) + qcom,audio-routing: A list of the connections between audio components. + (Use audio-routing instead) + Example: audio { compatible = "qcom,apq8096-sndcard"; - qcom,model = "DB820c"; + model = "DB820c"; mm1-dai-link { link-name = "MultiMedia1";
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 3/4 ASoC: qcom: Add support to parse common audio device nodes
In reply to Rohit kumarThis adds support to parse cpu, platform and codec device nodes and add them in dai-links. Also, update apq8096 machine driver to use the common API.
--- sound/soc/qcom/Makefile | 2 +- sound/soc/qcom/apq8096.c | 111 +++++----------------------------------------- sound/soc/qcom/common.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/qcom/common.h | 12 +++++ 4 files changed, 136 insertions(+), 101 deletions(-) create mode 100644 sound/soc/qcom/common.c create mode 100644 sound/soc/qcom/common.h
sound/soc/qcom/Makefile +1 -1
@@ -13,7 +13,7 @@ obj-$(CONFIG_SND_SOC_LPASS_APQ8016) += snd-soc-lpass-apq8016.o # Machine snd-soc-storm-objs := storm.o snd-soc-apq8016-sbc-objs := apq8016_sbc.o -snd-soc-apq8096-objs := apq8096.o +snd-soc-apq8096-objs := apq8096.o common.o obj-$(CONFIG_SND_SOC_STORM) += snd-soc-storm.o obj-$(CONFIG_SND_SOC_APQ8016_SBC) += snd-soc-apq8016-sbc.o
sound/soc/qcom/apq8096.c +11 -100
144 lines not on this page · raw message
sound/soc/qcom/common.c new file +112 -0
112 lines not on this page · raw message
sound/soc/qcom/common.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +// Copyright (c) 2018, The Linux Foundation. All rights reserved. + +#ifndef __QCOM_SND_COMMON_H__ +#define __QCOM_SND_COMMON_H__ + +#include <linux/component.h> +#include <sound/soc.h> + +int qcom_snd_parse_of (struct snd_soc_card *card); + +#endif
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v5 4/4 ASoC: qcom: add sdm845 sound card support
In reply to Rohit kumarThis patch adds sdm845 audio machine driver support.
--- sound/soc/qcom/Kconfig | 8 ++ sound/soc/qcom/Makefile | 2 + sound/soc/qcom/sdm845.c | 286 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 296 insertions(+) create mode 100644 sound/soc/qcom/sdm845.c
sound/soc/qcom/Kconfig +8 -0
@@ -90,3 +90,11 @@ config SND_SOC_MSM8996 Support for Qualcomm Technologies LPASS audio block in APQ8096 SoC-based systems. Say Y if you want to use audio device on this SoCs + +config SND_SOC_SDM845 + tristate "SoC Machine driver for SDM845 boards" + select SND_SOC_QDSP6 + help + To add support for audio on Qualcomm Technologies Inc. + SDM845 SoC-based systems. + Say Y if you want to use audio device on this SoCs.
sound/soc/qcom/Makefile +2 -0
@@ -14,10 +14,12 @@ obj-$(CONFIG_SND_SOC_LPASS_APQ8016) += snd-soc-lpass-apq8016.o snd-soc-storm-objs := storm.o snd-soc-apq8016-sbc-objs := apq8016_sbc.o snd-soc-apq8096-objs := apq8096.o common.o +snd-soc-sdm845-objs := sdm845.o common.o obj-$(CONFIG_SND_SOC_STORM) += snd-soc-storm.o obj-$(CONFIG_SND_SOC_APQ8016_SBC) += snd-soc-apq8016-sbc.o obj-$(CONFIG_SND_SOC_MSM8996) += snd-soc-apq8096.o +obj-$(CONFIG_SND_SOC_SDM845) += snd-soc-sdm845.o #DSP lib obj-$(CONFIG_SND_SOC_QDSP6) += qdsp6/
sound/soc/qcom/sdm845.c new file +286 -0
286 lines not on this page · raw message
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Mark Brown
maintainerRe: [PATCH v5 4/4] ASoC: qcom: add sdm845 sound card support
sound/soc/qcom/sdm845.c line 4
Quoted 7 lines · Rohit kumar
sound/soc/qcom/sdm845.c new file +4
-0@@ -0,0 +1,286 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (c) 2018, The Linux Foundation. All rights reserved. +*/
Please make the entire thing a C++ comment, it makes it look more intentional.
Mark Brown
maintainerApplied "ASoC: qcom: add sdm845 sound card support" to the asoc tree
In reply to Rohit kumarThe patch
ASoC: qcom: add sdm845 sound card support
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
6b1687bf76ef84cb1e31386c4871a01fe66937bfMon Sep 17 00:00:00 2001
From: Rohit kumar <[email protected]>
Date: Wed, 1 Aug 2018 14:31:09 +0530
Subject: [PATCH] ASoC: qcom: add sdm845 sound card support
This patch adds sdm845 audio machine driver support.
--- sound/soc/qcom/Kconfig | 8 ++ sound/soc/qcom/Makefile | 2 + sound/soc/qcom/sdm845.c | 286 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 296 insertions(+) create mode 100644 sound/soc/qcom/sdm845.c
sound/soc/qcom/Kconfig +8 -0
@@ -90,3 +90,11 @@ config SND_SOC_MSM8996 Support for Qualcomm Technologies LPASS audio block in APQ8096 SoC-based systems. Say Y if you want to use audio device on this SoCs + +config SND_SOC_SDM845 + tristate "SoC Machine driver for SDM845 boards" + select SND_SOC_QDSP6 + help + To add support for audio on Qualcomm Technologies Inc. + SDM845 SoC-based systems. + Say Y if you want to use audio device on this SoCs.
sound/soc/qcom/Makefile +2 -0
@@ -14,10 +14,12 @@ obj-$(CONFIG_SND_SOC_LPASS_APQ8016) += snd-soc-lpass-apq8016.o snd-soc-storm-objs := storm.o snd-soc-apq8016-sbc-objs := apq8016_sbc.o snd-soc-apq8096-objs := apq8096.o common.o +snd-soc-sdm845-objs := sdm845.o common.o obj-$(CONFIG_SND_SOC_STORM) += snd-soc-storm.o obj-$(CONFIG_SND_SOC_APQ8016_SBC) += snd-soc-apq8016-sbc.o obj-$(CONFIG_SND_SOC_MSM8996) += snd-soc-apq8096.o +obj-$(CONFIG_SND_SOC_SDM845) += snd-soc-sdm845.o #DSP lib obj-$(CONFIG_SND_SOC_QDSP6) += qdsp6/
sound/soc/qcom/sdm845.c new file +286 -0
286 lines not on this page · raw message
Signature · 1 line
2.18.0