All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] partly OT: pipe sound from Headset to soundcard
@ 2005-01-26 17:10 Ben Pezzei
  2005-01-26 17:25 ` Brad Midgley
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Pezzei @ 2005-01-26 17:10 UTC (permalink / raw)
  To: bluez-devel

Hi again,

Apologies if my question is a bit OT, but no one on the alsa
list had an answer for this one:

I try to pipe the sound from the headset to line in of the
soundcard. something like:
/dev/snd/pcmC1D0c -> /dev/snd/pcmC0D0p
and vice versa:
/dev/snd/pcmC0D0c -> /dev/snd/pcmC1D0p

So everything which comes through the soundcard mic should
be "forwarded" to the headset earphone, and everything
which comes from the headset mic should land at the
soundcards line in.

is there a way to accomplish this?

any hint would be great

greetings
ben



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] partly OT: pipe sound from Headset to soundcard
  2005-01-26 17:10 [Bluez-devel] partly OT: pipe sound from Headset to soundcard Ben Pezzei
@ 2005-01-26 17:25 ` Brad Midgley
  2005-01-26 23:54   ` Ben Pezzei
  0 siblings, 1 reply; 7+ messages in thread
From: Brad Midgley @ 2005-01-26 17:25 UTC (permalink / raw)
  To: bluez-devel

Ben

I had the same thought.

We have a way to send line in to a stereo headset but there is a delay. 
(see bluetooth-alsa.sf.net)

You could write something similar that runs in userspace and copies 
audio streams around using sco.

Brad

Ben Pezzei wrote:
> Hi again,
> 
> Apologies if my question is a bit OT, but no one on the alsa
> list had an answer for this one:
> 
> I try to pipe the sound from the headset to line in of the
> soundcard. something like:
> /dev/snd/pcmC1D0c -> /dev/snd/pcmC0D0p
> and vice versa:
> /dev/snd/pcmC0D0c -> /dev/snd/pcmC1D0p
> 
> So everything which comes through the soundcard mic should
> be "forwarded" to the headset earphone, and everything
> which comes from the headset mic should land at the
> soundcards line in.
> 
> is there a way to accomplish this?
> 
> any hint would be great
> 
> greetings
> ben
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] partly OT: pipe sound from Headset to soundcard
  2005-01-26 17:25 ` Brad Midgley
@ 2005-01-26 23:54   ` Ben Pezzei
  2005-01-27 12:51     ` Lars Grunewaldt
  2005-01-27 16:17     ` Brad Midgley
  0 siblings, 2 replies; 7+ messages in thread
From: Ben Pezzei @ 2005-01-26 23:54 UTC (permalink / raw)
  To: bluez-devel

Hi Brad,

Brad Midgley schrieb:
> I had the same thought.
> 
> We have a way to send line in to a stereo headset but there is a delay. 
> (see bluetooth-alsa.sf.net)

Yeah, but this covers A2DP only, right?

Right now, I was trying to accomplish this via asound.conf:
something like:
pcm.foo {
   type multi
   <map soundcard>
   <map headset>
}
pcm.bar {
   type route
   slave.pcm "bar"
   <map channels card out -> hs in>
   <map channels card in -> hs out>
}

hope the idea is understandable

http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html#pcm_plugins_route

but I guess this won't work

> You could write something similar that runs in userspace and copies 
> audio streams around using sco.

C hacking? ;) well, if there is really no other way, i could
try it. Are there some docs around to dig in or just the btsco
sources?

greetings
ben






-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] partly OT: pipe sound from Headset to soundcard
  2005-01-26 23:54   ` Ben Pezzei
@ 2005-01-27 12:51     ` Lars Grunewaldt
  2005-01-27 16:17     ` Brad Midgley
  1 sibling, 0 replies; 7+ messages in thread
From: Lars Grunewaldt @ 2005-01-27 12:51 UTC (permalink / raw)
  To: bluez-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ben Pezzei wrote:
| Hi Brad,
|
| Brad Midgley schrieb:
|
|> I had the same thought.
|>
|> We have a way to send line in to a stereo headset but there is a
|> delay. (see bluetooth-alsa.sf.net)
|
|
| Yeah, but this covers A2DP only, right?
|
| Right now, I was trying to accomplish this via asound.conf:
| something like:
| pcm.foo {
|   type multi
|   <map soundcard>
|   <map headset>
| }
| pcm.bar {
|   type route
|   slave.pcm "bar"
|   <map channels card out -> hs in>
|   <map channels card in -> hs out>
| }
|
| hope the idea is understandable
|
|
http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html#pcm_plugins_route

|
|
| but I guess this won't work
|

why not, it looks as it should. But I don't know much about alsa routing...

|> You could write something similar that runs in userspace and copies
|> audio streams around using sco.
|
| C hacking? ;) well, if there is really no other way, i could
| try it. Are there some docs around to dig in or just the btsco
| sources?

I think the btsco kernel module does nearly what you are looking for
(only in kernelspace). It takes an sco socket, reads the data and writes
it to the alsa buffer and vice versa. Of course you would write it to an
alsa device, not the internal buffer :)

Should be possible to rip it apart and run it as a userspace program,
dropping all kernel stuff and keeping mostly the thread that does the
copy stuff.

You can also have a look at the btsco command line daemon that does the
connection handling. A combination of both should do what you want.
Maybe *g*

good luck, and make sure to re-destribute your sources, as it will be
quite interesting for us I think :)

