- 14 2月, 2014 6 次提交
-
-
由 Takashi Iwai 提交于
Use dev_err() & co as much as possible. If not available (no device assigned at the calling point), use pr_xxx() helpers instead. For simplicity, introduce new helpers for pcm stream, pcm_err(), etc. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Use dev_err() & co as much as possible. If not available (no device assigned at the calling point), use pr_xxx() helpers instead. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The debug prints in snd-seq-oss module are rather useless. Let's clean up before further modifications. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Drop the own refcount but use the standard device refcounting via get_device() and put_device(). Introduce a new completion to snd_card instead of the wait queue for syncing the last release, which is used in snd_card_free(). Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
... instead of calling device_create_file() manually. No functional change. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
As prepared in the previous patch, we are ready to create a device struct for the card object in snd_card_create() now. This patch changes the scheme from the old style to: - embed a device struct for the card object into snd_card struct, - initialize the card device in snd_card_create() (but not register), - registration is done in snd_card_register() via device_add() The actual card device is stored in card->card_dev. The card->dev pointer is kept unchanged and pointing to the parent device as before for compatibility reason. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 12 2月, 2014 2 次提交
-
-
由 Takashi Iwai 提交于
This is a part of preliminary works for modernizing the ALSA device structure. So far, we set card->dev at later point after the object creation. Because of this, the core layer doesn't always know which device is being handled before it's actually registered, and it makes impossible to show the device in error messages, for example. The first goal is to achieve a proper struct device initialization at the very beginning of probing. As a first step, this patch introduces snd_card_new() function (yes there was the same named function in the very past), in order to receive the parent device pointer from the very beginning. snd_card_create() is marked as deprecated. At this point, there is no functional change other than that. The actual change of the device creation scheme will follow later. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The last argument, name, of snd_oss_register_device() is nowhere referred in the function in the current code. Let's drop it. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 10 2月, 2014 2 次提交
-
-
由 Takashi Iwai 提交于
Replace the lengthy #if defined(XXX) || defined(XXX_MODULE) with the new IS_ENABLED() macro. The patch still doesn't cover all ifdefs. For example, the dependency on CONFIG_GAMEPORT is still open-coded because this also has an extra dependency on MODULE. Similarly, an open-coded ifdef in pcm_oss.c and some sequencer-related stuff are left untouched. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Masanari Iida 提交于
This patch fixed 2 typos in DocBook/alsa-driver-api.xml. It is because this file is generated by make xmldocs, I have to fix typos within source files. Signed-off-by: NMasanari Iida <standby24x7@gmail.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 23 1月, 2014 2 次提交
-
-
由 Takashi Iwai 提交于
There are two loops that are almost identical but only with different checks. Refactor them with a simple helper, and give a bit more comments what's doing there. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Dan Carpenter 提交于
The test here is intended intended to prevent shift wrapping bugs when we do "1U << idx2". We should consider the number of bits in a u32 instead of the number of bytes. [fix another chunk similarly by tiwai] Fixes: 7bb2491b ('ALSA: Add kconfig to specify the max card numbers') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 15 1月, 2014 1 次提交
-
-
由 Lars-Peter Clausen 提交于
A bit of special care is necessary when creating the intersection of two rate masks. This comes from the special meaning of the SNDRV_PCM_RATE_CONTINUOUS and SNDRV_PCM_RATE_KNOT bits, which needs special handling when intersecting two rate masks. SNDRV_PCM_RATE_CONTINUOUS means the hardware supports all rates in a specific interval. SNDRV_PCM_RATE_KNOT means the hardware supports a set of discrete rates specified by a list constraint. For all other cases the supported rates are specified directly in the rate mask. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Reviewed-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 11 1月, 2014 1 次提交
-
-
由 Takashi Iwai 提交于
The failures of buffer preallocations at driver initializations aren't critical but it's still helpful to inform, so that user can know that something doesn't work as expected. For example, the recent page allocator change triggered regressions, but developers didn't notice until recently because the driver didn't complain. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 09 1月, 2014 4 次提交
-
-
由 Takashi Iwai 提交于
Instead of keeping a separate snd-page-alloc module, merge into the core snd-pcm module, as we don't need to keep it as an individual module due to the drop of page reservation. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
After cutting off the proc and page reservation codes, we don't need many headers any longer. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Nowadays we have CMA for obtaining the contiguous memory pages efficiently. Let's kill the old kludge for reserving the memory pages for large buffers. It was rarely useful (only for preserving pages among module reloading or a little help by an early boot scripting), used only by a couple of drivers, and yet it gives too much ugliness than its benefit. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
It's almost superfluous, and doesn't help much for real uses. Let's reduce the layer size. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 05 1月, 2014 1 次提交
-
-
由 Vinod Koul 提交于
commit f0e9c080 - "ALSA: compress: change the way sample rates are sent to kernel" changed the way sample rates are sent. So now we don't need to check for PCM_RATE_xxx in kernel Signed-off-by: NVinod Koul <vinod.koul@intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 17 12月, 2013 1 次提交
-
-
由 JongHo Kim 提交于
When the process is sleeping at the SNDRV_PCM_STATE_PAUSED state from the wait_for_avail function, the sleep process will be woken by timeout(10 seconds). Even if the sleep process wake up by timeout, by this patch, the process will continue with sleep and wait for the other state. Signed-off-by: NJongHo Kim <furmuwon@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 15 11月, 2013 2 次提交
-
-
由 Nicolin Chen 提交于
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code. Signed-off-by: NNicolin Chen <b42378@freescale.com> Acked-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Takashi Iwai 提交于
The recent change in sysfs triggered a kernel WARNING at unloading a sound driver like WARNING: CPU: 3 PID: 2247 at fs/sysfs/group.c:214 sysfs_remove_group+0xe8/0xf0() sysfs group ffffffff81ab7b20 not found for kobject 'event14' for each jack instance. It's because the unregistration of jack input device is done in dev_free callback, which is called after snd_card_disconnect(). Since device_unregister(card->card_dev) is called in snd_card_disconnect(), the whole sysfs entries belonging to card->card_dev have been already removed recursively. Thus this results in a warning as input_unregister_device() yet tries to unregister the already removed sysfs entry. For fixing this mess, we need to unregister the jack input device at dev_disconnect callback so that it's called before unregistering the card->card_dev. Reviwed-by: NMark Brown <broonie@linaro.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 12 11月, 2013 1 次提交
-
-
由 Richard Fitzgerald 提交于
Pausing audio playback is not an illegal state so it doesn't seem sensible for poll() to return -EBADFD on a paused stream. There's also no reason to assume that we can't write more data to the DSP while playback is paused. Remove the -EBADFD so that a stream in paused state will still report the buffer availability from poll(). It is up to the user process to manage its state so that it knows whether it is paused or not. Signed-off-by: NRichard Fitzgerald <rf@opensource.wolfsonmicro.com> Acked-by VInod Koul <vinod.koul@intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 07 11月, 2013 1 次提交
-
-
由 Vinod Koul 提交于
The drain and drain_notify callback were blocked by low level driver until the draining was complete. Due to this being invoked with big fat mutex held, others ops like reading timestamp, calling pause, drop were blocked. So to fix this we add a new snd_compr_drain_notify() API. This would be required to be invoked by low level driver when drain or partial drain has been completed by the DSP. Thus we make the drain and partial_drain callback as non blocking and driver returns immediately after notifying DSP. The waiting is done while releasing the lock so that other ops can go ahead. [ The commit 917f4b5c was wrongly applied from the preliminary patch. This commit corrects to the final version. Sorry for inconvenience! -- tiwai ] Signed-off-by: NVinod Koul <vinod.koul@intel.com> CC: stable@vger.kernel.org Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 01 11月, 2013 1 次提交
-
-
由 Russell King 提交于
Unable to handle kernel NULL pointer dereference at virtual address 00000008 pgd = d5300000 [00000008] *pgd=0d265831, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] PREEMPT ARM CPU: 0 PID: 2295 Comm: vlc Not tainted 3.11.0+ #755 task: dee74800 ti: e213c000 task.ti: e213c000 PC is at snd_pcm_info+0xc8/0xd8 LR is at 0x30232065 pc : [<c031b52c>] lr : [<30232065>] psr: a0070013 sp : e213dea8 ip : d81cb0d0 fp : c05f7678 r10: c05f7770 r9 : fffffdfd r8 : 00000000 r7 : d8a968a8 r6 : d8a96800 r5 : d8a96200 r4 : d81cb000 r3 : 00000000 r2 : d81cb000 r1 : 00000001 r0 : d8a96200 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 10c5387d Table: 15300019 DAC: 00000015 Process vlc (pid: 2295, stack limit = 0xe213c248) [<c031b52c>] (snd_pcm_info) from [<c031b570>] (snd_pcm_info_user+0x34/0x9c) [<c031b570>] (snd_pcm_info_user) from [<c03164a4>] (snd_pcm_control_ioctl+0x274/0x280) [<c03164a4>] (snd_pcm_control_ioctl) from [<c0311458>] (snd_ctl_ioctl+0xc0/0x55c) [<c0311458>] (snd_ctl_ioctl) from [<c00eca84>] (do_vfs_ioctl+0x80/0x31c) [<c00eca84>] (do_vfs_ioctl) from [<c00ecd5c>] (SyS_ioctl+0x3c/0x60) [<c00ecd5c>] (SyS_ioctl) from [<c000e500>] (ret_fast_syscall+0x0/0x48) Code: e1a00005 e59530dc e3a01001 e1a02004 (e5933008) ---[ end trace cb3d9bdb8dfefb3c ]--- This is provoked when the ASoC front end is open along with its backend, (which causes the backend to have a runtime assigned to it) and then the SNDRV_CTL_IOCTL_PCM_INFO is requested for the (visible) backend device. Resolve this by ensuring that ASoC internal backend devices are not visible to userspace, just as the commentry for snd_pcm_new_internal() says it should be. Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk> Acked-by: NMark Brown <broonie@linaro.org> Cc: <stable@vger.kernel.org> [v3.4+] Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 29 10月, 2013 5 次提交
-
-
由 Takashi Iwai 提交于
When no proper id string is given, the driver tries to fall back to copy the proc_root name string via strcpy(), but this might overflow the fixed string size. Let's use strlcpy(). Spotted by coverity CID 139008. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
dmab->area and addr fields should be cleared at the head of snd_malloc_dev_iram() as especially dmab->area is used to indicate the allocation failure / fallback. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
These are used only locally. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
module->name is a fixed array, so we can check the empty contents straightforwardly in module_slot_match(). Spotted by coverity CID 1056786. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Just to improve readability. Spotted by coverity CID 115002 and 115003. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 28 10月, 2013 2 次提交
-
-
由 Takashi Iwai 提交于
I obviously forgot to merge the right version... Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Use the standard PCM helper function to figure out the sample bytes instead of hardcodec PCM format checks in snd_hwparams_to_dma_slave_config(). The patch also extends the format check for 8 bytes formats although no one should match so far. Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 25 10月, 2013 1 次提交
-
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 24 10月, 2013 3 次提交
-
-
由 Vinod Koul 提交于
The drain and drain_notify callback were blocked by low level driver untill the draining was complete. Due to this being invoked with big fat mutex held, others ops like reading timestamp, calling pause, drop were blocked. So to fix this we add a new snd_compr_drain_notify() API. This would be required to be invoked by low level driver when drain or partial drain has been completed by the DSP. Thus we make the drain and partial_drain callback as non blocking and driver returns immediately after notifying DSP. The waiting is done while relasing the lock so that other ops can go ahead. Signed-off-by: NVinod Koul <vinod.koul@intel.com> CC: stable@vger.kernel.org Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
It turned out that we can't use gen_pool_*() functions on archs without CONFIG_GENERIC_ALLOCATOR (resulting in missing symbols), since linux/genalloc.h doesn't provide dummy functions for all. We'd be able to fix linux/genalloc.h size, but I take an easier path for now... Reported-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Nicolin Chen 提交于
Now it's quite common that an SoC contains its on-chip internal RAM. By using this RAM space for DMA buffer during audio playback/record, we can shutdown the voltage for external RAM to save power. So add new DEV type with iram malloc()/free() and accordingly modify current default mmap() for the iram circumstance. Signed-off-by: NNicolin Chen <b42378@freescale.com> Reviewed-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 26 9月, 2013 1 次提交
-
-
由 Liam Girdwood 提交于
Currently we assume that userspace will shut down the compressed stream correctly. However, if userspcae dies (e.g. cplay & ctrl-C) we dont stop the stream before freeing it. This now checks that the stream is stopped before freeing. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 20 9月, 2013 1 次提交
-
-
由 Liam Girdwood 提交于
snd_unregister_device() should return the device type and not stream direction. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: NVinod Koul <vinod.koul@intel.com> Tested-by: NVinod Koul <vinod.koul@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 19 8月, 2013 1 次提交
-
-
由 Tim Gardner 提交于
The use of snd_printd_ratelimit() supresses superfluous output from printk_ratelimit() when CONFIG_SND_DEBUG is not defined. For example, [ 43.753692] snd_pcm_update_hw_ptr0: 26 callbacks suppressed [ 48.822131] snd_pcm_update_hw_ptr0: 25 callbacks suppressed [ 53.894953] snd_pcm_update_hw_ptr0: 25 callbacks suppressed [ 58.997761] snd_pcm_update_hw_ptr0: 25 callbacks suppressed [ 64.100952] snd_pcm_update_hw_ptr0: 25 callbacks suppressed fills the log even when no debug output is actually produced. Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Yacine Belkadi <yacine.belkadi.1@gmail.com> Signed-off-by: NTim Gardner <tim.gardner@canonical.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 16 8月, 2013 1 次提交
-
-
由 Daniel Mack 提交于
When users of SND_DMAENGINE_PCM are built as module, the config symbol SND_DMAENGINE_PCM must be tristate, otherwise the linker will fail. Signed-off-by: NDaniel Mack <zonque@gmail.com> Reported-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-