All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Subject: does snd_pcm_info_get_sync work at all?
Date: Fri, 18 May 2012 15:46:25 -0500	[thread overview]
Message-ID: <4FB6B521.4000901@linux.intel.com> (raw)
In-Reply-To: <1337323363-11449-4-git-send-email-ricardo.neri@ti.com>

Hi list,
After looking a number of times at the code to start multiple devices at
the same time, I wonder if the alsa-lib snd_pcm_info_get_sync() routine
works at all.

The documentation says "Because the drivers cannot guarantee the
synchronization (sample resolution) on hardware lacking this feature,
the #snd_pcm_info_get_sync() function returns synchronization ID,
which is equal for hardware synchronized streams".

It seems some drivers set a value when opening the stream using the
snd_pcm_set_sync() helper. What exactly is the purpose of this id and
what should it be used for in user-space? The value returned seems to
be the card#, the same value no matter if streams are synchronized or
not.

This is confirmed by a simple experiment, When I tried with a test
program on my HDAudio laptop, the ID is consistently zero, no matter if
I called snd_pcm_link() to synchronize devices or not. That doesn't seem
right. If two devices aren't linked, the information reported my the 
kernel should be clearly invalid.

What exactly was this intent of this routine, why would a sync_id be
needed anyway and has anyone used it successfully?

Thanks,
-Pierre

  reply	other threads:[~2012-05-18 20:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18  6:42 [PATCH 00/11] ASoC: OMAP: HDMI: Use DSS audio interface and prepare for OMAP5 Ricardo Neri
2012-05-18  6:42 ` [PATCH 01/11] ASoC: OMAP: HDMI: Introduce codec Ricardo Neri
2012-05-18 16:32   ` Mark Brown
2012-05-18 16:55     ` Ricardo Neri
2012-05-18  6:42 ` [PATCH 02/11] ASoC: OMAP: HDMI: Update the platform device names Ricardo Neri
2012-05-18  6:42 ` [PATCH 03/11] ASoC: OMAP: HDMI: Change error values in HDMI CPU DAI Ricardo Neri
2012-05-18 20:46   ` Pierre-Louis Bossart [this message]
2012-05-18 21:21     ` does snd_pcm_info_get_sync work at all? Clemens Ladisch
2012-05-18  6:42 ` [PATCH 04/11] ASoC: OMAP: HDMI: Create a structure for private data of the CPU DAI Ricardo Neri
2012-05-18  6:42 ` [PATCH 05/11] ASoC: OMAP: HDMI: Use the DSS audio interface Ricardo Neri
2012-05-18  6:42 ` [PATCH 06/11] ASoC: OMAP: HDMI: Expand configuration of hw_params Ricardo Neri
2012-05-18  6:42 ` [PATCH 07/11] ASoC: OMAP: HDMI: Improve how the display state is verified Ricardo Neri
2012-05-18  6:42 ` [PATCH 08/11] ASoC: OMAP: HDMI: Expand capabilities of the HDMI DAI Ricardo Neri
2012-05-18  6:42 ` [PATCH 09/11] ASoC: OMAP: HDMI: Make build config options more generic Ricardo Neri
2012-05-18  6:42 ` [PATCH 10/11] ASoC: OMAP: HDMI: Make sound card naming " Ricardo Neri
2012-05-18  6:42 ` [PATCH 11/11] ASoC: OMAP: HDMI: Rename sound card source file Ricardo Neri
2012-05-18 16:33 ` [PATCH 00/11] ASoC: OMAP: HDMI: Use DSS audio interface and prepare for OMAP5 Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FB6B521.4000901@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.