- 21 5月, 2010 1 次提交
-
-
由 Clemens Ladisch 提交于
Commit 7910b4a1 in 2.6.34 changed the runtime->boundary calculation to make this value a multiple of both the buffer_size and the period_size, because the latter is assumed by the runtime->hw_ptr_interrupt calculation. However, due to the lack of a ioctl that could read the software parameters before they are set, the kernel requires that alsa-lib calculates the boundary value, too. The changed algorithm leads to a different boundary value used by alsa-lib, which makes, e.g., mplayer fail to play a 44.1 kHz file because the silence_size parameter is now invalid; bug report: <https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5015>. This patch reverts the change to the boundary calculation, and instead fixes the hw_ptr_interrupt calculation to be period-aligned regardless of the boundary value. Signed-off-by: NClemens Ladisch <clemens@ladisch.de> Cc: <stable@kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 12 5月, 2010 1 次提交
-
-
由 Takashi Iwai 提交于
MIPS non-coherent archs need the noncached pgprot in mmap of PCM buffers. But, since the coherency needs to be checked dynamically via plat_device_is_coherent(), we need an ugly check dependent on MIPS in ALSA core code. This should be cleaned up in MIPS arch side (e.g. creating dma_mmap_coherent()) in near future. Tested-by: NWu Zhangjin <wuzhangjin@gmail.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 11 5月, 2010 1 次提交
-
-
由 Mark Gross 提交于
This patch changes the string based list management to a handle base implementation to help with the hot path use of pm-qos, it also renames much of the API to use "request" as opposed to "requirement" that was used in the initial implementation. I did this because request more accurately represents what it actually does. Also, I added a string based ABI for users wanting to use a string interface. So if the user writes 0xDDDDDDDD formatted hex it will be accepted by the interface. (someone asked me for it and I don't think it hurts anything.) This patch updates some documentation input I got from Randy. Signed-off-by: Nmarkgross <mgross@linux.intel.com> Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
- 05 5月, 2010 1 次提交
-
-
由 Dan Carpenter 提交于
We should disable irqs when we take the tu->qlock because it is used in the irq handler. The only place that doesn't is snd_timer_user_ccallback(). Most of the time snd_timer_user_ccallback() is called with interrupts disabled but the the first ti->ccallback() call in snd_timer_notify1() has interrupts enabled. This was caught by lockdep which generates the following message: > ================================= > [ INFO: inconsistent lock state ] > 2.6.34-rc5 #5 > --------------------------------- > inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. > dolphin/4003 [HC1[1]:SC0[0]:HE0:SE1] takes: > (&(&tu->qlock)->rlock){?.+...}, at: [<f84ec472>] snd_timer_user_tinterrupt+0x28/0x132 [snd_timer] > {HARDIRQ-ON-W} state was registered at: > [<c1048de9>] __lock_acquire+0x654/0x1482 > [<c1049c73>] lock_acquire+0x5c/0x73 > [<c125ac3e>] _raw_spin_lock+0x25/0x34 > [<f84ec370>] snd_timer_user_ccallback+0x55/0x95 [snd_timer] > [<f84ecc4b>] snd_timer_notify1+0x53/0xca [snd_timer] Reported-by: NStefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: NDan Carpenter <error27@gmail.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 13 4月, 2010 3 次提交
-
-
由 Takashi Iwai 提交于
Set no_llseek to llseek file ops of each sound component (but for hwdep). This avoids the implicit BKL invocation via generic_file_llseek() used as default when fops.llseek is NULL. Also call nonseekable_open() at each open ops to ensure the file flags have no seek bit. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The llseek implementation is identical for existing driver implementations, so let's merge to the common layer. The same code for the text proc file can be used even for the binary proc file. The driver can provide its own llseek method if needed. Then the common code will be skipped. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Check the validity of the file position in the common info layer before calling read or write callbacks in assumption that entry->size is set up properly to indicate the max file size. Removed the redundant checks from the callbacks as well. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 09 4月, 2010 1 次提交
-
-
由 Takashi Iwai 提交于
Use a local mutex instead of BKL. This should suffice since each device type has also its open_mutex. Also, a bit of clean-up of the legacy device auto-loading code. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 08 4月, 2010 2 次提交
-
-
由 Takashi Iwai 提交于
Use the fine-grained mutex for the assigned info object, instead. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
It's simply calling fasync_helper(). Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 30 3月, 2010 1 次提交
-
-
由 Tejun Heo 提交于
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: NTejun Heo <tj@kernel.org> Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
-
- 26 3月, 2010 1 次提交
-
-
由 Jarkko Nikula 提交于
The commit 4d96eb25 broke the interrupt time xrun functionality (stream stop etc.) if the CONFIG_SND_PCM_XRUN_DEBUG is not set. This is because the xrun() is null defined without it. Fix this by letting the function xrun() to be always defined as it was before. Signed-off-by: NJarkko Nikula <jhnikula@gmail.com> Cc: Jaroslav Kysela <perex@perex.cz> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 18 3月, 2010 2 次提交
-
-
由 Mark Brown 提交于
Some devices provide support for detection of a small number of buttons on their jacks. One common implementation provides a single button, implemented by shorting the microphone to ground and detected along with microphone presence detection by detecting varying current draws on the microphone bias signal. Provide support for up to three buttons via the jack interface. These default to reporting BTN_n but an API is provided to allow these to be remapped to other keys by the machine driver where it knows what the keys are. More keys can be added with ease if required. This is only intended to support simple accessory button designs. If the interface is limiting then either creating a child device for the accessory or accessing the input device in the jack directly is recommended. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
Avoids confusion when we have button support. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 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>
-