best regards,
~   Lars

- --
Lars Grunewaldt
* software development
* multimedia design
skills: C/C++/Java/PHP/(X)HTML/Flash/audio/video
web: http://www.dark-reality.de
mail: lgw@dark-reality.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB+OPCQWC6DTWkDAoRAp2zAJ9HE8vvVjbySeMS8UogZWmzMrnOeACfTugy
P/hZxd03QggSTK5mOBDUPHo=
=73yZ
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] partly OT: pipe sound from Headset to soundcard
  2005-01-26 23:54   ` Ben Pezzei
  2005-01-27 12:51     ` Lars Grunewaldt
@ 2005-01-27 16:17     ` Brad Midgley
  2005-01-27 21:32       ` Ben Pezzei
  1 sibling, 1 reply; 7+ messages in thread
From: Brad Midgley @ 2005-01-27 16:17 UTC (permalink / raw)
  To: bluez-devel

Your program would be an alsa client, copying from one alsa device to 
another. No btsco changes at all.

I don't know enough about how alsa works to know if you could just do it 
in asound.conf

Ben Pezzei wrote:
> Hi Brad,
> 
> Brad Midgley schrieb:
> 
>> I had the same thought.
>>
>> We have a way to send line in to a stereo headset but there is a 
>> delay. (see bluetooth-alsa.sf.net)
> 
> 
> Yeah, but this covers A2DP only, right?
> 
> Right now, I was trying to accomplish this via asound.conf:
> something like:
> pcm.foo {
>   type multi
>   <map soundcard>
>   <map headset>
> }
> pcm.bar {
>   type route
>   slave.pcm "bar"
>   <map channels card out -> hs in>
>   <map channels card in -> hs out>
> }
> 
> hope the idea is understandable
> 
> http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html#pcm_plugins_route 
> 
> 
> but I guess this won't work
> 
>> You could write something similar that runs in userspace and copies 
>> audio streams around using sco.
> 
> 
> C hacking? ;) well, if there is really no other way, i could
> try it. Are there some docs around to dig in or just the btsco
> sources?
> 
> greetings
> ben
> 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] partly OT: pipe sound from Headset to soundcard
  2005-01-27 16:17     ` Brad Midgley
@ 2005-01-27 21:32       ` Ben Pezzei
  2005-01-28  2:47         ` Collin R. Mulliner
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Pezzei @ 2005-01-27 21:32 UTC (permalink / raw)
  To: bluez-devel

Hi Brad,

Brad Midgley schrieb:

> Your program would be an alsa client, copying from one alsa device to 
> another. No btsco changes at all.

yup, I have written some "prove of concept" proggy which copies
the mic - stream from the soundcard to the headset-earphone.
Bad, bad style, but it works (ALSA-API only).

But: To finally manage the other way round (Headset mic to
soundcard playback) the code should work in some sort of
Duplex mode.

Since I still think, this whole thing can be accomplished via
asound.conf and/or jackd (or even some sort of pipe-system),
I'll ask around if someone has already done this kind of
setup.

greetings
ben

PS Is there a problem with mail delivery on this list?




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] partly OT: pipe sound from Headset to soundcard
  2005-01-27 21:32       ` Ben Pezzei
@ 2005-01-28  2:47         ` Collin R. Mulliner
  0 siblings, 0 replies; 7+ messages in thread
From: Collin R. Mulliner @ 2005-01-28  2:47 UTC (permalink / raw)
  To: bluez-devel

Hi,

I just pipe the output of arecord (alsa recorder) to aplay (alsa
player) ... works ok.

arecord -B 1000000 -D plughw:Headset - | aplay

... Collin

PS: I know this is a very ugly hack :)

On Thu, 27 Jan 2005 22:32:44 +0100
Ben Pezzei <ben@webstuhl.net> wrote:

> Hi Brad,
> 
> Brad Midgley schrieb:
> 
> > Your program would be an alsa client, copying from one alsa device
> > to another. No btsco changes at all.
> 
> yup, I have written some "prove of concept" proggy which copies
> the mic - stream from the soundcard to the headset-earphone.
> Bad, bad style, but it works (ALSA-API only).
> 
> But: To finally manage the other way round (Headset mic to
> soundcard playback) the code should work in some sort of
> Duplex mode.
> 
> Since I still think, this whole thing can be accomplished via
> asound.conf and/or jackd (or even some sort of pipe-system),
> I'll ask around if someone has already done this kind of
> setup.
> 
> greetings
> ben
> 
> PS Is there a problem with mail delivery on this list?
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive
> Reporting Tool for open source databases. Create drag-&-drop reports.
> Save time by over 75%! Publish reports on the web. Export to DOC, XLS,
> RTF, etc. Download a FREE copy at
> http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel


-- 
Collin R. Mulliner <collin@betaversion.net>
BETAVERSiON Systems [www.betaversion.net]
info/pgp: finger collin@betaversion.net
It's a hardware problem!


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

end of thread, other threads:[~2005-01-28  2:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-26 17:10 [Bluez-devel] partly OT: pipe sound from Headset to soundcard Ben Pezzei
2005-01-26 17:25 ` Brad Midgley
2005-01-26 23:54   ` Ben Pezzei
2005-01-27 12:51     ` Lars Grunewaldt
2005-01-27 16:17     ` Brad Midgley
2005-01-27 21:32       ` Ben Pezzei
2005-01-28  2:47         ` Collin R. Mulliner

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.