- Jul 23, 2009
-
-
Takashi Iwai authored
Added the logging functionality to xrun_debug to record the hwptr updates via snd_pcm_update_hw_ptr() and snd_pcm_update_hwptr_interrupt(), corresponding to 16 and 8, respectively. For example, # echo 9 > /proc/asound/card0/pcm0p/xrun_debug will record the position and other parameters at each period interrupt together with the normal XRUN debugging. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Jul 22, 2009
-
-
Takashi Iwai authored
VMware tends to report PCM positions and period updates at utterly wrong timing. This screws up the recent PCM core code that tries to correct the position based on the irq timing. Now, when a backward irq position is detected, skip the update instead of rebasing. (This is almost the old behavior before 2.6.30.) Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Jun 08, 2009
-
-
Takashi Iwai authored
Use a common helper function for the PCM stream name displayed in XRUN and buffer-pointer debug prints. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Jun 07, 2009
-
-
Takashi Iwai authored
The commit 13f040f9 made another regression, the missing update of runtime->hw_ptr_interrupt. Since this field is only checked in snd_pcmupdate__hw_ptr_interrupt(), not in snd_pcm_update_hw_ptr(), it must be updated before the hw_ptr change check. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Jun 06, 2009
-
-
Jaroslav Kysela authored
Fix a typo in the commit 13f040f9 ALSA: PCM midlevel: Do not update hw_ptr_jiffies when hw_ptr is not changed which causes obvious problems with PA. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Jun 05, 2009
-
-
Takashi Iwai authored
Replace the house-made div64_32() with the standard div_u64*() functions. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- May 29, 2009
-
-
Jaroslav Kysela authored
When hardware has large FIFO, it is necessary to lower jiffies margin by count of queued samples. Signed-off-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Jaroslav Kysela authored
Some hardware might have bigger FIFOs and DMA pointer value will be updated in large chunks. Do not update hw_ptr_jiffies and position timestamp when hw_ptr value was not changed. Signed-off-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Jaroslav Kysela authored
For debugging purposes, it is better to separate actions. Bit-values: 1: show bad PCM ring buffer pointer 2: show also stack (to debug kernel latency issues) 4: check pointer against system jiffies Example: 5: show bad PCM ring buffer pointer and do jiffies check Signed-off-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Jaroslav Kysela authored
Move the fifo_size assignment to hw->ioctl callback to allow lowlevel drivers overwrite the default behaviour. fifo_size is in frames not bytes as specified in asound.h and alsa-lib's documentation, but most hardware have fixed byte based FIFOs. Introduce internal SNDRV_PCM_INFO_FIFO_IN_FRAMES. Signed-off-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- May 27, 2009
-
-
Takashi Iwai authored
The PCM hw_ptr jiffies check results sometimes in problems when a hardware doesn't give smooth hw_ptr updates. So far, au88x0 and some other drivers appear not working due to this strict check. However, this check is a nice debug tool, and the capability should be still kept. Hence, we disable this check now as default unless the user enables it by setting the xrun_debug mode to the specific stream via a proc file. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
The hw_ptr_jiffies has to be reset properly to avoid the invalid check of jiffies delta in snd_pcm_update_hw_ptr*() functions. Especailly this patch fixes the bogus jiffies check after the puase and resume. This patch is a modified version of the original patch by Jaroslav. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 28, 2009
-
-
Takashi Iwai authored
The hardware devices with SNDRV_PCM_INFO_BATCH flag can't give the precise current position. And such hardwares have often big FIFO in addition to the ring buffer, and it screws up the jiffies check in pcm_lib.c. This patch adds a simple check of info flag so that the driver skips the jiffies check in snd_pcm_period_elapsed() when BATCH flag is set. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 10, 2009
-
-
Jaroslav Kysela authored
Some drivers like Intel8x0 or Intel HDA are broken for some hardware variants. This patch adds more strict buffer position checks based on jiffies when internal hw_ptr is updated. Enable xrun_debug to see mangling of wrong positions. As a side effect, the hw_ptr interrupt update routine might do slightly better job when many interrupts are lost. Signed-off-by:
Jaroslav Kysela <perex@perex.cz>
-
- Mar 20, 2009
-
-
Takashi Iwai authored
Make the boundary checks a bit safer. These caese are rare or theoretically won't happen, but nothing bad to keep the checks safer... Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Mar 19, 2009
-
-
Takashi Iwai authored
When the hw_ptr_interrupt reaches the boundary, it must check whether the hw_base was already lapped and corret the delta value appropriately. Also, rebasing the hw_ptr needs a correction because buffer_size isn't always aligned to period_size. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Always reset the invalind hw_ptr position returned by the pointer callback. The behavior should be consitent independently from the debug option. Also, add the printk_ratelimit() check to avoid flooding debug prints. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Remove unnecessary explicit inlininig of internal functions. Let compiler optimize. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Fix a typo in error messages; forgotten after a copy&paste error. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Mar 09, 2009
-
-
Takashi Iwai authored
Clean up and improve snd_pcm_update_hw_ptr*() functions. snd_pcm_update_hw_ptr() tries to detect the unexpected hwptr jumps more strictly to avoid the position mess-up, which often results in the bad quality I/O with pulseaudio. The hw-ptr skip error messages are printed when xrun proc is set to non-zero. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Oct 16, 2008
-
-
Randy Dunlap authored
Add kernel-doc function short descriptions to sound/core functions that are missing this short description. Mostly this involves moving some of the function description onto the @funcname line. Also correct a few variable names and fix other kernel-doc notation. Signed-off-by:
Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Aug 13, 2008
-
-
Takashi Iwai authored
Kill snd_assert() in sound/core/*, either removed or replaced with if () with snd_BUG_ON(). Signed-off-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Jaroslav Kysela <perex@perex.cz>
-
- Jan 31, 2008
-
-
Jaroslav Kysela authored
Change semantics for SNDRV_PCM_TSTAMP_MMAP. Doing timestamping only in the interrupt handler might cause that hw_ptr is not related to actual timestamp. With this change, grab timestamp at every hw_ptr update to have always valid timestamp + ring buffer position pair. With this change, SNDRV_PCM_TSTAMP_MMAP was renamed to SNDRV_PCM_TSTAMP_ENABLE. It's no regression (I think). Signed-off-by:
Jaroslav Kysela <perex@perex.cz>
-
Takashi Iwai authored
This header file exists only for some hacks to adapt alsa-driver tree. It's useless for building in the kernel. Let's move a few lines in it to sound/core.h and remove it. With this patch, sound/driver.h isn't removed but has just a single compile warning to include it. This should be really killed in future. Signed-off-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Jaroslav Kysela <perex@perex.cz>
-
Takashi Iwai authored
The 'tick' in PCM is set (again) via sw_params. And, nobody uses this feature at all except for a command line option of aplay. (This is literally 'nobody', as I checked alsa-lib API calls in all programs in major distros.) Above all, if we need finer wake-ups for the position update, it's basically an issue that the driver should solve, not tuned by each application. Signed-off-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Jaroslav Kysela <perex@perex.cz>
-
Takashi Iwai authored
Introduce a common helper function for snd_pcm_lib_read and snd_pcm_lib_write for cleaning up the code. Signed-off-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Jaroslav Kysela <perex@perex.cz>
-
Takashi Iwai authored
The xfer_align sw_params parameter has never been used in a sane manner, and no one understands what this does exactly. The current implementation looks also buggy because it allows write of shorter size than xfer_align. So, if you do partial writes, the write isn't actually aligned at all. Removing this parameter will make some pcm_lib_* code more readable (and less buggy). Signed-off-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Jaroslav Kysela <perex@perex.cz>
-
Takashi Iwai authored
The snd_pcm_lib_write1() may block in some weird condition: - the stream isn't started - avail_min is big (e.g. period size) - partial write up to buffer_size - avail_min The patch fixes this invalid blocking problem. Signed-off-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Jaroslav Kysela <perex@perex.cz>
-
Marcin Ślusarz authored
pcm_lib: fix sparse warning about different signedness Signed-off-by:
Marcin Ślusarz <marcin.slusarz@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Jaroslav Kysela <perex@perex.cz>
-
Marcin Ślusarz authored
pcm_lib: fix sparse warning about shadowing 'n' symbol Signed-off-by:
Marcin Ślusarz <marcin.slusarz@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Jaroslav Kysela <perex@perex.cz>
-
Jaroslav Kysela authored
We need an accurate and continuous (monotonic) time sources to do accurate synchronization among more timing sources. This patch allows to enable monotonic timestamps for ALSA PCM devices and enables monotonic timestamps for ALSA timer devices. Signed-off-by:
Jaroslav Kysela <perex@perex.cz>
-
Takashi Iwai authored
When MMAP time-stamp mode is given, it's supposed to update the time-stamp only at period boundary. However, it currently updates at each status call so this is just useless. The patch fixes this misbehavior. Also it fixes the wrong check of tstamp_mode (don't use bit-and for enum). Signed-off-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Jaroslav Kysela <perex@perex.cz>
-
- Oct 16, 2007
-
-
Jaroslav Kysela authored
Signed-off-by:
Jaroslav Kysela <perex@perex.cz>
-
- Feb 09, 2007
-
-
Takashi Iwai authored
snd_internval_list() may access invalid memory in the case count = 0 is given. It shouldn't be passed, but it'd better to make the code a bit more robust. Signed-off-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Jaroslav Kysela <perex@suse.cz>
-
- Dec 20, 2006
-
-
Clemens Ladisch authored
The case where silence_size < boundary was broken because different parts of the snd_pcm_playback_silence() function disagreed about whether silence_start should point to the start or to the end of the buffer part to be silenced. This patch changes the code to always use to the start, which also simplifies several calculations. Signed-off-by:
Clemens Ladisch <clemens@ladisch.de> Signed-off-by:
Jaroslav Kysela <perex@suse.cz>
-
- Jun 22, 2006
-
-
Takashi Iwai authored
Added O_APPEND flag support to PCM to enable shared substreams among multiple processes. This mechanism is used by dmix and dsnoop plugins. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Clean up ugly hacks for sync with alsa-lib code in pcm_lib.c. Also, optimize snd_pcm_hw_params_choose() with a loop. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Move EXPORT_SYMBOL()s to places adjacent to functions/variables. Also move OSS-specific hw_params helper functions to pcm_oss.c. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 27, 2006
-
-
Jaroslav Kysela authored
This patch makes the XRUN (overrun/underrun) notification code optional. Signed-off-by:
Jaroslav Kysela <perex@suse.cz>
-
- Mar 31, 2006
-
-
Takashi Iwai authored
- Clean up initialization and destruction of substream instance Now snd_pcm_open_substream() alone does most initialization jobs. Add pcm_release callback for cleaning up at snd_pcm_release_substream() - Tidy up PCM oss code Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-