Hi Arun, thank you for your answer.

I think that I know whats is the problem, but I don't know why or how to 
resolve, and maybe I don't know if I can explain well with my limited english.

When I raise the volume, the alsamixer shows me the same value, if I lower the 
volume the alsamixer keeps equal, so, the hardware volume of the sound card is 
not modified, obviously that distortion begins when there are some volume, but 
the volume itself don't change, not only in the alsamixer (sound card), the 
audible sound level is the same but with distortion. I think that the volume is 
managed or by the cell phone or pulseaudio but in a programatically way, and 
not setting the waveout volume of the sound card.

Do you understand my explanation?

So, is there any way to avoid volume management or some parameter to manage the 
waveout volume but no alter the wave data?




 

No error nor warning is logged when the distortion occurs, it reminds me a long 
time ago when I was playing with my first wave files to the soundcard
for signed/unsigned or le/be data formats, I'm not saying that is the same 
problem, just the type of noise and the type of problem reminds me to that 
situation, distortion occurs when the volume is at least one point up from the 
minimun.

I just tried mp3 files, single wav files, mono files, 8bits files, all from the 
cell phone, all make the same noise, all works right from the command line.

Here is the log:


Starting log

Sat Aug 13 19:54:58 2016 daemon.info bluetoothd[1182]: Bluetooth daemon 5.30
Sat Aug 13 19:54:58 2016 daemon.info bluetoothd[1182]: Starting SDP server
Sat Aug 13 19:54:58 2016 daemon.info bluetoothd[1182]: Bluetooth management 
interface 1.7 initialized
Sat Aug 13 19:54:58 2016 daemon.err bluetoothd[1182]: Failed to obtain handles 
for "Service Changed" characteristic
Sat Aug 13 19:54:58 2016 daemon.info bluetoothd[1182]: Not starting 
LEAdvertisingManager, LE not supported
Sat Aug 13 19:54:58 2016 daemon.err bluetoothd[1182]: Not enough free handles 
to register service
Sat Aug 13 19:54:58 2016 daemon.err bluetoothd[1182]: Error adding Link Loss 
service
Sat Aug 13 19:54:58 2016 daemon.err bluetoothd[1182]: Not enough free handles 
to register service
Sat Aug 13 19:54:58 2016 daemon.err bluetoothd[1182]: Not enough free handles 
to register service
Sat Aug 13 19:54:58 2016 daemon.err bluetoothd[1182]: Not enough free handles 
to register service
Sat Aug 13 19:54:58 2016 daemon.err bluetoothd[1182]: Current Time Service 
could not be registered
Sat Aug 13 19:54:58 2016 daemon.err bluetoothd[1182]: gatt-time-server: 
Input/output error (5)
Sat Aug 13 19:54:58 2016 daemon.err bluetoothd[1182]: Not enough free handles 
to register service
Sat Aug 13 19:54:58 2016 daemon.err bluetoothd[1182]: Not enough free handles 
to register service
Sat Aug 13 19:54:58 2016 daemon.err bluetoothd[1182]: Sap driver initialization 
failed.
Sat Aug 13 19:54:58 2016 daemon.err bluetoothd[1182]: sap-server: Operation not 
permitted (1)
Sat Aug 13 19:55:04 2016 daemon.err pulseaudio[1199]: W: [pulseaudio] main.c: 
Running in system mode, but --disallow-exit not set.
Sat Aug 13 19:55:04 2016 daemon.err pulseaudio[1199]: W: [pulseaudio] main.c: 
Running in system mode, but --disallow-module-loading not set.
Sat Aug 13 19:55:04 2016 daemon.err pulseaudio[1199]: N: [pulseaudio] main.c: 
Running in system mode, forcibly disabling exit idle time.
Sat Aug 13 19:55:04 2016 daemon.err pulseaudio[1199]: W: [pulseaudio] main.c: 
OK, so you are running PA in system mode. Please note that you most likely 
shouldn't be doing that.
Sat Aug 13 19:55:04 2016 daemon.err pulseaudio[1199]: W: [pulseaudio] main.c: 
If you do it nonetheless then it's your own fault if things don't work as 
expected.
Sat Aug 13 19:55:04 2016 daemon.err pulseaudio[1199]: W: [pulseaudio] main.c: 
Please read 
http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/
 for an explanation why system mode is usually a bad idea.
