[alsa-devel] snd_pcm_hw_params_set_buffer_time_near fails with "Invalid argument" when var_periodsize is enabled

Wischer, Timo (ADITG/ESB) twischer at de.adit-jv.com
Fri Jun 29 17:24:30 CEST 2018


Hi all,

at the moment I am investigating in the issue described in [1].
This issue is already avoided by a workaround [2].

I am able to reproduce the issue with a more simple aplay use case using the following configuration:
pcm_slave.adr3_tdm_8ch {
    pcm {
        type hw
        card "Loopback"
        device 0
    }
    rate 48000
    period_size 128
    buffer_size 1024
    channels 2
}


pcm.dshare_Playback_3 {
    type dmix
    ipc_key 600
    ipc_perm 0660
    ipc_gid audio
    var_periodsize true
    slave adr3_tdm_8ch
}


pcm.AdevAcousticoutSpeech {
    type rate
    slave.pcm dshare_Playback_3
    slave.rate 48000
}

$ modprobe snd_aloop
$ aplay -v --period-size=352 -c2 -fS16_LE -r22500 -D AdevAcousticoutSpeech /dev/urandom
aplay: ../../alsa-utils-1.1.5/aplay/aplay.c:1390: set_params: Assertion `err >= 0' failed.
Aborted by signal Aborted...


It looks like the refinement fails.
Now, I need your help because the intervals seems not to be handled in the same way in each function and
I want to understand what is the correct interpretation of an interval.

For example snd_interval_checkempty() and snd_interval_single() conflicting with each other.
snd_interval_checkempty() interprets (x x] and [x x) as an empty set but snd_interval_single() does not.
(x x) seems not to be an empty set as implemented by snd_interval_single().

Therefore could someone please explain me what is the correct interpretation of the snd_interval_t in combination with openmin and openmax.

The following seems to be consistent
(x x+1) and [x x+1) → x (see snd_interval_single() and snd_interval_value())
but it is different to what I have learnt at university.


So it would be very helpful if someone could direct me to the right definition.
So I hope I could easier solve this issue.


[1] https://bugzilla.opensuse.org/show_bug.cgi?id=1033179
[2] http://git.alsa-project.org/?p=alsa-lib.git;a=commit;h=e736715a8ed4c8690059479fd1d0e04e3320c939

Best regards

Timo Wischer

Advanced Driver Information Technology GmbH
Engineering Software Base (ADITG/ESB)
Robert-Bosch-Str. 200
31139 Hildesheim
Germany

Tel. +49 5121 49 6938
Fax +49 5121 49 6999
twischer at de.adit-jv.com

ADIT is a joint venture company of Robert Bosch GmbH/Robert Bosch Car Multimedia GmbH and DENSO Corporation
Sitz: Hildesheim, Registergericht: Amtsgericht Hildesheim HRB 3438
Geschäftsführung: Wilhelm Grabow, Ken Yaguchi


More information about the Alsa-devel mailing list