Hi Zoltan,

It's great that you have found a solution (even if it's hackish) to meet your 
immediate demo needs. I would also like that we follow-up on this issue given, 
as pointed out by Jaska, it *ought* to work. Would you mind filing a bug for 
this so we can properly track this?

Thanks,
Geoffroy

> -----Original Message-----
> From: IVI [mailto:ivi-boun...@lists.tizen.org] On Behalf Of Uimonen, Jaska
> Sent: Thursday, May 15, 2014 8:39 AM
> To: Podolyak, Zoltan; Jones, Brian J
> Cc: ivi@lists.tizen.org
> Subject: RE: ofono/pulseaudio/bluez5
> 
> Hi Zoltan,
> 
> Why I'm little bit worried here is that, the functionality that you are
> describing should be already in Tizen IVI images without any modifications.
> 
> If you make a bluetooth call and connect (or have connected before) a usb
> headset, you call should be routed automatically. We are testing this almost
> every day... This is what pulseaudio-module-murphy-ivi and Murphy are
> there for.
> 
> br,
> Jaska
> 
> ________________________________________
> From: IVI [ivi-boun...@lists.tizen.org] on behalf of Podolyak, Zoltan
> [zpodo...@jaguarlandrover.com]
> Sent: Thursday, May 15, 2014 3:16 AM
> To: Jones, Brian J
> Cc: ivi@lists.tizen.org
> Subject: Re: ofono/pulseaudio/bluez5
> 
> Hi guys,
> 
> I think I figured out a way to get the Bluetooth sound routed through my USB
> headphones, though it is somewhat "hacky." I guess it will do for a demo.
> 
> There seems to be a ton of pulseaudio settings that either work differently
> on other distros or just don't work consistently at all.
> 
> You can apparently set the default sink/source from the
> default.pa<http://default.pa> configuration file, but it will seemingly have 
> no
> effect on Tizen.
> 
> The solution provided here also does not seem to work:
> https://bbs.archlinux.org/viewtopic.php?id=164868
> 
> The only way I was able to make it work was by forcing the unloading of the
> built-in module. udev discovery is usually assigned module index 0 and the
> built-in audio index 1. So we add the following line to our
> default.pa<http://default.pa>:
> 
> unload-module 1
> 
> This will unload the module containing the built-in audio and bluetooth audio
> will now be routed through the next available alsa card, our USB headset.
> 
> We can probably add a complicated udev rule or something or we can just
> run a pulseaudio test app to try and figure out exactly what's going. Thanks
> for all your help!
> 
> Zoltan
> 
> 
> On Wed, May 14, 2014 at 9:49 AM, Podolyak, Zoltan
> <zpodo...@jaguarlandrover.com<mailto:zpodo...@jaguarlandrover.com>>
> wrote:
> Yes, this is true. It's definitely not started by initiating an audio session
> through Bluetooth. I then tried searching in the source itself for how it's
> being started and the only place I found is the area around this:
> 
> /webkit-
> efl/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer
> .cpp
> 
> This will initiate a new DBUS session somewhere down deep that will
> presumably launch pulse. As far as I can tell though, this code is not
> manipulated by any part of the Bluez/ofono pair. Nor should it be.
> 
> Zoltan
> 
> 
> On Wed, May 14, 2014 at 9:38 AM, Jones, Brian J
> <brian.j.jo...@intel.com<mailto:brian.j.jo...@intel.com>> wrote:
> On a quick side note, to my knowledge pulseaudio is never up at boot.  This is
> intentional as it helps speed up the boot time.  PulseAudio should however
> be launched when requested, I think there is an issue with it not being
> started for phone related tasks ATM.
> 
> From: IVI [mailto:ivi-boun...@lists.tizen.org<mailto:ivi-
> boun...@lists.tizen.org>] On Behalf Of Podolyak, Zoltan
> Sent: Wednesday, May 14, 2014 9:16 AM
> To: ivi@lists.tizen.org<mailto:ivi@lists.tizen.org>
> Subject: Fwd: ofono/pulseaudio/bluez5
> 
> 
> Hello Jaska,
> 
> Thanks for your reply. I will try to be a bit more specific about what my
> problem is.
> 
> I'm using the Plantronics_Plantronics_C420 USB headset with microphone.
> I'm aware that there's no pre-amp on the NDiS. It actually took me quite a
> while to just get the system to use the headset for our Music Player app.
> What I ended up doing is setting these settings in my /etc/pulse/client.conf
> file.
> 
> default-sink = alsa_output.usb-Plantronics_Plantronics_C420-00-
> C420.analog-stereo
> default-source = alsa_input.usb-Plantronics_Plantronics_C420-00-
> C420.analog-mono
> 
> With this setting, our Music Player uses the USB headset.
> 
> I also verified the microphone with alsa tools such as aplay/arecord. This
> works fine.
> 
> I'm definitely using default.pa<http://default.pa> when loading through the
> service file. Here's what it looks like:
> 
> [Unit]
> Description=pulseaudio sound server
> 
> [Service]
> ExecStart=/usr/bin/su app -c
> "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus
> _socket /usr/bin/pulseaudio --start --log-target=syslog"
> Restart=always
> 
> [Install]
> WantedBy=multi-user.target
> 
> So it's being loaded exactly how it would be loaded by webkit.
> 
> My problem is, that when trying to make a call through my Bluetooth paired
> device, the audio still defaults to the built-in analog device. I verified 
> this by
> connecting a regular headphone to the audio line-in jack. I do however, hear
> static on the USB headphone since that's loaded by default through my
> client.conf.
> 
> My guess is that Bluetooth uses different PA settings or something because
> udev is detecting the audio drivers at PA startup. Here's the top part of the
> output from the pacmd list-modules command:
> 
>     index: 0
>         name: <module-udev-detect>
>         argument: <>
>         used: -1
>         load once: yes
>         properties:
>                 module.author = "Lennart Poettering"
>                 module.description = "Detect available audio hardware and load
> matching drivers"
>                 module.version = "4.0-rebootstrapped"
>     index: 1
>         name: <module-alsa-card>
>         argument: <device_id="1" name="pci-0000_00_1b.0"
> card_name="alsa_card.pci-0000_00_1b.0" namereg_fail=false tsched=yes
> fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes
> card_properties="module-udev-detect.discovered=1">
>         used: 0
>         load once: no
>         properties:
>                 module.author = "Lennart Poettering"
>                 module.description = "ALSA Card"
>                 module.version = "4.0-rebootstrapped"
>     index: 2
>         name: <module-alsa-card>
>         argument: <device_id="0" name="usb-Plantronics_Plantronics_C420-00-
> C420" card_name="alsa_card.usb-Plantronics_Plantronics_C420-00-C420"
> namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no
> deferred_volume=yes use_ucm=yes card_properties="module-udev-
> detect.discovered=1">
>         used: 0
>         load once: no
>         properties:
>                 module.author = "Lennart Poettering"
>                 module.description = "ALSA Card"
>                 module.version = "4.0-rebootstrapped"
>     index: 3
>         name: <module-bluez5-discover>
>         argument: <>
>         used: -1
>         load once: yes
>         properties:
>                 module.author = "João Paulo Rechi Vita"
>                 module.description = "Detect available BlueZ 5 Bluetooth audio
> devices and load BlueZ 5 Bluetooth audio drivers"
>                 module.version = "4.0-rebootstrapped"
> 
> I'm going to try setting the default-sink/source to the USB headset from
> default.pa<http://default.pa> and see what happens. I also tried
> commenting out the udev detection, but the results were the same.
> 
> The other strange thing is that I had this working through the USB headset on
> Friday. I played around with dLeyna a little bit and ever since then, BT only
> wants to use the built-in audio. I don't get it.
> 
> Thanks for your help!
> 
> Regards,
> Zoltan
> 
> 
> 
> 
> On Tue, May 13, 2014 at 11:59 PM, Uimonen, Jaska
> <jaska.uimo...@intel.com<mailto:jaska.uimo...@intel.com>> wrote:
> Hello Zoltan,
> 
> I have not used the ndis166 for a while, so I might not have all the facts
> correct... I had also little bit trouble figuring out what you are really 
> trying to
> do.
> 
> First, you should check, that despite your own .service files you are loading
> pulseaudio with the default.pa<http://default.pa> configuration file. This
> you can easily check by seeing if pulseaudio-module-murphy-ivi
> (policy/routing) module is loaded (pactl list modules). Otherwise you might
> be missing some automatic routing stuff... and then I can't help you too much
> :)
> 
> Second, what kind of headset you are trying to connect (wired with separate
> mic and headphones, some phone headset with combined jack, usb,
> bluetooth)?
> As I remember ndis166 has only line in, so no microphone pre-amplifier. So
> with wired headset either you should use external preamp or shout like a
> mad man to hear anything (the levels are _really_ low). Also it might be that
> in ndis166 alsa is not even reporting "mic" to exist, so we are not routing
> there ever. Some phone headset with combined jack will just not work at all
> (the mic part). Could you try connecting usb headset? That's probably the
> easiest input/output device for testing the phone functionality.
> 
> br,
> Jaska
> 
> ________________________________________
> From: IVI [ivi-boun...@lists.tizen.org<mailto:ivi-boun...@lists.tizen.org>]
> on behalf of Podolyak, Zoltan
> [zpodo...@jaguarlandrover.com<mailto:zpodo...@jaguarlandrover.com>]
> Sent: Tuesday, May 13, 2014 9:25 PM
> To: ivi@lists.tizen.org<mailto:ivi@lists.tizen.org>
> Subject: ofono/pulseaudio/bluez5
> 
> Hello Everyone,
> 
> I've been playing around with ofono/pulseaudio/bluez5 recently, trying to
> get audio working over Bluetooth through our HTML5 Phone app. I noticed
> that pulseaudio is currently not started by default so I created a systemctl
> service file to start it up at boot time. My understanding is that currently
> GStreamer starts it somehow through webkit. I'm not sure if there's a better
> solution out there, such as launching it through ofono or something.
> 
> Anyway, the problem I'm having is that even though I hard coded the default
> sink/sources in PA to use the headset (I verified this works by launching the
> Music Player app), Bluetooth audio is always routed through the on-board
> sound card. I'm using an NDiS 166 and this has no on-board microphone that
> we can use for testing.
> 
> I know it's possible to route it through the headset because I had it working
> with some phones last week. However, after playing with DLNA and other
> audio stuff, it seems to be forever stuck on the on-board audio. I tried
> deleting PA settings files and the like, to no avail.
> 
> Does anyone know where the sound source/sink is saved for BT? I'm using
> the newest versions of ofono/pulseaudio. Thanks!
> 
> Regards,
> Zoltan
> ---------------------------------------------------------------------
> Intel Finland Oy
> Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 -
> 4 Domiciled in Helsinki
> 
> This e-mail and any attachments may contain confidential material for the
> sole use of the intended recipient(s). Any review or distribution by others is
> strictly prohibited. If you are not the intended recipient, please contact the
> sender and delete all copies.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> Intel Finland Oy
> Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 -
> 4 Domiciled in Helsinki
> 
> This e-mail and any attachments may contain confidential material for the
> sole use of the intended recipient(s). Any review or distribution by others is
> strictly prohibited. If you are not the intended recipient, please contact the
> sender and delete all copies.
> 
> _______________________________________________
> IVI mailing list
> IVI@lists.tizen.org
> https://lists.tizen.org/listinfo/ivi
Intel Corporation NV/SA
Kings Square, Veldkant 31
2550 Kontich
RPM (Bruxelles) 0415.497.718. 
Citibank, Brussels, account 570/1031255/09

This e-mail and any attachments may contain confidential material for the sole 
use of the intended recipient(s). Any review or distribution by others is 
strictly prohibited. If you are not the intended recipient, please contact the 
sender and delete all copies.

_______________________________________________
IVI mailing list
IVI@lists.tizen.org
https://lists.tizen.org/listinfo/ivi

Reply via email to