All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wens@csie.org>
To: Samuel Holland <samuel@sholland.org>
Cc: Maxime Ripard <mripard@kernel.org>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	devicetree <devicetree@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	phone-devel@vger.kernel.org
Subject: Re: [PATCH 0/7] PinePhone BT audio bringup
Date: Fri, 6 Nov 2020 12:28:04 +0800	[thread overview]
Message-ID: <CAGb2v67c-ywkh_s77f4sm3fmL9DuxeYMrAJAgp=_jKHBd6GdHA@mail.gmail.com> (raw)
In-Reply-To: <20201106041513.38481-1-samuel@sholland.org>

Hi,

On Fri, Nov 6, 2020 at 12:15 PM Samuel Holland <samuel@sholland.org> wrote:
>
> This series makes use of the additional DAIs recently added to the
> sun8i-codec driver to add hardware routing for BT SCO (headset) audio
> on the PinePhone.
>
> The BT audio connection is represented by the "dummy" bt-sco codec. The
> connection to the Quectel EG-25G modem via AIF2 works as well, but I do
> not include it here because there is no appropriate codec driver in
> tree. We have been using an out-of-tree "dummy" codec driver similar to
> bt-sco, and I'm not sure if such a driver would be desired upstream.
>
> The modem has a similar amount of configurability as the rtl8723cs BT
> chip. For the BT chip, the DAI format and PCM parameters are set in a
> configuration firmware file and loaded at driver load time. For the
> modem, the DAI format and PCM parameters are set by (and can be queried
> from) an AT command. However, this AT command requires a modem restart
> to take effect, so the parameters cannot feasibly be changed at runtime.
>
> With a dummy driver, we pick some "standard" set of PCM parameters, e.g.
> 16 bit mono at 8 or 16 kHz, and assume the hardware agrees. Similarly,
> we assume the DAI format pre-programmed in the remote hardware matches
> what is configured in the DAI link (in this case, in the device tree).
>
> Is that the right way to model this? Or does the modem (and maybe even
> the BT chip) deserve a more featureful driver that reads and/or programs
> the format and params at probe time?

FYI there's a "Bluetooth: Allow to use configure SCO socket codec parameters"
thread on the bluetooth mailing list which is still unresolved AFAICT.

You might want to take a look at it.

ChenYu

> Because of those unanswered questions, I'm sending BT SCO support
> first/only.
>
> Regards,
> Samuel
>
> Arnaud Ferraris (1):
>   arm64: dts: allwinner: pinephone: Set audio card name
>
> Samuel Holland (6):
>   ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells
>   ARM: dts: sun8i-a33: Allow using multiple codec DAIs
>   arm64: dts: allwinner: a64: Allow using multiple codec DAIs
>   arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3
>   arm64: dts: allwinner: a64: Allow multiple DAI links
>   arm64: dts: allwinner: pinephone: Add support for Bluetooth audio
>
>  .../sound/allwinner,sun8i-a33-codec.yaml      |  2 +-
>  arch/arm/boot/dts/sun8i-a33.dtsi              |  4 +-
>  .../dts/allwinner/sun50i-a64-pinephone.dtsi   | 25 +++++++++++++
>  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 37 ++++++++++++++-----
>  4 files changed, 55 insertions(+), 13 deletions(-)
>
> --
> 2.26.2
>

WARNING: multiple messages have this Message-ID (diff)
From: Chen-Yu Tsai <wens@csie.org>
To: Samuel Holland <samuel@sholland.org>
Cc: devicetree <devicetree@vger.kernel.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Maxime Ripard <mripard@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	phone-devel@vger.kernel.org,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 0/7] PinePhone BT audio bringup
Date: Fri, 6 Nov 2020 12:28:04 +0800	[thread overview]
Message-ID: <CAGb2v67c-ywkh_s77f4sm3fmL9DuxeYMrAJAgp=_jKHBd6GdHA@mail.gmail.com> (raw)
In-Reply-To: <20201106041513.38481-1-samuel@sholland.org>

