Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Ports
alsa
0030-pcm-add-support-for-new-STATUS_EXT-ioctl.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0030-pcm-add-support-for-new-STATUS_EXT-ioctl.patch of Package alsa
From cc8b73436a90c35beda64bfa13b2196df20cfd81 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Date: Wed, 1 Jul 2015 15:40:56 -0500 Subject: [PATCH 30/49] pcm: add support for new STATUS_EXT ioctl use STATUS_EXT ioctl if PCM protocol is > 2.0.12 All audio timestamp configuration will be ignored with an older protocol. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> --- src/pcm/pcm_hw.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c index c34b766ee035..232b19736db9 100644 --- a/src/pcm/pcm_hw.c +++ b/src/pcm/pcm_hw.c @@ -510,10 +510,18 @@ static int snd_pcm_hw_status(snd_pcm_t *pcm, snd_pcm_status_t * status) { snd_pcm_hw_t *hw = pcm->private_data; int fd = hw->fd, err; - if (ioctl(fd, SNDRV_PCM_IOCTL_STATUS, status) < 0) { - err = -errno; - SYSMSG("SNDRV_PCM_IOCTL_STATUS failed (%i)", err); - return err; + if (SNDRV_PROTOCOL_VERSION(2, 0, 13) > hw->version) { + if (ioctl(fd, SNDRV_PCM_IOCTL_STATUS, status) < 0) { + err = -errno; + SYSMSG("SNDRV_PCM_IOCTL_STATUS failed (%i)", err); + return err; + } + } else { + if (ioctl(fd, SNDRV_PCM_IOCTL_STATUS_EXT, status) < 0) { + err = -errno; + SYSMSG("SNDRV_PCM_IOCTL_STATUS_EXT failed (%i)", err); + return err; + } } if (SNDRV_PROTOCOL_VERSION(2, 0, 5) > hw->version) { status->tstamp.tv_nsec *= 1000L; -- 2.5.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor