From: Samuel Holland <samuel@sholland.org>
To: Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@siol.net>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>
Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
Samuel Holland <samuel@sholland.org>
Subject: [PATCH 6/7] arm64: dts: allwinner: pinephone: Add support for Bluetooth audio
Date: Thu, 5 Nov 2020 22:15:12 -0600 [thread overview]
Message-ID: <20201106041513.38481-7-samuel@sholland.org> (raw)
In-Reply-To: <20201106041513.38481-1-samuel@sholland.org>
The PinePhone has a Bluetooth chip with its PCM interface connected to
AIF3. Add the DAI link so headeset audio can be routed in hardware.
Even though the link is mono, configuring the link for 2 slots is
required for compatibility with AIF2, which also uses 2 slots, and
which shares clock dividers with AIF3. Using equal clock frequencies
allows the modem and headset to be used at the same time.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 5780713b0dba..6125910d29db 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -23,6 +23,11 @@ backlight: backlight {
/* Backlight configuration differs per PinePhone revision. */
};
+ bt_sco_codec: bt-sco-codec {
+ #sound-dai-cells = <1>;
+ compatible = "linux,bt-sco";
+ };
+
chosen {
stdout-path = "serial0:115200n8";
};
@@ -63,6 +68,8 @@ vibrator {
};
&codec {
+ pinctrl-names = "default";
+ pinctrl-0 = <&aif3_pins>;
status = "okay";
};
@@ -400,6 +407,23 @@ &sound {
"MIC1", "Internal Microphone",
"Headset Microphone", "HBIAS",
"MIC2", "Headset Microphone";
+
+ simple-audio-card,dai-link@2 {
+ format = "dsp_a";
+ frame-master = <&link2_codec>;
+ bitclock-master = <&link2_codec>;
+ bitclock-inversion;
+
+ link2_cpu: cpu {
+ sound-dai = <&bt_sco_codec 0>;
+ };
+
+ link2_codec: codec {
+ sound-dai = <&codec 2>;
+ dai-tdm-slot-num = <2>;
+ dai-tdm-slot-width = <16>;
+ };
+ };
};
&uart0 {
--
2.26.2
next prev parent reply other threads:[~2020-11-06 4:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 4:15 [PATCH 0/7] PinePhone BT audio bringup Samuel Holland
2020-11-06 4:15 ` [PATCH 1/7] ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells Samuel Holland
2020-11-06 16:15 ` Rob Herring
2020-11-06 4:15 ` [PATCH 2/7] ARM: dts: sun8i-a33: Allow using multiple codec DAIs Samuel Holland
2020-11-06 4:15 ` [PATCH 3/7] arm64: dts: allwinner: a64: " Samuel Holland
2020-11-06 4:15 ` [PATCH 4/7] arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3 Samuel Holland
2020-11-06 4:15 ` [PATCH 5/7] arm64: dts: allwinner: a64: Allow multiple DAI links Samuel Holland
2020-11-06 4:15 ` Samuel Holland [this message]
2020-11-06 4:15 ` [PATCH 7/7] arm64: dts: allwinner: pinephone: Set audio card name Samuel Holland
2020-11-06 4:28 ` [PATCH 0/7] PinePhone BT audio bringup Chen-Yu Tsai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201106041513.38481-7-samuel@sholland.org \
--to=samuel@sholland.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jernej.skrabec@siol.net \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®