Skip to contentSkip to conversation

Q: how to get an accurate snd_pcm_delay() for dmix devices

DISCUSSION Daniel Schnell 2 participants 2 messages Jul 30, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

I want to have an accurate value for getting the delay between the appl. buffer frames and the DAC frames. For those reasons the function snd_pcm_delay() exists. However it doesn't return correct values if used for a user defined dmix device. It is also irrelevant if I call before snd_pcm_hwsync() or not.

I use the following device according to the configuration in /etc/asound.conf

pcm.dmixer {
    type dmix
    ipc_key 1027
    slave {
        pcm "hw:0,0"
        period_time 0
        period_size 256
        buffer_size 512
        periods 2
    }
    bindings {
        0 0
        1 1
    }
}

which of the numerous functions could give me a correct value ? I have already tried snd_pcm_status_get_tstamp(), but it only returns 0 values. ?

Best regards,

D. Schnell.

#1 lore raw
Quoted 6 lines · Daniel Schnell
pcm.dmixer {
    type dmix
    ipc_key 1027
    slave {
        pcm "hw:0,0"
        period_time 0
Quoted 8 lines
        period_size 256
        buffer_size 512
        periods 2
    }
    bindings {
        0 0
        1 1
    }

Try add 'slowptr yes' here.

Quoted 1 line

}

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com