Hi,

On Fri, Nov 6, 2020 at 12:15 PM Samuel Holland <samuel@sholland.org> wrote:
>
> This series makes use of the additional DAIs recently added to the
> sun8i-codec driver to add hardware routing for BT SCO (headset) audio
> on the PinePhone.
>
> The BT audio connection is represented by the "dummy" bt-sco codec. The
> connection to the Quectel EG-25G modem via AIF2 works as well, but I do
> not include it here because there is no appropriate codec driver in
> tree. We have been using an out-of-tree "dummy" codec driver similar to
> bt-sco, and I'm not sure if such a driver would be desired upstream.
>
> The modem has a similar amount of configurability as the rtl8723cs BT
> chip. For the BT chip, the DAI format and PCM parameters are set in a
> configuration firmware file and loaded at driver load time. For the
> modem, the DAI format and PCM parameters are set by (and can be queried
> from) an AT command. However, this AT command requires a modem restart
> to take effect, so the parameters cannot feasibly be changed at runtime.
>
> With a dummy driver, we pick some "standard" set of PCM parameters, e.g.
> 16 bit mono at 8 or 16 kHz, and assume the hardware agrees. Similarly,
> we assume the DAI format pre-programmed in the remote hardware matches
> what is configured in the DAI link (in this case, in the device tree).
>
> Is that the right way to model this? Or does the modem (and maybe even
> the BT chip) deserve a more featureful driver that reads and/or programs
> the format and params at probe time?

FYI there's a "Bluetooth: Allow to use configure SCO socket codec parameters"
thread on the bluetooth mailing list which is still unresolved AFAICT.

You might want to take a look at it.

ChenYu

> Because of those unanswered questions, I'm sending BT SCO support
> first/only.
>
> Regards,
> Samuel
>
> Arnaud Ferraris (1):
>   arm64: dts: allwinner: pinephone: Set audio card name
>
> Samuel Holland (6):
>   ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells
>   ARM: dts: sun8i-a33: Allow using multiple codec DAIs
>   arm64: dts: allwinner: a64: Allow using multiple codec DAIs
>   arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3
>   arm64: dts: allwinner: a64: Allow multiple DAI links
>   arm64: dts: allwinner: pinephone: Add support for Bluetooth audio
>
>  .../sound/allwinner,sun8i-a33-codec.yaml      |  2 +-
>  arch/arm/boot/dts/sun8i-a33.dtsi              |  4 +-
>  .../dts/allwinner/sun50i-a64-pinephone.dtsi   | 25 +++++++++++++
>  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 37 ++++++++++++++-----
>  4 files changed, 55 insertions(+), 13 deletions(-)
>
> --
> 2.26.2
>

WARNING: multiple messages have this Message-ID (diff)
From: Chen-Yu Tsai <wens@csie.org>
To: Samuel Holland <samuel@sholland.org>
Cc: devicetree <devicetree@vger.kernel.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Maxime Ripard <mripard@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	phone-devel@vger.kernel.org,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 0/7] PinePhone BT audio bringup
Date: Fri, 6 Nov 2020 12:28:04 +0800	[thread overview]
Message-ID: <CAGb2v67c-ywkh_s77f4sm3fmL9DuxeYMrAJAgp=_jKHBd6GdHA@mail.gmail.com> (raw)
In-Reply-To: <20201106041513.38481-1-samuel@sholland.org>

Hi,

