History log of /sound/core/pcm.c
Revision Date Author Comments
fea952e5cc23ea94b4677ca20774cdc3cea014e2 14-Feb-2011 Clemens Ladisch <clemens@ladisch.de> ALSA: core: sparse cleanups

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>
901d46d5a8eb821b03ca9e8cf005beb0c92f31ea 16-Sep-2010 Takashi Iwai <tiwai@suse.de> ALSA: pcm - Fix race with proc files

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>
9fe856e47e1751204faf3d604c6d20ab24bd3b93 05-Sep-2010 Joe Perches <joe@perches.com> sound: Remove unnecessary casts of private_data

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7a28826ac73d31a379d93785d8fbd24ab492b0bd 27-Aug-2010 Dan Carpenter <error27@gmail.com> ALSA: pcm: add more format names

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>
ed77134bfccf5e75b6cbadab268e559dbe6a4ebb 06-May-2010 Mark Gross <mgross@linux.intel.com> PM QOS update

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>
c91a988dc6551c66418690e36b2a23cdb0255da8 21-Jan-2010 Jaroslav Kysela <perex@perex.cz> ALSA: pcm_core: Fix wake_up() optimization

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>
4d96eb255c53ab5e39b37fd4d484ea3dc39ab456 20-Dec-2009 Jaroslav Kysela <perex@perex.cz> ALSA: pcm_lib - add possibility to log last 10 DMA ring buffer positions

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>
e7373b702f6eab35f315e016a4159860a7a4d686 10-Nov-2009 Clemens Ladisch <clemens@ladisch.de> sound: pcm: record a substream's owner process

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>
25d27eded1f4fc728e64f443adc339b5229be5d7 02-Nov-2009 Clemens Ladisch <clemens@ladisch.de> control: use reference-counted pid

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>
4b3be6afa4ab8b3fdce39df68bad71f8b85164de 17-Oct-2009 Julia Lawall <julia@diku.dk> ALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests

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>
6e5265ec34d3b9578973841ddec8b925e986136a 08-Sep-2009 Takashi Iwai <tiwai@suse.de> ALSA: Re-export snd_pcm_format_name() function

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>
85122ea40c4fc82af5b66b8683f525c2c4a36d1a 06-Mar-2009 Takashi Iwai <tiwai@suse.de> ALSA: Remove unneeded snd_pcm_substream.timer_lock

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>
e6161653094f14b1add10efe3493a2e526fe9538 05-Feb-2009 Tim Blechmann <tim@klingt.org> ALSA: snd_pcm_new api cleanup

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>
399ccdc1cd4e92e541d4dacbbf18c52bd693418b 25-Sep-2008 Takashi Iwai <tiwai@suse.de> ALSA: fix locking in snd_pcm_open*() and snd_rawmidi_open*()

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>
7eaa943c8ed8e91e05d0f5d0dc7a18e3319b45cf 08-Aug-2008 Takashi Iwai <tiwai@suse.de> ALSA: Kill snd_assert() in sound/core/*

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>
f90c06a2b613eea24a77d56f24b084745c43713d 30-Jul-2008 Pawel MOLL <pawel.moll@st.com> ALSA: Fix limit of 8 PCM devices in SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE

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>
896e6cc20e67038af12e1a7711eef32647e62f23 01-Aug-2008 Jaroslav Kysela <perex@perex.cz> sound: Revert "ALSA: Fix limit of 8 PCM devices in SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE"

This reverts commit fb3d6f2b77bdec75d45aa9d4464287ed87927866.

New, updated patch with same subject replaces this commit.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9423969005586e6e27ca380e01b4a8c50698e2af 29-Jul-2008 Pawel MOLL <pawel.moll@st.com> ALSA: Fix limit of 8 PCM devices in SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE

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>
8c12158687fc78091730d5456336b7efbf6f2250 11-Jan-2008 Jaroslav Kysela <perex@perex.cz> [ALSA] PCM interface - rename SNDRV_PCM_TSTAMP_MMAP to SNDRV_PCM_TSTAMP_ENABLE

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>
9004acc70e8c49c50c4c7b652f906f1e0ed5709d 08-Jan-2008 Takashi Iwai <tiwai@suse.de> [ALSA] Remove sound/driver.h

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>
31e8960b35975ed235d283d6fb95d0e28dffded0 08-Jan-2008 Takashi Iwai <tiwai@suse.de> [ALSA] Remove PCM sleep_min and tick

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>
d948035a928400ae127c873fbf771389bee18949 08-Jan-2008 Takashi Iwai <tiwai@suse.de> [ALSA] Remove PCM xfer_align sw params

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>
c1017a4cdb68ae5368fbc9ee42c77f1f5dca8916 15-Oct-2007 Jaroslav Kysela <perex@perex.cz> [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz


Signed-off-by: Jaroslav Kysela <perex@perex.cz>
c2902c8ae06762d941fab64198467f78cab6f8cd 09-Feb-2007 Takashi Iwai <tiwai@suse.de> [PATCH] Fix breakage with CONFIG_SYSFS_DEPRECATED

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>
9244b2c3079faac79b3b961116bd548c45087e2c 05-Oct-2006 Johannes Berg <johannes@sipsolutions.net> [ALSA] alsa core: convert to list_for_each_entry*

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>
c78085fcd2ce7cd036e1488472eb41a64d70949a 05-Oct-2006 Johannes Berg <johannes@sipsolutions.net> [ALSA] alsa core: add struct device pointer to struct snd_pcm

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>
4d361285925613516560f81f8c7fc96b89c8b1a8 23-Nov-2006 Akinobu Mita <akinobu.mita@gmail.com> [ALSA] sound: fix PCM substream list

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>
d80f19fab89cba8a6d16193154c8ff3edab00942 08-Aug-2006 Greg Kroah-Hartman <gregkh@suse.de> Driver core: convert sound core to use struct device

Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

It also makes the struct sound_card to show up as a "real" device
where all the different sound class devices are placed as childs
and different card attribute files can hang off of. /sys/class/sound is
still a flat directory, but the symlink targets of all devices belonging
to the same card, point the the /sys/devices tree below the new card
device object.

Thanks to Kay for the updates to this patch.

Signed-off-by: Kay Sievers <kay.sievers@novell.com>
Acked-by: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
9442e691e4aec85eba43ac60a3e77c77fd2e73a4 01-Oct-2006 Takashi Iwai <tiwai@suse.de> [PATCH] maximum latency tracking: ALSA support

Add maximum latency tracking to the ALSA subsystem for PCM playback. In
ALSA, the playback application controls the buffer size and thus indirectly
the period of latency that it can deal with. This patch uses 75% of the
total available latency as threshold to announce to the latency subsystem;
While 75% is a crude heuristic it's a quite reasonable one; the remaining
25% can be used for all driver processing for the next samples which is
also proportional to the size of the buffer.

With ogg123 a latency setting of about 4msec was seen (at 44Khz), while
with the "play" command a much longer maximum tolerable latency was seen.
Other, more multimedia oriented players as well as games, will have a lot
smaller buffers to allow better synchronization and those will actually get
into the latency domains where there is impact on the power management
rules.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
9d19f48cfe2570562c2c6226780a7ca627b0f1f1 06-Sep-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Add pcm_class attribute to PCM sysfs entry

This patch adds a new attribute, pcm_class, to each PCM sysfs entry.
It's useful to detect what kind of PCM stream is, for example, HAL
can check whether it's a modem or not.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2529bba7606b23c1b7161d3c2ad486162e8650f9 04-Aug-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Fix substream selection in PCM and rawmidi

The PCM and rawmidi substreams can be selected explicitly by opening
control handle and set via *_PREFER_SUBDEVICE ioctl. But, when
multiple controls are opened, the driver gets confused.
The patch fixes the initialization of prefer_*_subdevice and the
check of multiple controls. The first set subdevice is picked up
as the valid one.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
c461482c8072bb073e6146db320d3da85cdc89ad 23-Jun-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Unregister device files at disconnection

Orignally proposed by Sam Revitch <sam.revitch@gmail.com>.
Unregister device files at disconnection to avoid the futher accesses.
Also, the dev_unregister callback is removed and replaced with the
combination of disconnect + free.
A new function snd_card_free_when_closed() is introduced, which is
used in USB disconnect callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
746d4a02e68499fc6c1f8d0c43d2271853ade181 23-Jun-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Fix disconnection of proc interface

- Add the linked list to each proc entry to enable a single-shot
disconnection (unregister)
- Deprecate snd_info_unregister(), use snd_info_free_entry()
- Removed NULL checks of snd_info_free_entry()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
6581f4e74d8541dd7d579f64e94822622cbb1654 17-May-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Remove zero-initialization of static variables

Removed zero-initializations of static variables.
A tiny optimization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9c323fcbc51493f79f9700cb20830d0857c72d99 28-Apr-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Fix mmap_count with O_APPEND opened streams

Move mmap_count to snd_pcm_substream instead of runtime struct
so that multiplly opened substreams via O_APPEND can be handled
correctly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
0df63e44c3e315ec0fe427ae62558231864108bd 28-Apr-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Add O_APPEND flag support to PCM

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>
d689e34b524b69c111db0b7c844d71c8e1a53b15 28-Apr-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Remove spinlocks around proc prints

Don't lock during showing proc read. snd_iprintf() might sleep.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
bf850204a71a97eb5a6afaf27263bb667f9cab0a 28-Apr-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Remove unneeded read/write_size fields in proc text ops

Remove unneeded read/write_size fields in proc text ops.
snd_info_set_text_ops() is fixed, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
e88e8ae639a4908b903d9406c54e99a729b01a28 28-Apr-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Move OSS-specific hw_params helper to snd-pcm-oss module

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>
b7d90a356a43f4609bd6290fc2e1ca4ef79d4458 25-Apr-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Fix Oops at rmmod with CONFIG_SND_VERBOSE_PROCFS=n

Fixed Oops at rmmod with CONFIG_SND_VERBOSE_PROCFS=n.
Add ifdef to struct fields for optimization and better compile
checks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
61fb63c096a2e88b87742eaecfe88912b89f57cf 24-Apr-2006 Jaroslav Kysela <perex@suse.cz> [ALSA] PCM core - introduce CONFIG_SND_PCM_XRUN_DEBUG

This patch makes the XRUN (overrun/underrun) notification code optional.

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
12831c15f35dcc9f55fa63d50fd4892c7c6a0a1c 11-Apr-2006 Adrian Bunk <bunk@stusta.de> [ALSA] sound/core/pcm.c: make snd_pcm_format_name() static

Modules: PCM Midlevel

This patch makes the needlessly global snd_pcm_format_name() static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3bf75f9b90c981f18f27a0d35a44f488ab68c8ea 27-Mar-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Clean up PCM codes (take 2)

- 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>
bf1bbb5a49eec51c30d341606885507b501b37e8 27-Mar-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Tiny clean up of PCM codes

- Make snd_pcm_prepare() static
- Clean up snd_pcm_kernel_*_ioctl() functions, reduce exports

Signed-off-by: Takashi Iwai <tiwai@suse.de>
3f72a30ccfd5054c01fc3bb0d37241df5380a54c 18-Jan-2006 Jaroslav Kysela <perex@suse.cz> [ALSA] snd_pcm_format_name() is no longer exported

Modules: PCM Midlevel,USB generic driver

Because snd_pcm_format_name() function is used only for informational
purposes, it is no longer exported from the PCM midlevel to reduce
space and dependency. usbaudio module shows only numeric value for format.

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
1a60d4c5a0c4028559585a74e48593b16e1ca9b2 16-Jan-2006 Ingo Molnar <mingo@elte.hu> [ALSA] semaphore -> mutex (core part)

Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
21a3479a0b606d36fe24093f70a1c27328cec286 13-Jan-2006 Jaroslav Kysela <perex@suse.cz> [ALSA] PCM midlevel & PCM OSS - make procfs & OSS plugin code optional

Modules: ALSA Core,PCM Midlevel,ALSA<-OSS emulation,USB generic driver

1) The verbose procfs code for the PCM midlevel and usb audio
can be removed now (more patches will follow).
CONFIG_SND_VERBOSE_PROCFS
2) The PCM OSS plugin system can be also compiled optionaly.
CONFIG_SND_PCM_OSS_PLUGINS

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
e28563cceb9f258ebe3c50fc27d8f4ff0ac4bfa4 01-Dec-2005 Takashi Iwai <tiwai@suse.de> [ALSA] Optimize for config without PROC_FS

Modules: HWDEP Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel

Optimize the code when compiled without CONFIG_PROC_FS.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
f87135f56cb266e031f5ec081dfbde7e43f55e80 20-Nov-2005 Clemens Ladisch <clemens@ladisch.de> [ALSA] dynamic minors (3/6): store device-specific object pointers dynamically

Instead of storing the pointers to the device-specific structures in an
array, put them into the struct snd_minor, and look them up dynamically.

This makes the device type modules independent of the minor number
encoding.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2af677fc884fc6dc79e65c99050ea607ac8bab9b 20-Nov-2005 Clemens Ladisch <clemens@ladisch.de> [ALSA] dynamic minors (1/6): store device type in struct snd_minor

Instead of a comment string, store the device type in the snd_minor
structure. This makes snd_minor more flexible, and has the nice side
effect that we don't need anymore to create a separate snd_minor
template for registering a device but can pass the file_operations
directly to snd_register_device().

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
73e77ba0235532bd7523ba90883d325f6e095acf 17-Nov-2005 Takashi Iwai <tiwai@suse.de> [ALSA] Add error messages

Add error messages in the critial error path to be more verbose.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
877211f5e1b1196179ba1290e8e1a3dc00427c55 17-Nov-2005 Takashi Iwai <tiwai@suse.de> [ALSA] Remove xxx_t typedefs: PCM

Modules: PCM Midlevel

Remove xxx_t typedefs from the core PCM codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
7c22f1aaa23370bf9ba2dd3abbccbed70dced216 10-Oct-2005 Takashi Iwai <tiwai@suse.de> [ALSA] Remove snd_runtime_check() macro

Remove snd_runtime_check() macro.
This macro worsens the readability of codes. They should be either
normal if() or removable asserts.

Also, the assert displays stack-dump, instead of only the last caller
pointer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
ca2c0966562cfbf9273167a5b60e8fddc24078d6 09-Sep-2005 Takashi Iwai <tiwai@suse.de> [ALSA] Replace with kzalloc() - core stuff

Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel
Timer Midlevel,ALSA<-OSS emulation
Replace kcalloc(1,..) with kzalloc().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
123992f728785e05f385d23893bd5ec69871aeb4 18-May-2005 Adrian Bunk <bunk@stusta.de> [ALSA] sound/core/: possible cleanups

PCM Midlevel,ALSA Core,Timer Midlevel,ALSA sequencer,Virtual Midi
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global functions
- remove the following unneeded EXPORT_SYMBOL's

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9502dcad6c1138a3ce2bae23ccd4be44c718d2a9 18-May-2005 Takashi Iwai <tiwai@suse.de> [ALSA] Export missing snd_pcm_format_*()

PCM Midlevel
Export snd_pcm_format_size(). This function is used by some out-of-kernel
drivers.

Make snd_pcm_format_cpu_endian() macro for optimization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
bd7bf042e89941d4e693a0ec68c5093a2bb2adb3 12-Apr-2005 Takashi Iwai <tiwai@suse.de> [ALSA] Fix permissions in some /proc files

PCM Midlevel,CA0106 driver,EMU10K1/EMU10K2 driver
Fix by Guillaume Chazarain <guichaz@yahoo.fr>:

Some tunables in /proc have a write() function, but as their
permission does not reflect it, it can be confusing to the user.

So here is a patch that corrects the mode of those files. Note that I
have only tested the 'xrun_debug' entry.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!