ABDUL MOIZ | 1 Aug 2011 11:21
Picon

Re: Need help to enable echo cancel in pulseaudio

Hi,

        I am able to load module-echo-cancel on my omap4 pandaboard only after unloading module-suspend-on-idle, then again I am loading back the module-suspend-on-idle.

when I change the default sink to echo-cancel sink,the pipeline

gst-launch alsasrc ! alsasink

is working fine.

But when i change the default source to echo-cancel, and run the above pipeline, I am getting the following log


Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
WARNING: from element /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: Can't record audio fast enough
Additional debug info:
gstbaseaudiosrc.c(822): gst_base_audio_src_create (): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:
Dropped 331840 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.
WARNING: from element /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: Can't record audio fast enough
Additional debug info:
gstbaseaudiosrc.c(822): gst_base_audio_src_create (): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:
Dropped 9071440 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.
WARNING: from element /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: Can't record audio fast enough
Additional debug info:
gstbaseaudiosrc.c(822): gst_base_audio_src_create (): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:
Dropped 135515040 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.


And the daemon is getting killed and cpu usage is showing above 170%.

Can you please help me in

1. How module-echo-cancel is dependent on module-suspend-on-idle and how to load both the modules in default.pa file

2.Why the above gst pipeline is not working and daemon is getting killed.


Regards,
Abdul Moiz



On Wed, Jul 27, 2011 at 5:38 PM, Alexander E. Patrakov <patrakov <at> gmail.com> wrote:
ABDUL MOIZ wrote:

