All of lore.kernel.org
 help / color / mirror / Atom feed
* bluetooth alsa and software mixing
@ 2008-10-24 17:39 Jelle de Jong
  2008-10-24 18:34 ` Sean McNamara
  0 siblings, 1 reply; 3+ messages in thread
From: Jelle de Jong @ 2008-10-24 17:39 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

Hello everybody,

I have a bunch of bluetooth audio devices, and I can currently only play
one audio stream as once, and i would like to be able to listen to radio
and other sounds at the same time. So i think some sort of software
mixing is needed to get this working. I attached my .asound / also
configuration. How can I configure my bluetooth system so that I can
listen to different sources of audio at the same time?

Thank for any information in advance,

Kind regards,

Jelle

[-- Attachment #2: setup-bluetooth-motorola-s805.sh --]
[-- Type: application/x-sh, Size: 603 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bluetooth alsa and software mixing
  2008-10-24 17:39 bluetooth alsa and software mixing Jelle de Jong
@ 2008-10-24 18:34 ` Sean McNamara
  2008-10-25  9:28   ` Jelle de Jong
  0 siblings, 1 reply; 3+ messages in thread
From: Sean McNamara @ 2008-10-24 18:34 UTC (permalink / raw)
  To: Jelle de Jong, alsa-devel

Is this another one of your open-ended questions where you already
know of the problems with your question and the potential solutions,
but you actually have a bug using one of the solutions? If so, can I
have some more money? ;-)

Well, basically, only a very small subset of audio devices out there
(some older Creative soundblaster cards, and some newer pro audio
cards) have hardware mixing on-chip. ALSA's default raw interfaces do
not provide any software mixing, so unless the hardware supports
hardware mixing and the driver takes advantage of that, you won't have
the ability to open multiple streams at once on *any* ALSA device.

That's why we have:

1. Dmix, and
2. PulseAudio.

There is ample documentation out there about how to set up and
configure dmix and pulseaudio. To add dmix to your example, you would
just have to define a dmix instance with a slave of your softvol PCM,
and a dsnoop device with a slave of the softvol device. If softvol
doesn't work this way, try making the slave the headset device.

Pulseaudio could also use the raw headset device in module-alsa-sink.

Have you tried these with no success? If so, what sorts of issues are
you getting?

I just thought I'd point out that, with the configuration you posted,
there is no expectation that you'll get any sort of mixing of streams
at all; that's by design. But based on your previous posts I think you
already know that...?

Sean

2008/10/24 Jelle de Jong <jelledejong@powercraft.nl>:
> Hello everybody,
>
> I have a bunch of bluetooth audio devices, and I can currently only play
> one audio stream as once, and i would like to be able to listen to radio
> and other sounds at the same time. So i think some sort of software
> mixing is needed to get this working. I attached my .asound / also
> configuration. How can I configure my bluetooth system so that I can
> listen to different sources of audio at the same time?
>
> Thank for any information in advance,
>
> Kind regards,
>
> Jelle
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bluetooth alsa and software mixing
  2008-10-24 18:34 ` Sean McNamara
@ 2008-10-25  9:28   ` Jelle de Jong
  0 siblings, 0 replies; 3+ messages in thread
From: Jelle de Jong @ 2008-10-25  9:28 UTC (permalink / raw)
  To: Sean McNamara; +Cc: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 3285 bytes --]

Sean McNamara wrote:
> Is this another one of your open-ended questions where you already
> know of the problems with your question and the potential solutions,
> but you actually have a bug using one of the solutions? If so, can I
> have some more money? ;-)
> 
> Well, basically, only a very small subset of audio devices out there
> (some older Creative soundblaster cards, and some newer pro audio
> cards) have hardware mixing on-chip. ALSA's default raw interfaces do
> not provide any software mixing, so unless the hardware supports
> hardware mixing and the driver takes advantage of that, you won't have
> the ability to open multiple streams at once on *any* ALSA device.
> 
> That's why we have:
> 
> 1. Dmix, and
> 2. PulseAudio.
> 
> There is ample documentation out there about how to set up and
> configure dmix and pulseaudio. To add dmix to your example, you would
> just have to define a dmix instance with a slave of your softvol PCM,
> and a dsnoop device with a slave of the softvol device. If softvol
> doesn't work this way, try making the slave the headset device.
> 
> Pulseaudio could also use the raw headset device in module-alsa-sink.
> 
> Have you tried these with no success? If so, what sorts of issues are
> you getting?
> 
> I just thought I'd point out that, with the configuration you posted,
> there is no expectation that you'll get any sort of mixing of streams
> at all; that's by design. But based on your previous posts I think you
> already know that...?
> 
> Sean
> 
> 2008/10/24 Jelle de Jong <jelledejong@powercraft.nl>:
>> Hello everybody,
>>
>> I have a bunch of bluetooth audio devices, and I can currently only play
>> one audio stream as once, and i would like to be able to listen to radio
>> and other sounds at the same time. So i think some sort of software
>> mixing is needed to get this working. I attached my .asound / also
>> configuration. How can I configure my bluetooth system so that I can
>> listen to different sources of audio at the same time?
>>
>> Thank for any information in advance,
>>
>> Kind regards,
>>
>> Jelle
>>

Thank you again for responding to my question. I first wanted to say no
question I ask here had an answer that I already knew so nobody is
wasting their time :-p. The situation is I know enough to see what is
probably going wrong, and might have some idea's how to fix them, but I
have no idea how to finally deliver or configure an working solution.

The thing is the .asoundrc configuration style is kind of difficult for
me to understand. I have always been in trouble finding exact
documentation what all lines do. I always been a lot of searching for
examples and then the trial and error method, with take an enormous
amount of energy and time. Besides this the alsa wiki seems down here
for a few days now.

I seems I would like to add a dmix and/or dsnoop device to my current
.asoundrc configuration to create software mixing for the bluetooth
device so it can handle multiple audio streams. But I have no idea how
to further configure my .asoundrc.

If somebody can show me some examples how to do this or change the
attachment and add some comments what background information was used to
gather the required knowledge, then this would be very helpful.

Thanks in advance,

Jelle

[-- Attachment #2: .asoundrc --]
[-- Type: text/plain, Size: 592 bytes --]

pcm.headset {
    type bluetooth
    #~ device 00:0D:18:A0:35:70
    #~ device 00:53:53:FB:7E:9C # Nokia BH-801
    #~ device 00:0C:55:D1:C9:78 # Motorola S805
    #~ device 00:0D:FD:18:6E:3C # Motorola S9
    #~ device 20:07:09:15:A9:5A # Samsung WEP210
    #~ python .simple-agent.py hci0 00:1A:80:AB:0A:B1
    device 00:1A:80:AB:0A:B1 # Sony SRS-BT100
    profile hifi
    #profile voice
    #profile auto
}
pcm.softvol {
    type softvol
    slave.pcm headset
    control.name Headset
    control.card 0
}
pcm.!default {
    #~ type hw
    #~ card 0
    type plug
    slave.pcm softvol
}

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-25  9:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-24 17:39 bluetooth alsa and software mixing Jelle de Jong
2008-10-24 18:34 ` Sean McNamara
2008-10-25  9:28   ` Jelle de Jong

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.