- 10 3月, 2010 1 次提交
-
-
由 Daniel Glöckner 提交于
Shared memory mappings on nommu machines require a get_unmapped_area file operation that suggests an address for the mapping. The current implementation returns 0 and thus forces the driver to implement an mmap handler that fixes up the start and end address of the vma. This patch returns the address of the dma buffer, so it should work out of the box for all drivers that use the snd_pcm_runtime->dma_area pointer. Addresses for mapping the status and control pages are returned as well, but to make those work the conditional compilation of snd_pcm_mmap_{status,control} would need to be revised. URL: http://thread.gmane.org/gmane.linux.alsa.devel/61230Signed-off-by: NDaniel Glöckner <dg@emlix.com> Signed-off-by: NCliff Cai <cliff.cai@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 04 3月, 2010 1 次提交
-
-
由 Jaroslav Kysela 提交于
Do not use hardcoded SNDRV_TIMER_EVENT_START value. Signed-off-by: NJaroslav Kysela <perex@perex.cz> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 16 2月, 2010 1 次提交
-
-
由 Jaroslav Kysela 提交于
Signed-off-by: NJaroslav Kysela <perex@perex.cz> Cc: <stable@kernel.org>
-
- 02 2月, 2010 1 次提交
-
-
Instead of padding with blanks and printing "number=0x a", print "number=0x0a". Signed-off-by: NThadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 01 2月, 2010 2 次提交
-
-
由 Clemens Ladisch 提交于
Allow TLV blocks that do not have any values; the smallest possible TLV is an empty container or one where the information is only in the tag. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NJaroslav Kysela <perex@perex.cz>
-
由 Clemens Ladisch 提交于
Creating a control with TLV_COMMAND access was not possible because snd_ctl_new1() forgot to include it in the mask of allowable access bits. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NJaroslav Kysela <perex@perex.cz>
-
- 28 1月, 2010 1 次提交
-
-
由 Jaroslav Kysela 提交于
The code in pcm_lib updating runtime->hw_ptr_interrupt expects that runtime->boundary is divisible with runtime->period_size. Thanks are going to Clemens Ladisch for the notice. Fix the runtime->boundary calculation using buffer_size * period_size as base and find a least common multiple for 32bit platforms when the expression might overflow. Signed-off-by: NJaroslav Kysela <perex@perex.cz>
-
- 27 1月, 2010 1 次提交
-
-
由 Jaroslav Kysela 提交于
Clemens Ladisch noted for hw_ptr_removal in "cleanup & merge hw_ptr update functions" commit: "It is possible for the status/delay ioctls to be called when the sound card's pointer register alreay shows a position at the beginning of the new period, but immediately before the interrupt is actually executed. (This happens regularly on a SMP machine with mplayer.) When that happens, the code thinks that the position must be at least one period ahead of the current position and drops an entire buffer of data." Return back the hw_ptr_interrupt variable. The last interrupt pointer is always computed from the latest hw_ptr instead of tracking it separately (in this case all hw_ptr checks and modifications might influence also hw_ptr_interrupt and it is difficult to keep it consistent). Signed-off-by: NJaroslav Kysela <perex@perex.cz>
-
- 21 1月, 2010 1 次提交
-
-
由 Jaroslav Kysela 提交于
This change fixes the "ALSA: pcm_lib - optimize wake_up() calls for PCM I/O" commit. New sleeping queue is introduced to separate user space and kernel space wake_ups. runtime->nowake is renamed to twake (transfer wake). Signed-off-by: NJaroslav Kysela <perex@perex.cz>
-
- 18 1月, 2010 4 次提交
-
-
由 Clemens Ladisch 提交于
As snd_seq_timer_set_tick_resolution() is always called with the same three fields of struct snd_seq_timer, it suffices to give that as the only parameter. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NJaroslav Kysela <perex@perex.cz>
-
由 Takashi Iwai 提交于
pgprot_noncached() can be set for vmalloc'ed buffers safely, and we'd need non-cached behavior more or less, even for the intermediate ring- buffers. Now snd_pcm_lib_mmap_vmalloc() is added as the common PCM mmap callback that is coupled with snd_pcm_lib_alloc_vmalloc_buffer() & co. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
When a card instance with a higher card number is registered, warning messages are spewed eventually with stack traces due to the invalid minor number for OSS device registration. For example, thinkpad-acpi registers the card number 29 as default, and you'll see always these messages. This is rather confusing (and worries users), thus better to return simply the error code. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 15 1月, 2010 1 次提交
-
-
This is needed for built-in drivers which are built before the sound directory, like thinkpad_acpi. Otherwise, registering a card fails. Signed-off-by: NThadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 14 1月, 2010 1 次提交
-
-
由 Takashi Iwai 提交于
Added a new function to look up a quirk entry with the given PCI SSID instead of a pci device pointer. This can be used when the searched ID is overridden for debugging or such a purpose. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 13 1月, 2010 1 次提交
-
-
由 Jaroslav Kysela 提交于
The previous jiffies delta was 0 in all cases. Use hw_ptr variable to store and print original value. Signed-off-by: NJaroslav Kysela <perex@perex.cz>
-
- 08 1月, 2010 1 次提交
-
-
由 Jaroslav Kysela 提交于
When runtime->periods == 1 or when pointer crosses end of ring buffer, the delta might be greater than buffer_size. Signed-off-by: NJaroslav Kysela <perex@perex.cz>
-
- 07 1月, 2010 4 次提交
-
-
由 Jaroslav Kysela 提交于
As noted by pl bossart <bossart.nospam@gmail.com>, the PCM I/O routines (snd_pcm_lib_write1, snd_pcm_lib_read1) should block wake_up() calls until all samples are not processed. Signed-off-by: NJaroslav Kysela <perex@perex.cz>
-
由 Jaroslav Kysela 提交于
Do general cleanup in snd_pcm_update_hw_ptr*() routines and merge them. The main change is hw_ptr_interrupt variable removal to simplify code logic. This variable can be computed directly from hw_ptr. Ensure that updated hw_ptr is not lower than previous one (it was possible with old code in some obscure situations when interrupt was delayed or the lowlevel driver returns wrong ring buffer position value). Signed-off-by: NJaroslav Kysela <perex@perex.cz>
-
由 Jaroslav Kysela 提交于
In some debug cases, it might be usefull to see previous ring buffer positions to determine position problems from the lowlevel drivers. Signed-off-by: NJaroslav Kysela <perex@perex.cz>
-
由 Jaroslav Kysela 提交于
To increase code readability, convert send xrun_debug() argument to use defines. Signed-off-by: NJaroslav Kysela <perex@perex.cz>
-
- 25 12月, 2009 1 次提交
-
-
由 Guennadi Liakhovetski 提交于
Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 22 12月, 2009 2 次提交
-
-
由 Florian Fainelli 提交于
Make sound/core/pcm_timer.c use lib/gcd.c Signed-off-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Krzysztof Helt 提交于
Refine the rate selection by choosing the rate closer to the requested one in case of selecting single frequency. Previously, the higher rate was always selected. Also, fix problem with the best_diff unsigned int value wrapping (turning negative). Signed-off-by: NKrzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 21 12月, 2009 2 次提交
-
-
由 Takashi Iwai 提交于
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Krzysztof Helt 提交于
The direction of rounding is incorrect in the snd_interval_ratnum() It was detected with following parameters (sb8 driver playing 8kHz stereo file): - num is always 1000000 - requested frequency rate is from 7999 to 7999 (single frequency) The first loop calculates div_down(num, freq->min) which is 125. Thus, a frequency range's minimum value is 1000000 / 125 = 8000 Hz. The second loop calculates div_up(num, freq->max) which is 126 The frequency range's maximum value is 1000000 / 126 = 7936 Hz. The range maximum is lower than the range minimum so the function fails due to empty result range. Signed-off-by: NKrzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 18 12月, 2009 1 次提交
-
-
由 Clemens Ladisch 提交于
There are now five copies of the code to allocate a PCM buffer using vmalloc(). Add a sixth in the core so that the others can be removed. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 11 12月, 2009 1 次提交
-
-
由 Takashi Iwai 提交于
The timer stop callback can be called from snd_timer_interrupt(), which is called from the hrtimer callback. Since hrtimer_cancel() waits for the callback completion, this eventually results in a lock-up. This patch fixes the problem by just toggling a flag at stop callback and call hrtimer_cancel() later. Reported-and-tested-by: NWojtek Zabolotny <W.Zabolotny@elka.pw.edu.pl> Cc: <stable@kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 10 12月, 2009 1 次提交
-
-
由 Christoph Hellwig 提交于
While Linux provided an O_SYNC flag basically since day 1, it took until Linux 2.4.0-test12pre2 to actually get it implemented for filesystems, since that day we had generic_osync_around with only minor changes and the great "For now, when the user asks for O_SYNC, we'll actually give O_DSYNC" comment. This patch intends to actually give us real O_SYNC semantics in addition to the O_DSYNC semantics. After Jan's O_SYNC patches which are required before this patch it's actually surprisingly simple, we just need to figure out when to set the datasync flag to vfs_fsync_range and when not. This patch renames the existing O_SYNC flag to O_DSYNC while keeping it's numerical value to keep binary compatibility, and adds a new real O_SYNC flag. To guarantee backwards compatiblity it is defined as expanding to both the O_DSYNC and the new additional binary flag (__O_SYNC) to make sure we are backwards-compatible when compiled against the new headers. This also means that all places that don't care about the differences can just check O_DSYNC and get the right behaviour for O_SYNC, too - only places that actuall care need to check __O_SYNC in addition. Drivers and network filesystems have been updated in a fail safe way to always do the full sync magic if O_DSYNC is set. The few places setting O_SYNC for lower layers are kept that way for now to stay failsafe. We enforce that O_DSYNC is set when __O_SYNC is set early in the open path to make sure we always get these sane options. Note that parisc really screwed up their headers as they already define a O_DSYNC that has always been a no-op. We try to repair it by using it for the new O_DSYNC and redefinining O_SYNC to send both the traditional O_SYNC numerical value _and_ the O_DSYNC one. Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Grant Grundler <grundler@parisc-linux.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andreas Dilger <adilger@sun.com> Acked-by: NTrond Myklebust <Trond.Myklebust@netapp.com> Acked-by: NKyle McMartin <kyle@mcmartin.ca> Acked-by: NUlrich Drepper <drepper@redhat.com> Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 27 11月, 2009 2 次提交
-
-
由 Takashi Iwai 提交于
The non-cohernet PPC arch doesn't give the correct address by a simple virt_to_page() for pages allocated via dma_alloc_coherent(). This patch adds a hack to fix the conversion similarly like MIPS. Note that this doesn't fix perfectly: the pages should be marked with proper pgprot value. This will be done in a future implementation like the conversion to dma_mmap_coherent(). Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The non-coherent MIPS arch doesn't give the correct address by a simple virt_to_page() for pages allocated via dma_alloc_coherent(). Original patch by Wu Zhangjin <wuzj@lemote.com>. [Ralf mentioned: "The origins of this patch go back far further. The oldest patch I could find which is a superset of this was written by Atsushi Nemoto and various incarnations of it have been sumitted to and reject by me a number of times through the years."] A proper check of the buffer allocation type was added to avoid the wrong conversion. Note that this doesn't fix perfectly: the pages should be marked with proper pgprot value. This will be done in a future implementation like the conversion to dma_mmap_coherent(). Acked-by: NRalf Baechle <ralf@linux-mips.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 26 11月, 2009 2 次提交
-
-
由 Takashi Iwai 提交于
Add a helper (inline) function as the default page ops. Any hacks wrt the page address conversion will be applied in this function. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Use dma_mmap_coherent() for mmapping the buffers allocated via dma_alloc_coherent() if available. Currently, only ARM has this function, so we do temporarily have an ifdef pcm_native.c. This should be handled better globally in future. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 18 11月, 2009 1 次提交
-
-
由 Dan Carpenter 提交于
This function is only called from snd_ctl_ioctl() and the file parameter can never be null so there is no need to check it here. We dereference file at the start of the function: struct snd_card *card = file->card; and it confuses static checkers to dereference a pointer before checking it. Signed-off-by: NDan Carpenter <error27@gmail.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 10 11月, 2009 6 次提交
-
-
由 Clemens Ladisch 提交于
Record the pid of the task that opened a RawMIDI substream. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Clemens Ladisch 提交于
Record the pid of the task that opened a PCM substream. For sound cards with hardware mixing, this allows determining which process is associated with a specific substream's volume control. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Clemens Ladisch 提交于
The substream_opened field is to count the number of opened substreams, not the number of times that any substreams have been opened. Furthermore, all substreams being opened does not imply that the next open would fail, due to the possibility of O_APPEND. With this wrong check, opening a substream multiple times would succeed only if the device had more unopened substreams. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Clemens Ladisch 提交于
Commit 9a1b64ca in 2.6.30 broke the error handling code in rawmidi_open_priv(). If only the output substream of a RawMIDI device has been opened and if this device is then opened with O_RDWR | O_APPEND and if the initialization of the input substream fails (either because of low memory or because the device driver's open callback fails), then the runtime structure of the already open output substream will be freed and all following writes through the first handle will cause snd_rawmidi_write() to use the NULL runtime pointer. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Cc: <stable@kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Clemens Ladisch 提交于
Commit 9a1b64ca in 2.6.30 dropped the check that a substream must already have been opened with O_APPEND to be able to open it a second time. This would make it possible for a substream to be switched to append mode, which would mean that non-atomic writes would fail unexpectedly. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Cc: <stable@kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Clemens Ladisch 提交于
Commit 9a1b64ca in 2.6.30 moved the substream initialization code to where it would be executed every time the substream is opened. This had the consequence that any further opening would drop and leak the data in the existing buffer, and that the device driver's open callback would be called multiple times, unexpectedly. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Cc: <stable@kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-