LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	"Marcel Holtmann \"" <marcel@holtmann.org>
Subject: Adding bluetooth PCM interface support to ASoC (Was: Re: [PATCH 6/7] ASoC: Samsung: neo1973_gta02: Fix bluetooth DAI registration)
Date: Mon, 07 Feb 2011 23:55:22 +0100	[thread overview]
Message-ID: <4D50785A.7050801@metafoo.de> (raw)
In-Reply-To: <20110207181702.GR10564@opensource.wolfsonmicro.com>

On 02/07/2011 07:17 PM, Mark Brown wrote:
>>> The bluetooth chip is an actual device which I can point to on the
>>> board and schematic, having a struct device to represent a device that's
>>> actually present doesn't seem like a great leap.
> 
>> Well, there is an actual device representing the bt device, but since
>> this is the standard bt usb device I have no idea how we would get an
>> reference to it from within the sound board driver.
> 
> If you've got a real device and a driver binding to it then you can make
> the driver for that device register the DAI from its probe function, no
> need for the machine driver to get involved.
>

The audio hardware setup of the board looks roughly like this:

  [### SOC ###]
   |         |
   | USB     | I2S
   |         |
 [BT]----[Codec]----[Modem]
     PCM        Analog

So the bluetooth chip is handeld by the standard USB BT HCI driver.

I did some research on the topic and it seems that this is a pretty common
setup in embedded devices.
Audio to the bluetooth chip can either be send over the HCI interface (USB in
this case) from the CPU or over the PCM interface from the codec, so that audio
data from the modem to a bluetooth headset doesn't have to be routed through
the CPU.
The PCM interface seems to be part of the bluetooth standard and there are even
registers (PSKEY_PCM_CONFIG32) to configure the PCM format and bit-rate.

This and that neo1973 devices dont seem the only ones using such a setup, it
would naturally make sense to write an ASoC driver to negotiate the PCM format
between the codec and bluetooth chip and maybe do power management. (And
ofcourse register a dai_device).

But the bluetooth audio support seems to be entirely written in userspace. The
in-kernel bluetooth drivers in general seem only to provide a common interface
to the underlying hardware and all of the higher level functionality seems to
be implemented in userspace.
So right now I have no idea where to start if one wanted to add a ASoC driver
which did the bt-dai configuration.

I've Cced Marcel Holtmann and the bluez mailinglist, maybe someone can give
some input on subject.

- Lars

  reply	other threads:[~2011-02-07 22:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-06 23:04 [PATCH 1/7] ASoC: neo1973_wm8753: Remove scenario management code Lars-Peter Clausen
2011-02-06 23:04 ` [PATCH 2/7] ASoC: neo1973_wm8753: Move lm4857 specefic code to its own module Lars-Peter Clausen
2011-02-07 11:50   ` Mark Brown
2011-02-06 23:04 ` [PATCH 3/7] ASoC: codecs: lm4857: Use dev_pm_ops Lars-Peter Clausen
2011-02-06 23:04 ` [PATCH 4/7] ASoC: neo1973_gta02_wm8753: Remove lm4853_{set,get}_state Lars-Peter Clausen
2011-02-06 23:04 ` [PATCH 5/7] ASoC: Samsung: neo1973: Use gpio_request_array to request gpios Lars-Peter Clausen
2011-02-06 23:04 ` [PATCH 6/7] ASoC: Samsung: neo1973_gta02: Fix bluetooth DAI registration Lars-Peter Clausen
2011-02-07 11:59   ` Mark Brown
2011-02-07 16:53     ` Lars-Peter Clausen
2011-02-07 17:02       ` Mark Brown
2011-02-07 17:37         ` Lars-Peter Clausen
2011-02-07 17:49           ` Mark Brown
2011-02-07 18:09             ` Lars-Peter Clausen
2011-02-07 18:17               ` Mark Brown
2011-02-07 22:55                 ` Lars-Peter Clausen [this message]
2011-02-08 13:08                   ` Adding bluetooth PCM interface support to ASoC (Was: Re: [PATCH 6/7] ASoC: Samsung: neo1973_gta02: Fix bluetooth DAI registration) Mark Brown
2011-02-06 23:04 ` [PATCH 7/7] ASoC: Samsung: Merge neo1937 and neo1973_gta02 sound board driver Lars-Peter Clausen
2011-02-07  2:25 ` [alsa-devel] [PATCH 1/7] ASoC: neo1973_wm8753: Remove scenario management code Jassi Brar
2011-02-07 11:42 ` Mark Brown
2011-02-07 17:01   ` Lars-Peter Clausen

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=4D50785A.7050801@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=marcel@holtmann.org \
    --subject='Adding bluetooth PCM interface support to ASoC (Was: Re: [PATCH 6/7] ASoC: Samsung: neo1973_gta02: Fix bluetooth DAI registration)' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).