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:[email protected]] On Behalf Of Podolyak, Zoltan
Sent: Wednesday, May 14, 2014 9:16 AM
To: [email protected]
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 
<[email protected]<mailto:[email protected]>> 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 [[email protected]<mailto:[email protected]>] on 
behalf of Podolyak, Zoltan 
[[email protected]<mailto:[email protected]>]
Sent: Tuesday, May 13, 2014 9:25 PM
To: [email protected]<mailto:[email protected]>
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.


_______________________________________________
IVI mailing list
[email protected]
https://lists.tizen.org/listinfo/ivi

Reply via email to