Sat Aug 13 19:55:04 2016 daemon.err pulseaudio[1199]: W: [pulseaudio] module.c: 
module-detect is deprecated: Please use module-udev-detect instead of 
module-detect!
Sat Aug 13 19:55:04 2016 daemon.err pulseaudio[1199]: W: [pulseaudio] 
authkey.c: Failed to open cookie file '/var/run/pulse/.config/pulse/cookie': No 
such file or directory
Sat Aug 13 19:55:04 2016 daemon.err pulseaudio[1199]: W: [pulseaudio] 
authkey.c: Failed to load authentication key 
'/var/run/pulse/.config/pulse/cookie': No such file or directory
Sat Aug 13 19:55:04 2016 daemon.err pulseaudio[1199]: W: [pulseaudio] 
authkey.c: Failed to open cookie file '/var/run/pulse/.pulse-cookie': No such 
file or directory
Sat Aug 13 19:55:04 2016 daemon.err pulseaudio[1199]: W: [pulseaudio] 
authkey.c: Failed to load authentication key '/var/run/pulse/.pulse-cookie': No 
such file or directory
Sat Aug 13 19:55:04 2016 daemon.info bluetoothd[1182]: Endpoint registered: 
sender=:1.1 path=/MediaEndpoint/A2DPSource
Sat Aug 13 19:55:04 2016 daemon.info bluetoothd[1182]: Endpoint registered: 
sender=:1.1 path=/MediaEndpoint/A2DPSink
Sat Aug 13 19:57:22 2016 kern.info kernel: [  405.060000] input: 
D8:47:B0:43:DD:12 as /devices/virtual/input/input0


Start playing from cell phone


Sat Aug 13 19:58:19 2016 daemon.info bluetoothd[1182]: 
/org/bluez/hci0/dev_D8_47_B0_43_DD_12/fd0: fd(22) ready


After some seconds, but nothing changes

Sat Aug 13 19:59:59 2016 daemon.err pulseaudio[1199]: E: [alsa-sink-USB Audio] 
alsa-sink.c: ALSA woke us up to write new data to the device, but there was 
actually nothing to write.
Sat Aug 13 19:59:59 2016 daemon.err pulseaudio[1199]: E: [alsa-sink-USB Audio] 
alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_usb_audio'. 
Please report this issue to the ALSA developers.
Sat Aug 13 19:59:59 2016 daemon.err pulseaudio[1199]: E: [alsa-sink-USB Audio] 
alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent 
snd_pcm_avail() returned 0 or another value < min_avail.

Another song is playing, nothing changes, nothing is logged.
Another song is playing, nothing changes, nothing is logged.



Regards
Luis



--------------------------------------------
On Mon, 7/25/16, Arun Raghavan <[email protected]> wrote:

 Subject: Re: [pulseaudio-discuss] Pulseaudio bluetooth sink problems
 To: "General PulseAudio Discussion" <[email protected]>
 Date: Monday, July 25, 2016, 12:57 AM
 
 
 
 On
 Mon, 27 Jun 2016, at 12:33 PM, backup luis wrote:
 > After days compiling and trying different
 configurations and versions
 > with the
 bluez stack,
 > I got pulseaudio running
 in a tiny router with OpenWrt, but not very
 > well, the sound
 > get
 some distortion, stops, echo, delay, chop and so on...
 > 
 > Anyway, I know that
 is a very limited hardware for my needs, but I need
 > to resolve one specific
 > problem because if I can resolve it I will
 buy a better hardware for my
 >
 project.
 > 
 > When I
 play a song from the cell phone, if the sound level of the
 song is
 > low, what I hear is almost
 > perfect, but if the sound level rise, by
 the song itself or if I rise the
 > volume
 in the cell phone
 > the sound get very
 distorted, I check sink and output volumes in the
 > pulseaudio, testing from 1% to 100%
 > and nothing changes, only the level of the
 audio card output, but the
 > distortion
 persist. Testing the same
 > sound/songs
 in mp3 and wav formats.
 > And when I try
 to play with an old Nokia phone, I only ear noise, like
 > white noise regardless of the volume,
 this
 > noise is constant, not like a
 distorted sound.
 > 
 >
 
 > Pulseaudio: 6.00, 6.22.9 and 8.99.2
 compiled for dbus
 > Bluez: 5.30
 > Cell Phone: Android
 >
 Old Cell Phone: Nokia
 > 
 > 
 > 
 > paplay with some wav files sounds good.
 > the sound board and the router is running
 well with another programs like
 >
 madplay, alsamixer, mpd.
 
 That is quite odd. Do you see anything in
 PulseAudio logs when the
 distortion
 occurs?
 
 -- Arun
 _______________________________________________
 pulseaudio-discuss mailing list
 [email protected]
 https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
 
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to