> open("/usr/etc/pulse/daemon.conf",

OK, this explains everything. Pulseaudio looks at the wrong config file,
that's why your cpu-limit setting had no effect. The /usr/etc directory
is even forbidden according to the FHS standard.

Please rebuild pulseaudio so that it looks at /etc/pulse/daemon.conf:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-
udev-rules-dir=/lib/udev/rules.d


--
Alexander E. Patrakov

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
David Henningsson | 1 Aug 2011 14:13
Favicon

Re: [PATCH] alsa-mixer: Fix element_is_subset().

On 2011-07-22 19:20, Tanu Kaskinen wrote:
> Untested code, don't commit willy-nilly... I'll be away for
> the weekend, and I thought I'd already send this patch for
> review. I'll test this some day next week.

I've made a quick code review (no real testing). I think most of it 
looks good.

> element_change_off_and_zero_to_constant() is introduced to
> make the volume subset checking easier. element_dB_to_step and
> element_alsa_dB_to_step help with getting the step for 0 dB
> without tons of annoying ifs. They could probably be used also
> elsewhere in the code, but I'll do that cleanup later.

As well as cleanup all PA_ALSA_VOLUME_OFF and PA_ALSA_VOLUME_ZERO usages.

> Colin, there are also a couple of questions for you in the
> comments.

I agree with the comments. Although not removing a redundant path is 
less bad than removing something that should not be removed, so I'm okay 
with marking them as FIXME's for the time being.

> ---
>   src/modules/alsa/alsa-mixer.c |  132 ++++++++++++++++++++++++++++++-----------
>   1 files changed, 96 insertions(+), 36 deletions(-)
>
> diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
> index f6a2a20..8f1fb4a 100644
> --- a/src/modules/alsa/alsa-mixer.c
> +++ b/src/modules/alsa/alsa-mixer.c
>  <at>  <at>  -1344,6 +1344,82  <at>  <at>  static int check_required(pa_alsa_element *e, snd_mixer_elem_t *me) {
>       return 0;
>   }
>
> +static int element_alsa_dB_to_step(pa_alsa_element *e, snd_mixer_elem_t *me, long *dB, long
*step) {
> +    int r;
> +
> +    pa_assert(e);
> +    pa_assert(me);
> +    pa_assert(dB);
> +    pa_assert(step);
> +
> +    if (e->direction == PA_ALSA_DIRECTION_OUTPUT) {
> +        if ((r = snd_mixer_selem_ask_playback_dB_vol(me, *dB, +1, step))>= 0) {
> +            *step = (e->volume_limit>= 0) ? PA_MIN(*step, e->volume_limit) : *step;

But can't volume_limit can be less than zero and still valid?

> +
> +            if ((r = snd_mixer_selem_ask_playback_vol_dB(me, *step, dB)<  0)) {
> +                pa_log("snd_mixer_selem_ask_playback_vol_dB() failed: %s", pa_alsa_strerror(r));
> +                return -1;
> +            }

Nitpick: could be worth adding a comment about why you need to ask first 
dB -> vol and then vol -> dB again,

> +        } else {
> +            pa_log("snd_mixer_selem_ask_playback_dB_vol() failed: %s", pa_alsa_strerror(r));
> +            return -1;
> +        }
> +    } else {
> +        if ((r = snd_mixer_selem_ask_capture_dB_vol(me, *dB, -1, step))>= 0) {
> +            *step = (e->volume_limit>= 0) ? PA_MIN(*step, e->volume_limit) : *step;
> +
> +            if ((r = snd_mixer_selem_ask_capture_vol_dB(me, *step, dB)<  0)) {
> +                pa_log("snd_mixer_selem_ask_capture_vol_dB() failed: %s", pa_alsa_strerror(r));
> +                return -1;
> +            }
> +        } else {
> +            pa_log("snd_mixer_selem_ask_capture_dB_vol() failed: %s", pa_alsa_strerror(r));
> +            return -1;
> +        }
> +    }
> +
> +    return 0;
> +}
> +
> +static int element_dB_to_step(pa_alsa_element *e, snd_mixer_elem_t *me, long *dB, long *step) {
> +    pa_assert(e);
> +    pa_assert(me);
> +    pa_assert(dB);
> +    pa_assert(step);
> +
> +    if (e->db_fix) {
> +        int rounding = (e->direction == PA_ALSA_DIRECTION_OUTPUT) ? +1 : -1;
> +
> +        *step = decibel_fix_get_step(e->db_fix, dB, rounding);
> +        return 0;
> +    }
> +
> +    return element_alsa_dB_to_step(e, me, dB, step);
> +}
> +
> +/* If element's volume_use is OFF or ZERO, it's changed to CONSTANT.
> + * If a problem occurs with alsa while doing this, volume_use will be
> + * changed to IGNORE. */
> +static void element_change_off_and_zero_to_constant(pa_alsa_element *e, snd_mixer_elem_t *me) {
> +    pa_assert(e);
> +    pa_assert(me);
> +
> +    if (e->volume_use == PA_ALSA_VOLUME_OFF) {
> +        e->volume_use = PA_ALSA_VOLUME_CONSTANT;
> +        e->constant_volume = e->min_volume;
> +        return;
> +    }
> +
> +    if (e->volume_use == PA_ALSA_VOLUME_ZERO) {
> +        long dB = 0;
> +        if (element_dB_to_step(e, me,&dB,&e->constant_volume)<  0) {
> +            pa_log("Failed to query element's volume step for 0 dB. Ignoring volume for element %s.", e->alsa_name);
> +            e->volume_use = PA_ALSA_VOLUME_IGNORE;
> +        } else
> +            e->volume_use = PA_ALSA_VOLUME_CONSTANT;
> +    }
> +}
> +
>   static int element_probe(pa_alsa_element *e, snd_mixer_t *m) {
>       snd_mixer_selem_id_t *sid;
>       snd_mixer_elem_t *me;
>  <at>  <at>  -1627,9 +1703,10  <at>  <at>  static int element_probe(pa_alsa_element *e, snd_mixer_t *m) {
>                   }
>               }
>           }
> -
>       }
>
> +    element_change_off_and_zero_to_constant(e, me);
> +
>       if (e->switch_use == PA_ALSA_SWITCH_SELECT) {
>           pa_alsa_option *o;
>
>  <at>  <at>  -2922,54 +2999,31  <at>  <at>  static pa_bool_t element_is_subset(pa_alsa_element *a, pa_alsa_element *b, snd_m
>
>       /* Check the volume_use */
>       if (a->volume_use != PA_ALSA_VOLUME_IGNORE) {
> +        if (b->volume_use == PA_ALSA_VOLUME_IGNORE)
> +            return FALSE;
> +
> +        /* ZERO and OFF should have been changed into CONSTANT
> +         * while probing the elements. */
> +        pa_assert(a->volume_use == PA_ALSA_VOLUME_MERGE || a->volume_use == PA_ALSA_VOLUME_CONSTANT);
> +        pa_assert(b->volume_use == PA_ALSA_VOLUME_MERGE || b->volume_use == PA_ALSA_VOLUME_CONSTANT);
>
>           /* "Constant" is subset of "Constant" only when their constant values are equal */
>           if (a->volume_use == PA_ALSA_VOLUME_CONSTANT&&  b->volume_use == PA_ALSA_VOLUME_CONSTANT&& 
a->constant_volume != b->constant_volume)
>               return FALSE;
>
> -        /* Different volume uses when b is not "Merge" means we are definitely not a subset */
> -        if (a->volume_use != b->volume_use&&  b->volume_use != PA_ALSA_VOLUME_MERGE)
> +        /* "Merge" is never a subset of "Constant" */
> +        if (a->volume_use == PA_ALSA_VOLUME_MERGE&&  b->volume_use == PA_ALSA_VOLUME_CONSTANT)
>               return FALSE;
>
>           /* "Constant" is a subset of "Merge", if there is not a "volume-limit" in "Merge" below the actual constant.
> -         * "Zero" and "Off" are just special cases of "Constant" when comparing to "Merge"
>            * "Merge" with a "volume-limit" is a subset of "Merge" without a "volume-limit" or with a higher
"volume-limit" */
>           if (b->volume_use == PA_ALSA_VOLUME_MERGE&&  b->volume_limit>= 0) {
>               long a_limit;
>
>               if (a->volume_use == PA_ALSA_VOLUME_CONSTANT)
>                   a_limit = a->constant_volume;
> -            else if (a->volume_use == PA_ALSA_VOLUME_ZERO) {
> -                long dB = 0;
> -
> -                if (a->db_fix) {
> -                    int rounding = (a->direction == PA_ALSA_DIRECTION_OUTPUT ? +1 : -1);
> -                    a_limit = decibel_fix_get_step(a->db_fix,&dB, rounding);
> -                } else {
> -                    snd_mixer_selem_id_t *sid;
> -                    snd_mixer_elem_t *me;
> -
> -                    SELEM_INIT(sid, a->alsa_name);
> -                    if (!(me = snd_mixer_find_selem(m, sid))) {
> -                        pa_log_warn("Element %s seems to have disappeared.", a->alsa_name);
> -                        return FALSE;
> -                    }
> -
> -                    if (a->direction == PA_ALSA_DIRECTION_OUTPUT) {
> -                        if (snd_mixer_selem_ask_playback_dB_vol(me, dB, +1,&a_limit)<  0)
> -                            return FALSE;
> -                    } else {
> -                        if (snd_mixer_selem_ask_capture_dB_vol(me, dB, -1,&a_limit)<  0)
> -                            return FALSE;
> -                    }
> -                }
> -            } else if (a->volume_use == PA_ALSA_VOLUME_OFF)
> -                a_limit = a->min_volume;
> -            else if (a->volume_use == PA_ALSA_VOLUME_MERGE)
> -                a_limit = a->volume_limit;
>               else
> -                /* This should never be reached */
> -                pa_assert(FALSE);
> +                a_limit = a->volume_limit;
>
>               if (a_limit>  b->volume_limit)
>                   return FALSE;
>  <at>  <at>  -2977,6 +3031,9  <at>  <at>  static pa_bool_t element_is_subset(pa_alsa_element *a, pa_alsa_element *b, snd_m
>       }
>
>       if (a->switch_use != PA_ALSA_SWITCH_IGNORE) {
> +        if (b->switch_use == PA_ALSA_SWITCH_IGNORE)
> +            return FALSE;
> +
>           /* "On" is a subset of "Mute".
>            * "Off" is a subset of "Mute".
>            * "On" is a subset of "Select", if there is an "Option:On" in B.
>  <at>  <at>  -3022,9 +3079,8  <at>  <at>  static void path_set_condense(pa_alsa_path_set *ps, snd_mixer_t *m) {
>       if (!ps->paths || !ps->paths->next)
>           return;
>
> -    for (p = ps->paths; p; p = np) {
> +    PA_LLIST_FOREACH_SAFE(p, np, ps->paths) {
>           pa_alsa_path *p2;
> -        np = p->next;
>
>           PA_LLIST_FOREACH(p2, ps->paths) {
>               pa_alsa_element *ea, *eb;
>  <at>  <at>  -3043,6 +3099,8  <at>  <at>  static void path_set_condense(pa_alsa_path_set *ps, snd_mixer_t *m) {
>                           ea = ea->next;
>                           eb = eb->next;
>                           if ((ea&&  !eb) || (!ea&&  eb))
> +                            /* Question to Colin: Do we really want to require that p and p2 contain an equal amount of elements to
consider p a subset of p2?
> +                             * Isn't it enough if p2 contains all elements of p? */
>                               is_subset = FALSE;
>                           else if (!ea&&  !eb)
>                               break;
>  <at>  <at>  -3050,6 +3108,8  <at>  <at>  static void path_set_condense(pa_alsa_path_set *ps, snd_mixer_t *m) {
>                           is_subset = FALSE;
>
>                   } else
> +                    /* Question to Colin: Do we really want to require that p and p2 contain their elements in the exact same order?
> +                     * Is there a guarantee for that? (I haven't inspected the code that closely.) */
>                       is_subset = FALSE;
>               }
>

--

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
Frederik Vogelsang | 1 Aug 2011 14:38

Automatically switch profiles depeding on the number of input-channels

Hi,

I'd like to know how I can dynamically switch between profiles
depending on the number of audio channels of the file being played.

My output-sink currently has two profiles:
* Digital Stereo Output
* 5.1 AC3 Output

Now I'd like to use the Stereo Output for normal PCM sources and the
5.1 Output for multichannel sources. Is there a way to do that with
PulseAudio?

With pure ALSA this can be done easily with the definition of a
"pcm.!surround51"-device in the .asoundrc, but I'd like to use
PulseAudio for obvious reasons.

Best regards,
Frederik
Vallabha Hampiholi | 1 Aug 2011 15:42

Starting PulseAudio using SystemD

Hello All,
 
Can anyone point me to the exact steps to be followed to start PulseAudio using SystemD?
 
-Rgds
Vallabha
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Vallabha Hampiholi | 1 Aug 2011 15:48

Glitch-Free Mode

Hello Experts,
 
I got the attached log when running PulseAudio 0.9.22 in glitch free mode.
But then I see the following logs in the trace!!
 
I: source.c: Created source 0 "alsa_output.hw_0.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: source.c:     device.description = "Monitor of TI81XX EVM"
I: source.c:     device.class = "monitor"
I: source.c:     device.icon_name = "audio-input-microphone"
I: alsa-sink.c: Using 16.0 fragments of size 8192 bytes (46.44ms), buffer size is 131072 bytes (743.04ms)
I: alsa-sink.c: Time scheduling watermark is 20.00ms
D: alsa-sink.c: hwbuf_unused=0
D: alsa-sink.c: setting avail_min=31886
D: alsa-util.c: snd_pcm_dump():
 
My understanding was that when glitch free mode is enabled the NFRAGS of alsa hardware is reduced to minimum in order to reduce the IRQ's.
 
But as seen from the logs the NFRAGS is at pretty high value of 16. Is this behaviour OK??
 
Is there something I need to do extra?
 
-Rgds
Vallabha
N: main.c: Running in system mode, forcibly disabling SHM mode!
N: main.c: Running in system mode, forcibly disabling exit idle time!
D: core-rtclock.c: Timer slack is set to 50 us.
D: core-util.c: setpriority() worked.
I: core-util.c: Successfully gained nice level -11.
I: main.c: Found user 'pulse' (UID 109) and group 'pulse' (GID 114).
W: main.c: Home directory of user 'pulse' is not '/var/run/pulse', ignoring.
I: main.c: Successfully dropped root privileges.
I: main.c: This is PulseAudio 0.9.22
D: main.c: Compilation host: arm-none-linux-gnueabi
D: main.c: Compilation CFLAGS: -fexpensive-optimizations -fomit-frame-pointer -frename-registers
-O2 -Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings
-Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security
-Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self
-Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes
-Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels
-Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math
-Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
D: main.c: Running on host: Linux armv7l 2.6.37-rc3 #1 Wed Jul 27 09:55:12 IST 2011
D: main.c: Found 1 CPUs.
I: main.c: Page size is 4096 bytes
D: main.c: Compiled with Valgrind support: no
D: main.c: Running in valgrind mode: no
D: main.c: Running in VM: no
D: main.c: Optimized build: yes
D: main.c: All asserts enabled.
I: main.c: Machine ID is 89908ad0f00641e5ec7d87d200000002.
I: main.c: Using runtime directory /var/run/pulse.
I: main.c: Using state directory /var/lib/pulse.
I: main.c: Using modules directory /usr/lib/pulse-0.9.22/modules.
I: main.c: Running in system mode: yes
W: main.c: OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that.
W: main.c: If you do it nonetheless then it's your own fault if things don't work as expected.
W: main.c: Please read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an explanation why
system mode is usually a bad idea.
W: pid.c: Stale PID file, overwriting.
I: main.c: Fresh high-resolution timers available! Bon appetit!
I: cpu-arm.c: CPU flags: V6 V7 VFP EDSP NEON VFPV3 
I: svolume_arm.c: Initialising ARM optimized functions.
D: memblock.c: Using private memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB,
maximum usable slot size is 65496
D: alsa-util.c: Trying hw:0 with SND_PCM_NO_AUTO_FORMAT ...
D: alsa-util.c: Managed to open hw:0
D: alsa-util.c: Maximum hw buffer size is 743 ms
D: alsa-util.c: Set buffer size first (to 88200 samples), period size second (to 88200 samples).
I: alsa-sink.c: Successfully opened device hw:0.
I: alsa-sink.c: Successfully enabled mmap() mode.
I: alsa-sink.c: Successfully enabled timer-based scheduling mode.
I: sink.c: Created sink 0 "alsa_output.hw_0" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: sink.c:     alsa.resolution_bits = "16"
I: sink.c:     device.api = "alsa"
I: sink.c:     device.class = "sound"
I: sink.c:     alsa.class = "generic"
I: sink.c:     alsa.subclass = "generic-mix"
I: sink.c:     alsa.name = ""
I: sink.c:     alsa.id = "AIC3X tlv320aic3x-hifi-0"
I: sink.c:     alsa.subdevice = "0"
I: sink.c:     alsa.subdevice_name = "subdevice #0"
I: sink.c:     alsa.device = "0"
I: sink.c:     alsa.card = "0"
I: sink.c:     alsa.card_name = "TI81XX EVM"
I: sink.c:     alsa.long_card_name = "TI81XX EVM"
I: sink.c:     device.bus_path = "platform-soc-audio.0"
I: sink.c:     sysfs.path = "/devices/platform/soc-audio.0/sound/card0"
I: sink.c:     device.string = "hw:0"
I: sink.c:     device.buffering.buffer_size = "131072"
I: sink.c:     device.buffering.fragment_size = "8192"
I: sink.c:     device.access_mode = "mmap+timer"
I: sink.c:     device.description = "TI81XX EVM"
I: sink.c:     device.icon_name = "audio-card"
I: source.c: Created source 0 "alsa_output.hw_0.monitor" with sample spec s16le 2ch 44100Hz and channel
map front-left,front-right
I: source.c:     device.description = "Monitor of TI81XX EVM"
I: source.c:     device.class = "monitor"
I: source.c:     device.icon_name = "audio-input-microphone"
I: alsa-sink.c: Using 16.0 fragments of size 8192 bytes (46.44ms), buffer size is 131072 bytes (743.04ms)
I: alsa-sink.c: Time scheduling watermark is 20.00ms
D: alsa-sink.c: hwbuf_unused=0
D: alsa-sink.c: setting avail_min=31886
D: alsa-util.c: snd_pcm_dump():
D: alsa-util.c: Hardware PCM card 0 'TI81XX EVM' device 0 subdevice 0
D: alsa-util.c: Its setup is:
D: alsa-util.c:   stream       : PLAYBACK
D: alsa-util.c:   access       : MMAP_INTERLEAVED
D: alsa-util.c:   format       : S16_LE
D: alsa-util.c:   subformat    : STD
D: alsa-util.c:   channels     : 2
D: alsa-util.c:   rate         : 44100
D: alsa-util.c:   exact rate   : 44100 (44100/1)
D: alsa-util.c:   msbits       : 16
D: alsa-util.c:   buffer_size  : 32768
D: alsa-util.c:   period_size  : 2048
D: alsa-util.c:   period_time  : 46439
D: alsa-util.c:   tstamp_mode  : ENABLE
D: alsa-util.c:   period_step  : 1
D: alsa-util.c:   avail_min    : 31886
D: alsa-util.c:   period_event : 0
D: alsa-util.c:   start_threshold  : -1
D: alsa-util.c:   stop_threshold   : 1073741824
D: alsa-util.c:   silence_threshold: 0
D: alsa-util.c:   silence_size : 0
D: alsa-util.c:   boundary     : 1073741824
D: alsa-util.c:   appl_ptr     : 0
D: alsa-util.c:   hw_ptr       : 0
D: alsa-sink.c: Thread starting up
D: core-util.c: SCHED_RR|SCHED_RESET_ON_FORK worked.
I: core-util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
I: alsa-sink.c: Starting playback.
D: alsa-sink.c: Cutting sleep time for the initial iterations by half.
D: alsa-sink.c: Cutting sleep time for the initial iterations by half.
D: alsa-sink.c: Cutting sleep time for the initial iterations by half.
I: module.c: Loaded "module-alsa-sink" (index: #0; argument: "device=hw:0").
I: module.c: Loaded "module-native-protocol-unix" (index: #1; argument: "auth-anonymous=1").
I: module.c: Loaded "module-always-sink" (index: #2; argument: "").
D: dbus-util.c: Successfully connected to D-Bus system bus ec9628d92c466a4721584eb100000004 as :1.5
W: main.c: Failed to acquire org.pulseaudio.Server: org.freedesktop.DBus.Error.AccessDenied:
Connection ":1.5" is not allowed to own the service "org.pulseaudio.Server" due to security policies in
the configuration file
I: main.c: Daemon startup complete.
I: client.c: Created 0 "Native client (UNIX socket client)"
I: protocol-native.c: Client authenticated anonymously.
D: protocol-native.c: Protocol version: remote 16, local 16
D: protocol-native.c: SHM possible: no
D: protocol-native.c: Negotiated SHM: no
D: memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=4, prebuf=0,
minreq=4 maxrewind=0
I: sink-input.c: Created input 0 "Playback Stream" on alsa_output.hw_0 with sample spec s16le 2ch
44100Hz and channel map front-left,front-right
I: sink-input.c:     media.name = "Playback Stream"
I: sink-input.c:     application.name = "gst-launch-0.10"
I: sink-input.c:     native-protocol.peer = "UNIX socket client"
I: sink-input.c:     native-protocol.version = "16"
I: sink-input.c:     application.process.id = "740"
I: sink-input.c:     application.process.user = "root"
I: sink-input.c:     application.process.host = "omap3evm"
I: sink-input.c:     application.process.binary = "gst-launch-0.10"
I: sink-input.c:     application.language = "C"
I: sink-input.c:     application.process.machine_id = "89908ad0f00641e5ec7d87d200000002"
I: protocol-native.c: Requested tlength=4997.73 ms, minreq=24.99 ms
D: protocol-native.c: Traditional mode enabled, modifying sink usec only for compat with minreq.
D: memblockq.c: memblockq requested: maxlength=1763200, tlength=881600, base=4, prebuf=877192,
minreq=4408 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=1763200, tlength=881600, base=4, prebuf=877192,
minreq=4408 maxrewind=0
I: protocol-native.c: Final latency 5740.77 ms = 4947.76 ms + 2*24.99 ms + 743.04 ms
D: alsa-sink.c: Latency set to 743.04ms
D: alsa-sink.c: hwbuf_unused=4
D: alsa-sink.c: setting avail_min=31887
D: alsa-sink.c: Requesting rewind due to latency change.
D: alsa-sink.c: Requested to rewind 131072 bytes.
D: alsa-sink.c: Limited to 130528 bytes.
D: alsa-sink.c: before: 32632
D: alsa-sink.c: after: 32632
D: alsa-sink.c: Rewound 130528 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 130528 bytes on render memblockq.
D: source.c: Processing rewind...
D: protocol-native.c: Requesting rewind due to end of underrun.
D: alsa-sink.c: Requested to rewind 131072 bytes.
D: alsa-sink.c: Limited to 100384 bytes.
D: alsa-sink.c: before: 25096
D: alsa-sink.c: after: 25096
D: alsa-sink.c: Rewound 100384 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 100384 bytes on render memblockq.
D: source.c: Processing rewind...
I: client.c: Created 1 "Native client (UNIX socket client)"
I: protocol-native.c: Client authenticated anonymously.
D: protocol-native.c: Protocol version: remote 16, local 16
D: protocol-native.c: SHM possible: no
D: protocol-native.c: Negotiated SHM: no
I: resampler.c: Using resampler 'speex-float-3'
I: resampler.c: Using float32le as working format.
I: resampler.c: Choosing speex quality setting 3.
D: memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=4, prebuf=0,
minreq=4 maxrewind=0
I: sink-input.c: Created input 1 "Playback Stream" on alsa_output.hw_0 with sample spec s16le 2ch 8000Hz
and channel map front-left,front-right
I: sink-input.c:     media.name = "Playback Stream"
I: sink-input.c:     application.name = "gst-launch-0.10"
I: sink-input.c:     native-protocol.peer = "UNIX socket client"
I: sink-input.c:     native-protocol.version = "16"
I: sink-input.c:     application.process.id = "745"
I: sink-input.c:     application.process.user = "root"
I: sink-input.c:     application.process.host = "omap3evm"
I: sink-input.c:     application.process.binary = "gst-launch-0.10"
I: sink-input.c:     application.language = "C"
I: sink-input.c:     application.process.machine_id = "89908ad0f00641e5ec7d87d200000002"
I: protocol-native.c: Requested tlength=5000.00 ms, minreq=25.00 ms
D: protocol-native.c: Traditional mode enabled, modifying sink usec only for compat with minreq.
D: memblockq.c: memblockq requested: maxlength=320000, tlength=160000, base=4, prebuf=159200,
minreq=800 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=320000, tlength=160000, base=4, prebuf=159200,
minreq=800 maxrewind=0
I: protocol-native.c: Final latency 5743.04 ms = 4950.00 ms + 2*25.00 ms + 743.04 ms
D: alsa-sink.c: Latency set to 743.04ms
D: alsa-sink.c: hwbuf_unused=4
D: alsa-sink.c: setting avail_min=31887
D: protocol-native.c: Requesting rewind due to end of underrun.
D: alsa-sink.c: Requested to rewind 131072 bytes.
D: alsa-sink.c: Limited to 69740 bytes.
D: alsa-sink.c: before: 17435
D: alsa-sink.c: after: 17435
D: alsa-sink.c: Rewound 69740 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 69740 bytes on render memblockq.
D: sink-input.c: Have to rewind 69740 bytes on render memblockq.
D: source.c: Processing rewind...
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Arun Raghavan | 1 Aug 2011 16:03
Picon

Re: Need help to enable echo cancel in pulseaudio

Hi,

On Mon, 2011-08-01 at 14:51 +0530, ABDUL MOIZ wrote:
[...]
> Additional debug info:
> gstbaseaudiosrc.c(822): gst_base_audio_src_create
> (): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:
> Dropped 135515040 samples. This is most likely because downstream
> can't keep up and is consuming samples too slowly.
> 
> 
> And the daemon is getting killed and cpu usage is showing above 170%.
> 
> Can you please help me in

Given the messages about the machine not being able to keep up, I
believe there must be some sort of serious misconfiguration of your
system (bad kernel? bad clocking?), because PulseAudio runs just fine on
much less powerful hardware.

> 1. How module-echo-cancel is dependent on module-suspend-on-idle and
> how to load both the modules in default.pa file

It's not.

> 2.Why the above gst pipeline is not working and daemon is getting
> killed.

It should work fine anyway, but why are you using alsasrc/alsasink
instead of pulsesrc/pulsesink?

-- Arun
pl bossart | 1 Aug 2011 17:12
Picon

Re: Glitch-Free Mode

> I: alsa-sink.c: Using 16.0 fragments of size 8192 bytes (46.44ms), buffer
> I: alsa-sink.c: Time scheduling watermark is 20.00ms

I indicated last week that this setting is not ok.
Either you are setting the number of fragments to a ridiculously high
value in daemon.conf, or your hardware cannot handle longer periods.
Either way, you will end-up with an audio interrupt rate that is
inconsistent with the latency settings you have specified; a ~5s
latency isn't going to help at all if the alsa interrupts occur every
46ms.
I know that the OMAP drivers were updated to remove these ALSA
interrupts completely (need kernel 2.6.38+), this is something you may
want to look into to remove audio wakes
-Pierre
Vallabha Hampiholi | 1 Aug 2011 18:11

Re: Glitch-Free Mode

Hello Pierre,
 
I have not tweaked around with the daemon conf file. The fragments and its size are set to 4 and 25ms respectively.
 
So what does "your hardware cannot handle longer periods" mean?  Would this mean I would encounter the issue even if I updated the ALSA driver?
 
Please suggest the ALSA driver version that I should be using.
 
Thanks a lot for your valuable feedback.
 
-Rgds
Vallabha

On Mon, Aug 1, 2011 at 8:42 PM, pl bossart <bossart.nospam <at> gmail.com> wrote:
> I: alsa-sink.c: Using 16.0 fragments of size 8192 bytes (46.44ms), buffer
> I: alsa-sink.c: Time scheduling watermark is 20.00ms

I indicated last week that this setting is not ok.
Either you are setting the number of fragments to a ridiculously high
value in daemon.conf, or your hardware cannot handle longer periods.
Either way, you will end-up with an audio interrupt rate that is
inconsistent with the latency settings you have specified; a ~5s
latency isn't going to help at all if the alsa interrupts occur every
46ms.
I know that the OMAP drivers were updated to remove these ALSA
interrupts completely (need kernel 2.6.38+), this is something you may
want to look into to remove audio wakes
-Pierre
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Tanu Kaskinen | 1 Aug 2011 18:51
Picon
Picon
Favicon
Gravatar

Re: Starting PulseAudio using SystemD

On Mon, 2011-08-01 at 19:12 +0530, Vallabha Hampiholi wrote:
> Hello All,
> 
> Can anyone point me to the exact steps to be followed to start PulseAudio
> using SystemD?

Could you be more specific? Are you planning to run Pulseaudio in the
system-wide mode or in the per-user mode? In per-user mode I don't think
there's anything special in systemd - per-user daemons are not handled
by the init program, be it SysV init or systemd or anything else.

If you plan to use the system-wide mode, then perhaps someone can tell
how they have set up their system-wide Pulseaudio in a systemd-based
environment. It's entirely possible that nobody has done that yet,
though, given that systemd is a new thing and the system-wide mode is
recommended against. Have you read the systemd documentation, though?
I'd imagine that it's not rocket science to write the needed
configuration to launch "pulseaudio --system" at boot...

--

-- 
Tanu
Tanu Kaskinen | 1 Aug 2011 19:09
Picon
Picon
Favicon
Gravatar

Re: [PATCH] alsa-mixer: Fix element_is_subset().

On Mon, 2011-08-01 at 14:13 +0200, David Henningsson wrote:
> On 2011-07-22 19:20, Tanu Kaskinen wrote:
> > Untested code, don't commit willy-nilly... I'll be away for
> > the weekend, and I thought I'd already send this patch for
> > review. I'll test this some day next week.

Did that week pass already? :(

> > diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
> > index f6a2a20..8f1fb4a 100644
> > --- a/src/modules/alsa/alsa-mixer.c
> > +++ b/src/modules/alsa/alsa-mixer.c
> >  <at>  <at>  -1344,6 +1344,82  <at>  <at>  static int check_required(pa_alsa_element *e, snd_mixer_elem_t *me) {
> >       return 0;
> >   }
> >
> > +static int element_alsa_dB_to_step(pa_alsa_element *e, snd_mixer_elem_t *me, long *dB, long
*step) {
> > +    int r;
> > +
> > +    pa_assert(e);
> > +    pa_assert(me);
> > +    pa_assert(dB);
> > +    pa_assert(step);
> > +
> > +    if (e->direction == PA_ALSA_DIRECTION_OUTPUT) {
> > +        if ((r = snd_mixer_selem_ask_playback_dB_vol(me, *dB, +1, step))>= 0) {
> > +            *step = (e->volume_limit>= 0) ? PA_MIN(*step, e->volume_limit) : *step;
> 
> But can't volume_limit can be less than zero and still valid?

The current code assumes that it can't be less than zero. That's an
invalid assumption, but making the assumption here doesn't break
anything that wasn't broken already.

Bug filed: https://bugs.freedesktop.org/show_bug.cgi?id=39723

> > +
> > +            if ((r = snd_mixer_selem_ask_playback_vol_dB(me, *step, dB)<  0)) {
> > +                pa_log("snd_mixer_selem_ask_playback_vol_dB() failed: %s", pa_alsa_strerror(r));
> > +                return -1;
> > +            }
> 
> Nitpick: could be worth adding a comment about why you need to ask first 
> dB -> vol and then vol -> dB again,

Agreed.

--

-- 
Tanu

Gmane