On Fri, Nov 6, 2020 at 12:15 PM Samuel Holland <samuel@sholland.org> wrote:
>
> This series makes use of the additional DAIs recently added to the
> sun8i-codec driver to add hardware routing for BT SCO (headset) audio
> on the PinePhone.
>
> The BT audio connection is represented by the "dummy" bt-sco codec. The
> connection to the Quectel EG-25G modem via AIF2 works as well, but I do
> not include it here because there is no appropriate codec driver in
> tree. We have been using an out-of-tree "dummy" codec driver similar to
> bt-sco, and I'm not sure if such a driver would be desired upstream.
>
> The modem has a similar amount of configurability as the rtl8723cs BT
> chip. For the BT chip, the DAI format and PCM parameters are set in a
> configuration firmware file and loaded at driver load time. For the
> modem, the DAI format and PCM parameters are set by (and can be queried
> from) an AT command. However, this AT command requires a modem restart
> to take effect, so the parameters cannot feasibly be changed at runtime.
>
> With a dummy driver, we pick some "standard" set of PCM parameters, e.g.
> 16 bit mono at 8 or 16 kHz, and assume the hardware agrees. Similarly,
> we assume the DAI format pre-programmed in the remote hardware matches
> what is configured in the DAI link (in this case, in the device tree).
>
> Is that the right way to model this? Or does the modem (and maybe even
> the BT chip) deserve a more featureful driver that reads and/or programs
> the format and params at probe time?

FYI there's a "Bluetooth: Allow to use configure SCO socket codec parameters"
thread on the bluetooth mailing list which is still unresolved AFAICT.

You might want to take a look at it.

ChenYu

> Because of those unanswered questions, I'm sending BT SCO support
> first/only.
>
> Regards,
> Samuel
>
> Arnaud Ferraris (1):
>   arm64: dts: allwinner: pinephone: Set audio card name
>
> Samuel Holland (6):
>   ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells
>   ARM: dts: sun8i-a33: Allow using multiple codec DAIs
>   arm64: dts: allwinner: a64: Allow using multiple codec DAIs
>   arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3
>   arm64: dts: allwinner: a64: Allow multiple DAI links
>   arm64: dts: allwinner: pinephone: Add support for Bluetooth audio
>
>  .../sound/allwinner,sun8i-a33-codec.yaml      |  2 +-
>  arch/arm/boot/dts/sun8i-a33.dtsi              |  4 +-
>  .../dts/allwinner/sun50i-a64-pinephone.dtsi   | 25 +++++++++++++
>  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 37 ++++++++++++++-----
>  4 files changed, 55 insertions(+), 13 deletions(-)
>
> --
> 2.26.2
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-11-06  4:28 UTC|newest]

Thread overview: 30+ 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 ` Samuel Holland
2020-11-06  4:15 ` Samuel Holland
2020-11-06  4:15 ` [PATCH 1/7] ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells Samuel Holland
2020-11-06  4:15   ` Samuel Holland
2020-11-06  4:15   ` Samuel Holland
2020-11-06 16:15   ` Rob Herring
2020-11-06 16:15     ` Rob Herring
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   ` Samuel Holland
2020-11-06  4:15   ` Samuel Holland
2020-11-06  4:15 ` [PATCH 3/7] arm64: dts: allwinner: a64: " Samuel Holland
2020-11-06  4:15   ` Samuel Holland
2020-11-06  4:15   ` 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   ` Samuel Holland
2020-11-06  4:15   ` 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
2020-11-06  4:15   ` Samuel Holland
2020-11-06  4:15 ` [PATCH 6/7] arm64: dts: allwinner: pinephone: Add support for Bluetooth audio Samuel Holland
2020-11-06  4:15   ` Samuel Holland
2020-11-06  4:15   ` Samuel Holland
2020-11-06  4:15 ` [PATCH 7/7] arm64: dts: allwinner: pinephone: Set audio card name Samuel Holland
2020-11-06  4:15   ` Samuel Holland
2020-11-06  4:15   ` Samuel Holland
2020-11-06  4:28 ` Chen-Yu Tsai [this message]
2020-11-06  4:28   ` [PATCH 0/7] PinePhone BT audio bringup Chen-Yu Tsai
2020-11-06  4:28   ` 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='CAGb2v67c-ywkh_s77f4sm3fmL9DuxeYMrAJAgp=_jKHBd6GdHA@mail.gmail.com' \
    --to=wens@csie.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=samuel@sholland.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.