Don't enable power-saving mode on drivers that don't support
it. The supporting drivers set AC97_SCAP_POWER_SAVE to scaps
at creation of ac97 instance.
Currently enable on the following drivers: intel8x0, intel8x0m,
atiixp, atiixp-modem, via82xx and via82xx-modem.
Also, a bit clean up of power-saving stuff:
- Don't create an own workq
- Remove superfluous ifdefs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This patch adds support for the DAI BCLK to be generated by multiplying
Rate * Channels * Word Size (RCW).
This now gives 3 options for BCLK clocking and synchronisation :-
1. BCLK = Rate * x
2. BCLK = MCLK / x
3. BCLK = Rate * Chn * Word Size. (New)
Changes:-
o Add support for RCW generation of BCLK
o Update Documentation to include RCW.
o Update DAI documentation for label = value DAI modes.
o Add RCW support to wm8731, wm8750 and pxa2xx-i2s drivers.
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Load the DSP and controller microcode using request_firmware(), if
possible, instead of using the built-in firmware.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This patch adds the ASoC and DAPM headers.
Features:-
o Defines Digital Audio Interface (DAI) API
o Defines Codec, Platform and Machine API
o Defines Dynamic Audio Power Management API
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
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>
This patch adds snd_register_device_for_dev taking a struct device
pointer to link the new device to and makes snd_register_device a simple
static inline wrapper around it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Enable the analog loopback of the Revolution 5.1 card.
This patch adds support for the PT2258 volume controller and modifies
the Revolution 5.1 driver to make use of this facility. This allows
to control the analog loopback of the card.
Signed-off-by: Jochen Voss <voss@seehuhn.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Enable capture from line-in and CD on the Revolution 5.1 card.
This patch adds support for switching between the 5 input channels of
the AK5365 ADC and modifies the Revolution 5.1 driver to make use of
this facility. Previously the capture channel was fixed to channel 0
(microphone on the Revolution 5.1 card).
Signed-off-by: Jochen Voss <voss@seehuhn.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
The recent change for a new sysfs tree with card* object breaks the
/sys/class/sound tree if CONFIG_SYSFS_DEPRECATED is enabled.
The device in each entry doesn't point the correct device object:
/sys/class/sound
...
|-- pcmC0D0c
| |-- dev
| |-- device -> ../../../class/sound/card0
| |-- pcm_class
| |-- power
| | `-- wakeup
| |-- subsystem -> ../../../class/sound
| `-- uevent
Also, this change breaks some drivers (like sound/arm/*) referring
card->dev directly to obtain the device object for memory handling.
This patch reverts the semantics of card->dev to the former version,
which points to a real device object. The card* object is stored in a
new card->card_dev field, instead. The device parent is chosen either
card->dev or card->card_dev according to CONFIG_SYSFS_DEPRECATED to
keep the tree compatibility.
Also, card* isn't created if CONFIG_SYSFS_DEPRECATED is enabled. The
reason of card* object is a root of all beloing devices, and it makes
little sense if each sound device points to the real device object
directly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Monty Montgomery <xiphmont@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix the type of PCI revision to char from int and avoid invalid
assignment with pointer cast.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Fixed the race among multiple threads accessing the OSS PCM
instance concurrently by simply introducing a mutex for protecting
a setup of the PCM.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This patch fixes incorrect assignment of swap_rear,
which was broken since patch 'ymfpci - make rear channel swap optional'
It removes module_param rear_swap.
Signed-off-by: Glen Masgai <mimosius@gmx.de>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Conflicts:
drivers/ata/libata-scsi.c
include/linux/libata.h
Futher merge of Linus's head and compilation fixups.
Signed-Off-By: David Howells <dhowells@redhat.com>
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.c
Fix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
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>
Alsa used to kmalloc one file->f_op per file per disconnecting snd_card.
This led to oopses sometimes when file->f_op was freed before __fput()
finished.
Patch adds a virtual device for disconnect: VDD.
VDD consists of:
LIST_HEAD(shutdown_files)
protected by DEFINE_SPINLOCK(shutdown_mutex)
static struct file_operations snd_shutdown_f_ops
and functions assigned to it
Additions to struct snd_monitor_file
to specify if instance is hidden by VDD or not.
A VDD's instance is
created in snd_card_disconnect() under the card->files_lock.
cleaned up in snd_card_file_remove() under the card->files_lock.
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.
The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).
Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.
Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.
I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.
This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);
I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().
Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.
(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.
(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.
Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
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>
Remove IPGA volume controls and merge the IPGA range to ADC volume
controls. These two volumes are not really independent but connected
simply in different ranges 0-0x7f and 0x80-max. It doesn't make sense
to provide two controls.
Since both 0x7f and 0x80 specify 0dB, a hack is needed for IPGA range
to skip 0x80 (increment one) for such controls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
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>
Added the definition of TLV dB range compound. It contains one or
more dB-range or linear-volume TLV entries with min/max ranges.
Used for volume controls with non-linear curves.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
- Clean up the code in AK4xxx-ADDA i2c code.
- Fix capture gain controls for AK5365
- Changed the static table for DAC/ADC mixer labels to use
structs
- Implemented TLV entries for each AK codec
The volumes in AK4524, AK4528 and AK5365 are corrected with
a table to be suitable for dB conversion.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added the definition of linear volume TLV type.
Some DSP chips and codecs (e.g. AK codec) use linear volume control.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added the dB scale information to vxpocket and vx222 drivers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Add support for the AK5365 ADC.
Signed-off-by: Jochen Voss <voss@seehuhn.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
The flag to avoid 32bit-incompatible mmap for control/status records
should be outside the pcm substream instance since a substream can be
shared among multiple opens. Now it's flagged in pcm_file list that
is directly assigned to file->private_data.
Also, removed snd_pcm_add_file() and remove_file() functions and
substream.files field that are not really used in the code.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Remove unused tlv_rw field from struct snd_kcontrol. The callback is
set in tlv.c field, instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Added CONFIG_SND_AC97_POWER_SAVE kernel config to enable the support
of aggressive AC97 power-saving mode. In this mode, the AC97
powerdown register bits are dynamically controlled at each open/close
of PCM streams.
The mode is activated via power_save option for snd-ac97-codec
driver. As default it's off. It can be turned on/off on the fly
via sysfs, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
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>
- 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>
This patch implements a TLV mechanism to transfer an additional information
like dB scale to the user space. The types might be extended in future.
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Fixed 'section mismatch' errors in ALSA PCI drivers:
- removed invalid __devinitdata from pci id tables
- fix/remove __devinit of functions called in suspend/resume
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Drop the snd_minor structure's name field that was just a helper for
devfs device deregistration.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Fix spaces, fold lines to fit 80 columns in ak4xxx-adda driver codes.
Split a long reset function to each codec routine just for better
readability.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This patch adds stereo controls to revo cards by making the ak4xxx
driver mixers configurable from the card driver.
Signed-off-by: Jani Alinikula <janialinikula@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This patch adds two mixer controls. The V_REFOUT enable is a
documented register that couples the microphone input lines
to the V_REFOUT DC source. The High Pass Filter enable in the
AC97_AD_TEST2 (0x5c) is an undocumented register provided by
Miller Puckette via Analog Devices that enables the AD codec
to apply a high pass filter to the input.
Signed-off-by: Jaya Kumar <jayakumar.alsa@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Suppress 'irq handler mismatch' messages at auto-probing of irqs
in ALSA ISA drivers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
In file included from sound/i2c/other/tea575x-tuner.c:30:
include/sound/tea575x-tuner.h:36: error: field 'vd' has incomplete type
include/sound/tea575x-tuner.h:37: error: field 'fops' has incomplete type
sound/i2c/other/tea575x-tuner.c:89: warning: 'struct inode' declared inside parameter list
sound/i2c/other/tea575x-tuner.c:89: warning: its scope is only this definition or declaration, which is probably not what you want
sound/i2c/other/tea575x-tuner.c: In function 'snd_tea575x_ioctl':
sound/i2c/other/tea575x-tuner.c:91: warning: implicit declaration of function 'video_devdata'
sound/i2c/other/tea575x-tuner.c:91: warning: initialization makes pointer from integer without a cast
sound/i2c/other/tea575x-tuner.c:92: warning: implicit declaration of function 'video_get_drvdata'
sound/i2c/other/tea575x-tuner.c:92: warning: initialization makes pointer from integer without a cast
sound/i2c/other/tea575x-tuner.c:96: warning: implicit declaration of function '_IOR'
sound/i2c/other/tea575x-tuner.c:96: error: syntax error before 'struct'
sound/i2c/other/tea575x-tuner.c:99: error: 'v' undeclared (first use in this function)
sound/i2c/other/tea575x-tuner.c:99: error: (Each undeclared identifier is reported only once
sound/i2c/other/tea575x-tuner.c:99: error: for each function it appears in.)
sound/i2c/other/tea575x-tuner.c:108: warning: implicit declaration of function 'copy_to_user'
sound/i2c/other/tea575x-tuner.c:112: warning: implicit declaration of function '_IOWR'
sound/i2c/other/tea575x-tuner.c:112: error: syntax error before 'struct'
sound/i2c/other/tea575x-tuner.c:115: warning: implicit declaration of function 'copy_from_user'
sound/i2c/other/tea575x-tuner.c: At top level:
sound/i2c/other/tea575x-tuner.c:129: error: syntax error before 'case'
sound/i2c/other/tea575x-tuner.c:146: warning: type defaults to 'int' in declaration of 'snd_tea575x_set_freq'
sound/i2c/other/tea575x-tuner.c:146: warning: parameter names (without types) in function declaration
sound/i2c/other/tea575x-tuner.c:146: error: conflicting types for 'snd_tea575x_set_freq'
sound/i2c/other/tea575x-tuner.c:62: error: previous definition of 'snd_tea575x_set_freq' was here
sound/i2c/other/tea575x-tuner.c:146: warning: data definition has no type or storage class
sound/i2c/other/tea575x-tuner.c:147: error: syntax error before 'return'
sound/i2c/other/tea575x-tuner.c:151: error: syntax error before '&' token
sound/i2c/other/tea575x-tuner.c:152: error: syntax error before '.' token
sound/i2c/other/tea575x-tuner.c:152: warning: type defaults to 'int' in declaration of 'strcpy'
sound/i2c/other/tea575x-tuner.c:152: warning: function declaration isn't a prototype
sound/i2c/other/tea575x-tuner.c:152: error: conflicting types for 'strcpy'
sound/i2c/other/tea575x-tuner.c:152: warning: data definition has no type or storage class
sound/i2c/other/tea575x-tuner.c: In function 'snd_tea575x_init':
sound/i2c/other/tea575x-tuner.c:194: warning: implicit declaration of function 'video_set_drvdata'
sound/i2c/other/tea575x-tuner.c:197: error: 'video_exclusive_open' undeclared (first use in this function)
sound/i2c/other/tea575x-tuner.c:198: error: 'video_exclusive_release' undeclared (first use in this function)
sound/i2c/other/tea575x-tuner.c:200: warning: implicit declaration of function 'video_register_device'
sound/i2c/other/tea575x-tuner.c:200: error: 'VFL_TYPE_RADIO' undeclared (first use in this function)
sound/i2c/other/tea575x-tuner.c: In function 'snd_tea575x_exit':
sound/i2c/other/tea575x-tuner.c:215: warning: implicit declaration of function 'video_unregister_device'
distcc[7333] ERROR: compile sound/i2c/other/tea575x-tuner.c on x/32 failed
make[1]: *** [sound/i2c/other/tea575x-tuner.o] Error 1
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch by Rodolfo Giometti disables the AC97 AUX and VIDEO controls
on the WM9705 when the touchscreen is selected as the AUX and VIDEO
lines are shared with the touch controller.
Changes:-
o Added AC97_HAS_NO_AUX flag
o Test for AC97_HAS_NO_AUX flag in snd_ac97_mixer_build()
o Sets AC97_HAS_NO_VIDEO and AC97_HAS_NO_AUX in patch_wolfson05() when
WM9705 touch driver is selected.
Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Change the 5th argument of snd_mpu401_uart_new() to bit flags
instead of a boolean. The argument takes bits that consist of
MPU401_INFO_XXX flags.
The callers that used the value 1 there are replaced with
MPU401_INFO_INTEGRATED.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fixed rwlock around snd_iprintf() in sound core part.
Replaced with mutex.
Also, make mutex and flags static variables with addition of
snd_card_locked() function (just for sound.c).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a get_port_info callback to the snd_rawmidi_global_ops structure to
allow the USB MIDI driver to supply information flags for the sequencer
ports created by seq_midi.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Add four new information flags SNDRV_SEQ_PORT_TYPE_HARDWARE, _SOFTWARE,
_SYNTHESIZER, _PORT for sequencer ports. This makes it easier for apps
like Rosegarden to make policy decisions based on the port type.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
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>
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>
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>
This adds the Kbuild files listing the files which are to be installed by
the 'headers_install' make target, in generic directories.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
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>
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>
- Fix possible race of referring the setup hook from the running PCM
- Fix memory leak in an error path of proc write
- Clean up the setup hook parser
Signed-off-by: Takashi Iwai <tiwai@suse.de>
- 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>
Mark the f_ops members of inodes as const, as well as fix the
ripple-through this causes by places that copy this f_ops and then "do
stuff" with it.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
OPL3_HW_OPL3_PC98 #define isn't used anywhere; previously in
sound/drivers/opl3/opl3_lib.c and sound/isa/cs423x/pc98.c, the latter of which
went away with the rest of PC98 subarch.
Signed-off-by: Arthur Othieno <apgo@patchbomb.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Modules: AC97 Codec
Add the pointer to a static volume resolution table to ac97 template,
so that the drivers can define the volume resolution, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: AC97 Codec
Added the support of static resolution table support for codecs
that the driver cannot probe the volume resolution properly.
The table pointer should be set in each codec patch.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: YMFPCI driver
Added rear_swap module option / kernel parameter to configure the rear
channel swapping. Default value is enable to make the AC3 passthrough
working, but analog only users might revert the previous behaviour.
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
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>
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>
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>
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>
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>
Fix typos in comments to remove kernel-doc warnings.
Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Since version 4.1 the gcc is warning about ignored attributes. This patch is
using the equivalent attribute on the struct instead of on each of the
structure or union members.
GCC Manual:
"Specifying Attributes of Types
packed
This attribute, attached to struct or union type definition, specifies
that
each member of the structure or union is placed to minimize the memory
required. When attached to an enum definition, it indicates that the
smallest integral type should be used.
Specifying this attribute for struct and union types is equivalent to
specifying the packed attribute on each of the structure or union
members."
Signed-off-by: Jan Blunck <jblunck@suse.de>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Modules: ALSA Core
Revert the nested-device patch to keep the compatibility with the
current HAL configuration.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: EMU10K1/EMU10K2 driver
Description:
Part way to fix ALSA bug#927
Add support for the SPI interface on the CA0108 chip.
This is used to control the registers on the DAC.
Headphone output tested.
Other outputs and Capture not tested yet.
Note: The red LED does not come on, but sound is still OK.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Modules: ALSA sequencer
Reduce the maximum possible number of global clients to 16 to make
more numbers available for card clients, and allow dynamically allocated
card client numbers to share the same range as application client
numbers to make sure that all 32 cards can be used at the same time.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
All users of snd_seq_create_kernel_client() have to set the client name
anyway, so we can just pass the name as parameter. This relieves us
from having to muck around with a struct snd_seq_client_info in these
cases.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
The fields of struct snd_seq_client_callback either aren't used or are
always set to the same value, so we can get rid of it altogether.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: AC97 Codec,ATIIXP driver,Intel8x0 driver
This patch adds a new quirk for ac97 hardware that combines the existing
AC97_TUNE_MUTE_LED and AC97_TUNE_HP_ONLY quirks. This is needed for several
current HP laptops. Additionally, it adds the HP nx6125 to the
AC97_TUNE_MUTE_LED list.
Fixed for the latest version of ALSA by Takashi Iwai <tiwai@suse.de>.
Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: EMU10K1/EMU10K2 driver
Distorted sound now comes from the Audio Out socket. Still more work to do.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Modules: ALSA Core,Memalloc module,ALSA sequencer
With dynamic minor numbers, we can increase the number of sound cards.
This requires that the sequencer client numbers of some kernel drivers
are allocated dynamically, too.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: ALSA Core,ALSA Minor Numbers
Add an option to allocate device file minor numbers dynamically.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
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>
Modules: ALSA Core
Store the snd_minor structure pointers in one array instead of using a
separate list for each card. This simplifies the mapping from device
files to minor struct by removing the need to know about the encoding
of the card number in the minor number.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
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>
Modules: ALSA Core,Control Midlevel,/oss/Makefile
Remove the centralized PM control in the sound core.
Each driver is responsible to get callbacks from bus/driver now.
SND_GENERIC_DRIVER is removed together with this action.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: ALSA Core
Backward-compatibility typedefs are stored in the new header, typedefs.h,
for out-of-tree drivers. This will be removed in future.
Signed-off-by: Takashi Iwai <tiwai@suse.de>