aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-02-02ALSA: Allow to pass the device object to snd_register_device*()Takashi Iwai1-1/+1
This is a preliminary patch for the further work on embedding struct device into each sound device instance. It changes snd_register_device*() helpers to receive the device object directly for skipping creating a device there. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-28Merge branch 'for-linus' into for-nextTakashi Iwai1-0/+2
The commit [7a2e9ddc: ALSA: usb-audio: Add native DSD support for Denon/Marantz DACs] requires the new format definition that has landed only in for-next branch.
2014-11-21ALSA: pcm: Add big-endian DSD sample formats and fix XMOS DSD sample formatJussi Laako1-0/+2
This patch fixes XMOS DSD sample format to DSD_U32_BE and also adds DSD_U16_BE and DSD_U32_BE sample formats. Signed-off-by: Jussi Laako <jussi@sonarnerd.net> Acked-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-04ALSA: pcm: Add xrun_injection proc entryTakashi Iwai1-0/+33
This patch adds a new proc entry for PCM substreams to inject an XRUN. When a PCM substream is running and any value is written to its xrun_injection proc file, the driver triggers XRUN. This is a useful feature for debugging XRUN and error handling code paths. Note that this entry is enabled only when CONFIG_SND_PCM_XRUN_DEBUG is set. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-30ALSA: pcm: More kerneldoc updatesTakashi Iwai1-2/+13
Add proper kerneldoc comments to the exported functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-08ALSA: pcm: add new DSD sampleformat for native DSD playback on XMOS based devicesJurgen Kramer1-0/+1
XMOS based USB DACs with native DSD support expose this feature via a USB alternate setting. The audio format is either 32-bit raw or a 32-bit PCM format. To utilize this feature on linux this patch introduces a new 32-bit DSD sampleformat DSD_U32_LE. A follow up patch will add a quirk for XMOS based devices to utilize the new format. Further patches will add support to alsa-lib. Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03ALSA: pcm: Allow nonatomic trigger operationsTakashi Iwai1-0/+1
Currently, many PCM operations are performed in a critical section protected by spinlock, typically the trigger and pointer callbacks are assumed to be atomic. This is basically because some trigger action (e.g. PCM stop after drain or xrun) is done in the interrupt handler. If a driver runs in a threaded irq, however, this doesn't have to be atomic. And many devices want to handle trigger in a non-atomic context due to lengthy communications. This patch tries all PCM calls operational in non-atomic context. What it does is very simple: replaces the substream spinlock with the corresponding substream mutex when pcm->nonatomic flag is set. The driver that wants to use the non-atomic PCM ops just needs to set the flag and keep the rest as is. (Of course, it must not handle any PCM ops in irq context.) Note that the code doesn't check whether it's atomic-safe or not, but trust in 100% that the driver sets pcm->nonatomic correctly. One possible problem is the case where linked PCM substreams have inconsistent nonatomic states. For avoiding this, snd_pcm_link() returns an error if one tries to link an inconsistent PCM substream. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-25ALSA: Create sysfs attribute files via groupsTakashi Iwai1-4/+26
Instead of calling each time device_create_file(), create the groups of sysfs attribute files at once in a normal way. Add a new helper function, snd_get_device(), to return the associated device object, so that we can handle the sysfs addition locally. Since the sysfs file addition is done differently now, snd_add_device_sysfs_file() helper function is removed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-14ALSA: pcm: Use standard printk helpersTakashi Iwai1-5/+7
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: Takashi Iwai <tiwai@suse.de>
2014-02-10ALSA: Replace with IS_ENABLED()Takashi Iwai1-5/+5
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: Takashi Iwai <tiwai@suse.de>
2013-10-31ALSA: fix oops in snd_pcm_info() caused by ASoC DPCMRussell King1-0/+4
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: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Mark Brown <broonie@linaro.org> Cc: <stable@vger.kernel.org> [v3.4+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-18ALSA: add DSD formatsDaniel Mack1-0/+2
This patch adds two formats for Direct Stream Digital (DSD), a pulse-density encoding format which is described here: https://en.wikipedia.org/wiki/Direct_Stream_Digital DSD operates on 2.8, 5.6 or 11.2MHz sample rates and as a 1-bit stream. The two new types added by this patch describe streams that are capable of handling DSD samples in DOP format as 8-bit or in 16-bit (or at a x8 or x16 data rate, respectively). DSD itself specifies samples in *bit*, while DOP and ALSA handle them as *bytes*. Hence, a factor of 8 or 16 has to be applied for the sample rare configuration, according to the following table: configured hardware 176.4KHz 352.8kHz 705.6KHz <---- sample rate 8-bit 2.8MHz 5.6MHz 16-bit 2.8Mhz 5.6MHz 11.2MHz `-----------------------------' actual DSD sample rates Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-12ALSA: add/change some comments describing function return valuesYacine Belkadi1-3/+3
script/kernel-doc reports the following type of warnings (when run in verbose mode): Warning(sound/core/init.c:152): No description found for return value of 'snd_card_create' To fix that: - add missing descriptions of function return values - use "Return:" sections to describe those return values Along the way: - complete some descriptions - fix some typos Signed-off-by: Yacine Belkadi <yacine.belkadi.1@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-21ALSA: PCM: Remove redundant null check before kfreeSachin Kamat1-2/+1
kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-30ALSA: Avoid endless sleep after disconnectTakashi Iwai1-1/+5
When disconnect callback is called, each component should wake up sleepers and check card->shutdown flag for avoiding the endless sleep blocking the proper resource release. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-30ALSA: PCM: Fix some races at disconnectionTakashi Iwai1-1/+6
Fix races at PCM disconnection: - while a PCM device is being opened or closed - while the PCM state is being changed without lock in prepare, hw_params, hw_free ops Reported-by: Matthieu CASTET <matthieu.castet@parrot.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-06ALSA: PCM: channel mapping API implementationTakashi Iwai1-0/+4
This patch implements the basic data types for the standard channel mapping API handling. - The definitions of the channel positions and the new TLV types are added in sound/asound.h and sound/tlv.h, so that they can be referred from user-space. - Introduced a new helper function snd_pcm_add_chmap_ctls() to create control elements representing the channel maps for each PCM (sub)stream. - Some standard pre-defined channel maps are provided for convenience. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-24Merge tag 'device-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linuxLinus Torvalds1-0/+1
Pull <linux/device.h> avoidance patches from Paul Gortmaker: "Nearly every subsystem has some kind of header with a proto like: void foo(struct device *dev); and yet there is no reason for most of these guys to care about the sub fields within the device struct. This allows us to significantly reduce the scope of headers including headers. For this instance, a reduction of about 40% is achieved by replacing the include with the simple fact that the device is some kind of a struct. Unlike the much larger module.h cleanup, this one is simply two commits. One to fix the implicit <linux/device.h> users, and then one to delete the device.h includes from the linux/include/ dir wherever possible." * tag 'device-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: device.h: audit and cleanup users in main include dir device.h: cleanup users outside of linux/include (C files)
2012-03-11device.h: cleanup users outside of linux/include (C files)Paul Gortmaker1-0/+1
For files that are actively using linux/device.h, make sure that they call it out. This will allow us to clean up some of the implicit uses of linux/device.h within include/* without introducing build regressions. Yes, this was created by "cheating" -- i.e. the headers were cleaned up, and then the fallout was found and fixed, and then the two commits were reordered. This ensures we don't introduce build regressions into the git history. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-02-09ALSA: PCM - Add PCM creation API for internal PCMs.Liam Girdwood1-30/+69
The new ASoC dynamic PCM core needs to create PCMs and substreams that are for use by internal ASoC drivers only and not visible to userspace for direct IO. These new PCMs are similar to regular PCMs expect they have no device nodes or procfs entries. The ASoC component drivers use them in exactly the same way as regular PCMs for PCM and DAI operations. The intention is that a dynamic PCM based driver will register both regular PCMs and internal PCMs. The regular PCMs will be used for all IO with userspace however the internal PCMs will be used by the driver to route digital audio through numerous back end DAI links (with potentially a DSP providing different hw_params, DAI formats based on the regular front end PCM params) to devices like CODECs, MODEMs, Bluetooth, FM, DMICs, etc This patch adds a new snd_pcm_new_internal() API call to create the internal PCM without device nodes or procfs. It also adds adds a new internal flag to snd_pcm. [fixed minor coding-style issues by tiwai] Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-31sound: Add module.h to the previously silent sound usersPaul Gortmaker1-0/+1
Lots of sound drivers were getting module.h via the implicit presence of it in <linux/device.h> but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-02-14ALSA: core: sparse cleanupsClemens Ladisch1-5/+5
Change the core code where sparse complains. In most cases, this means just adding annotations to confirm that we indeed want to do the dirty things we're doing. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-11Merge branch 'fix/misc' into topic/miscTakashi Iwai1-9/+24
2010-09-16ALSA: pcm - Fix race with proc filesTakashi Iwai1-9/+24
The PCM proc files may open a race against substream close, which can end up with an Oops. Use the open_mutex to protect for it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-07sound: Remove unnecessary casts of private_dataJoe Perches1-2/+1
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-28ALSA: pcm: add more format namesDan Carpenter1-0/+6
There were some new formats added in commit 15c0cee6c809 "ALSA: pcm: Define G723 3-bit and 5-bit formats". That commit increased SNDRV_PCM_FORMAT_LAST as well. My concern is that there are a couple places which do: for (i = 0; i < SNDRV_PCM_FORMAT_LAST; i++) { if (dummy->pcm_hw.formats & (1ULL << i)) snd_iprintf(buffer, " %s", snd_pcm_format_name(i)); } I haven't tested these but it looks like if "i" were equal to SNDRV_PCM_FORMAT_G723_24 or higher then we might read past the end of the array. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-10PM QOS updateMark Gross1-3/+0
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: markgross <mgross@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2010-01-21ALSA: pcm_core: Fix wake_up() optimizationJaroslav Kysela1-0/+1
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: Jaroslav Kysela <perex@perex.cz>
2010-01-07ALSA: pcm_lib - add possibility to log last 10 DMA ring buffer positionsJaroslav Kysela1-0/+4
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: Jaroslav Kysela <perex@perex.cz>
2009-11-10sound: pcm: record a substream's owner processClemens Ladisch1-0/+4
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: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-06control: use reference-counted pidClemens Ladisch1-1/+1
Instead of storing the PID number, take a reference to the task's pid structure. This protects against duplicates due to PID overflows, and using pid_vnr() ensures that the PID returned by snd_ctl_elem_info() is correct as seen from the current namespace. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30ALSA: sound: Move dereference after NULL test and drop unnecessary NULL testsJulia Lawall1-2/+3
In pcm.c, if the NULL test on pcm is needed, then the dereference should be after the NULL test. In dummy.c and ali5451.c, the context of the calls to snd_card_dummy_new_mixer and snd_ali_free_voice show that dummy and pvoice, respectively cannot be NULL. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // <smpl> @match exists@ expression x, E; identifier fld; @@ * x->fld ... when != \(x = E\|&x\) * x == NULL // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-08ALSA: Re-export snd_pcm_format_name() functionTakashi Iwai1-12/+14
Re-export snd_pcm_format_name() function to be used outside the PCM core. As a first example, usbaudio is changed to use it now again. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-24Merge branch 'topic/misc' into for-linusTakashi Iwai1-1/+1
2009-03-09ALSA: Remove unneeded snd_pcm_substream.timer_lockTakashi Iwai1-1/+0
The timer callbacks are called in the protected status by the lock of the timer instance, so there is no need for an extra lock in the PCM substream. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05ALSA: snd_pcm_new api cleanupTim Blechmann1-1/+1
Impact: cleanup snd_pcm_new takes a char *id argument, although it is not modifying the string. it can therefore be declared as const char *id. Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-08-13ALSA: Kill snd_assert() in sound/core/*Takashi Iwai1-15/+19
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>
2008-08-01ALSA: Fix limit of 8 PCM devices in SNDRV_CTL_IOCTL_PCM_NEXT_DEVICEPawel MOLL1-13/+37
When compiled with CONFIG_SND_DYNAMIC_MINORS the ALSA core is fine to have more than 8 PCM devices per card, except one place - the SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE ioctl, which will not enumerate devices > 7. This patch fixes the issue, changing the devices list organisation. Instead of adding new device to the tail, the list is now kept always ordered (by card number, then device number). Thus, during enumeration, it is easy to discover the fact that there is no more given card's devices. Additionally the device field of struct snd_pcm had to be changed to int, as its "unsignednity" caused a lot of problems when comparing it to potentially negative signed values. (-1 is 0xffffffff or even more then ;-) Signed-off-by: Pawel Moll <pawel.moll@st.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-01sound: Revert "ALSA: Fix limit of 8 PCM devices in SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE"Jaroslav Kysela1-37/+13
This reverts commit fb3d6f2b77bdec75d45aa9d4464287ed87927866. New, updated patch with same subject replaces this commit. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-07-29ALSA: Fix limit of 8 PCM devices in SNDRV_CTL_IOCTL_PCM_NEXT_DEVICEPawel MOLL1-13/+37
When compiled with CONFIG_SND_DYNAMIC_MINORS the ALSA core is fine to have more than 8 PCM devices per card, except one place - the SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE ioctl, which will not enumerate devices > 7. This patch fixes the issue, changing the devices list organisation. Instead of adding new device to the tail, the list is now kept always ordered (by card number, then device number). Thus, during enumeration, it is easy to discover the fact that there is no more given card's devices. The same limit was present in OSS emulation code. It has been fixed as well. Additionally the device field of struct snd_pcm is now int, instead of unsigned int, as there is no obvious reason for keeping it unsigned. This caused a lot of problems with comparing this value with other (almost always signed) variables. There is just one more place where device number is unsigned - in struct snd_pcm_info, which should be also sorted out in future. Signed-off-by: Pawel MOLL <pawel.moll@st.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-25ALSA: fix locking in snd_pcm_open*() and snd_rawmidi_open*()Takashi Iwai1-2/+2
The PCM and rawmidi open callbacks have a lock against card->controls_list but it takes a wrong one, card->controls_rwsem, instead of a right one card->ctl_files_rwlock. This patch fixes them. This change also fixes automatically the potential deadlocks due to mm->mmap_sem in munmap and copy_from/to_user, reported by Sitsofe Wheeler: A: snd_ctl_elem_user_tlv(): card->controls_rwsem => mm->mmap_sem B: snd_pcm_open(): card->open_mutex => card->controls_rwsem C: munmap: mm->mmap_sem => snd_pcm_release(): card->open_mutex The patch breaks the chain. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-01-31[ALSA] PCM interface - rename SNDRV_PCM_TSTAMP_MMAP to SNDRV_PCM_TSTAMP_ENABLEJaroslav Kysela1-1/+1
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>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai1-1/+0
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>
2008-01-31[ALSA] Remove PCM sleep_min and tickTakashi Iwai1-11/+0
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>
2008-01-31[ALSA] Remove PCM xfer_align sw paramsTakashi Iwai1-1/+0
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>
2007-10-16[ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.czJaroslav Kysela1-2/+2
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-02-09[PATCH] Fix breakage with CONFIG_SYSFS_DEPRECATEDTakashi Iwai1-1/+1
The fix for sysfs breakage with CONFIG_SYSFS_DEPRECATED was flown away by the conflicted merge of the ALSA git tree. The patch below fixes it again. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] alsa core: convert to list_for_each_entry*Johannes Berg1-20/+12
This patch converts most uses of list_for_each to list_for_each_entry all across alsa. In some place apparently an item can be on a list with different pointers so of course that isn't compatible with list_for_each, I therefore didn't touch those places. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] alsa core: add struct device pointer to struct snd_pcmJohannes Berg1-5/+13
This patch adds a struct device pointer to struct snd_pcm in order to be able to give it a different device than the card. It defaults to the card's device, however, so it should behave identically for drivers not touching the field. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20[ALSA] sound: fix PCM substream listAkinobu Mita1-0/+4
If snd_pcm_new_stream() fails to initalize a substream (if snd_pcm_substream_proc_init() returns error), snd_pcm_new_stream() immediately return without unlinking that kfree()d substram. It causes oops when snd_pcm_free() iterates the list of substream to free them by invalid reference. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>