diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-04-23 14:58:59 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-04-23 14:58:59 +0200 |
commit | 646f24a04cff8747169f0915eb8712837ed52d77 (patch) | |
tree | 66f356de76c4487c8823114e0f420e316a5c2c9f | |
parent | 59c774ed5ee00e9623a204c3234191d6a6d8cf7a (diff) | |
parent | 0de385109a5edd257264ebdc431465c8e38c2402 (diff) | |
download | alsa-lib-646f24a04cff8747169f0915eb8712837ed52d77.tar.gz |
Merge branch 'master' of /export/git/alsa/alsa-lib/
-rw-r--r-- | src/pcm/pcm.c | 14 | ||||
-rw-r--r-- | src/pcm/pcm_hw.c | 4 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index 209c5bb0..e63bbe9e 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -104,9 +104,13 @@ implementation can be found in the \ref alsa_pcm_rw section. The poll or select functions (see 'man 2 poll' or 'man 2 select' for further details) allows to receive requests/events from the device while an application is waiting on events from other sources (like keyboard, screen, -network etc.), too. \ref snd_pcm_poll_descriptors can be used to get a file -descriptor to poll or select on. The implemented -transfer routines can be found in the \ref alsa_transfers section. +network etc.), too. \ref snd_pcm_poll_descriptors can be used to get file +descriptors to poll or select on (note that wait direction might be diferent +than expected - do not use only returned file descriptors, but handle +events member as well - see \ref snd_pcm_poll_descriptors function +description for more details and \ref snd_pcm_poll_descriptors_revents for +events demangling). The implemented transfer routines can be found in +the \ref alsa_transfers section. \subsection pcm_transfer_async Asynchronous notification @@ -1405,7 +1409,9 @@ int snd_pcm_poll_descriptors_count(snd_pcm_t *pcm) * does the right "demangling". * * You can use output from this function as arguments for the select() - * syscall, too. + * syscall, too. Do not forget to translate POLLIN and POLLOUT events to + * corresponding FD_SET arrays and demangle events using + * \link ::snd_pcm_poll_descriptors_revents() \endlink . */ int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space) { diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c index e9ce0927..c46d14ff 100644 --- a/src/pcm/pcm_hw.c +++ b/src/pcm/pcm_hw.c @@ -326,6 +326,8 @@ static int snd_pcm_hw_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params) SYSMSG("SNDRV_PCM_IOCTL_HW_PARAMS failed"); return err; } + params->info &= ~0xf0000000; + params->info |= (pcm->monotonic ? SND_PCM_INFO_MONOTONIC : 0); err = sync_ptr(hw, 0); if (err < 0) return err; @@ -1037,6 +1039,8 @@ static void snd_pcm_hw_dump(snd_pcm_t *pcm, snd_output_t *out) if (pcm->setup) { snd_output_printf(out, "Its setup is:\n"); snd_pcm_dump_setup(pcm, out); + snd_output_printf(out, " appl_ptr : %li\n", hw->mmap_control->appl_ptr); + snd_output_printf(out, " hw_ptr : %li\n", hw->mmap_status->hw_ptr); } } |