Modules: SB drivers,ALS4000 driver
some update for the ALS4000 driver (tested with hardware in my PC):
- use common control names according to ControlNames.txt
- add some controls (Master Mono, 3D control)
- optimize struct snd_card_als4000_t layout (performance/size)
- save some bytes via unified error path
- constify some read-only data
- add ToDo list
- move GPL license text to top
- add comments
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: Common EMU synth
Pass the proper functions instead of cast of function pointers, which
can be dangerous with compiler optimizations.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: KORG1212 driver
Clean up debug prints in korg1212 driver.
Also, clean up spaces/indents in some places.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: AC97 Codec
Remove the definition of ac97_enum struct from the public ac97_codec.h.
It's used only in the module.
The location of struct ac97_pcm is moved closer to its accessor
to improve readability.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: CA0106 driver
Clean up snd-ca0106 driver code:
- Fix spaces and indents
- Remove unnecessary spinlocks
- Clean up the mixer callbacks using private_value
- Clean up mixer constructors using an array
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: Generic drivers
Clean up snd-dummy driver code.
- Make common PCM callbacks
- Simplify open callback
- Remove unnecessary irqsave in control callbacks
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: Documentation,CS5535 driver
Minor clean up and fixes for CS5535 audio driver.
Added an entry in ALSA-Configuration.txt, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add support for the CS5535 Audio device. I've fixed up some errors as per
Takashi's advice from the thread:
http://lkml.org/lkml/2005/9/15/119
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
cs5535 is a 32bit x86 only device using weird CPU features
Signed-off-by: Jaya Kumar <jayakumar.alsa@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: ENS1370/1+ driver
This patch fixes missing suspend/resume-code for snd-ens1371
(but not for snd-ens1370)
Signed-off-by: Kurt J. Bosch <kjb-temp-2005@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: HDA Codec driver
The patch fixes the problem of mute onboard HDA sound output,
buildin V.92 modem idendification and functionality.
Signed-off-by: Daniel Mueller <daniel.mueller@siemens.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: AC97 Codec
For debugging and problem finding purposes, show also the PCI subsystem
vendor/device values in the ac97#X proc file.
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Modules: EMU10K1/EMU10K2 driver
on Audigy 2 ZS Notebook.
Set the master volume to about 6 or 8% in alsamixer. This will
attenuate the output enough for better sound quality.
Note: Only stereo enabled at present.
The distortion is caused by the output path after the DSP
adding 12dB gain to the output while still in digital mode,
resulting in wrap around distortion.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Modules: EMU10K1/EMU10K2 driver
Enable side surround channels for Audigy2 EX. Tested by Rick Wright
<riwright@vt.edu>.
Signed-off-by: Lee Revell <rlrevell@joe-job.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: HDA Intel driver
Rate-limit the azx_get_response timeout message. A continuous 2 per second
is too much.
Signed-off-by: Randy Dunlap <randy_d_dunlap@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Introduce a Kconfig symbol SPARC that is defined on both the sparc and
sparc64 architectures.
This symbol makes some dependencies more readable.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
We have found some issues with Au1550 AC'97 OSS driver in 2.6
(sound/oss/au1550_ac97.c), though it also should concern 2.4 driver
(drivers/sound/au1550_psc.c).
start_dac() grabs a spinlock already held by its caller, au1550_write().
This doesn't show up with the standard UP spinlock impelmentation but when
the different one (mutex based) is in use, a lockup happens.
And the interrupt handlers also didn't grab the spinlock -- that's OK in
the usual kernel but not when the IRQ handlers are threaded. So, they're
grabbing the spinlock now (as every correct interrupt handler should do).
Signed-off-by: Konstantin Baidarov <kbaidarov@ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Earlier I unifdefed PageCompound, so that snd_pcm_mmap_control_nopage and
others can give out a 0-order component of a higher-order page, which won't
be mistakenly freed when zap_pte_range unmaps it. But many Bad page states
reported a PG_reserved was freed after all: I had missed that we need to
say __GFP_COMP to get compound page behaviour.
Some of these higher-order pages are allocated by snd_malloc_pages, some by
snd_malloc_dev_pages; or if SBUS, by sbus_alloc_consistent - but that has
no gfp arg, so add __GFP_COMP into its sparc32/64 implementations.
I'm still rather puzzled that DRM seems not to need a similar change.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Something noticed when studying use of VM_RESERVED in different drivers:
snd_usX2Y_hwdep_pcm_vm_nopage omitted to get_page: fixed.
And how did this work before? Aargh! That nopage is returning a page from
within a buffer allocated by snd_malloc_pages, which allocates a high-order
page, then does SetPageReserved on each 0-order page within.
That would have worked in 2.6.14, because when the area was unmapped,
PageReserved inhibited put_page. 2.6.15-rc1 removed that inhibition (while
leaving ineffective PageReserveds around for now), but it hasn't caused
trouble because.. we've not been freeing from VM_RESERVED at all.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
ever since suspend to disk works I had the problem that headphone
(un)plugging doesn't get detected properly anymore after the first
resume.
Reloading the module worked around this ever since, however the real
cause of the problem was that after a resume the driver only got
interrupts on "unplug" not on "plug". Reactivating the headphone status
interrupt in tumbler_resume fixes this. This shouldn't cause
any trouble with software suspend, but it would be nice if somebody
could confirm this:
Signed-off-by: Guido Guenther <agx@sigxcpu.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Since few people need the support anymore, this moves the legacy
pm_xxx functions to CONFIG_PM_LEGACY, and include/linux/pm_legacy.h.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
pci_ids cleanup: fixup bt87x.c: two macro defined IDs missed in prior cleanup.
Caught by Chun-Chung Chen <cjj@u.washington.edu>: "In the patch for bt87x.c,
you seemed have missed the two occurrences of BT_DEVICE on line 897 and
line 898."
Signed-off-by: Grant Coady <gcoady@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This allows us to eliminate the casts in the drivers, and eventually
remove the use of the device_driver function pointer methods for
platform device drivers.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch removes almost all inclusions of linux/version.h. The 3
#defines are unused in most of the touched files.
A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
unfortunatly in linux/version.h.
There are also lots of #ifdef for long obsolete kernels, this was not
touched. In a few places, the linux/version.h include was move to where
the LINUX_VERSION_CODE was used.
quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`
search pattern:
/UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h
Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch schedules obsolete OSS drivers (with ALSA drivers that support
the same hardware) for removal.
Scheduling the via82cxxx driver for removal was ACK'ed by Jeff Garzik.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sound/drivers/vx/vx_hwdep.c: In function `free_fw':
sound/drivers/vx/vx_hwdep.c:144: error: implicit declaration of function `vfree'
sound/drivers/vx/vx_hwdep.c: In function `vx_hwdep_dsp_load':
sound/drivers/vx/vx_hwdep.c:163: error: implicit declaration of function `vmalloc'
Cc: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
From: Georg Chini <georg.chini@triaton-webhosting.com>
Introduce some sbus_dma routines similar to the
ebus_dma stuff to make the code look nearly the same
for both cases.
Thanks to Christopher for testing.
Signed-off-by: David S. Miller <davem@davemloft.net>
Modules: HDA Codec driver,HDA generic driver
- Make bound controls global to all patches
- Clean up analog patches (for the upcoming extension to AD1988)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: USB generic driver
If we submit all our URBs when a playback stream is started, the first
hwptr_done update for each URB happens at the same time. This results
in an underrun when there isn't enough PCM data available at this
point for all URBs.
To avoid this, we begin submitting our URBs earlier (when the stream
is prepared), with empy packets. When the stream is started, the
prepare_playback_urb() call for each URB will be run only when the
respective URB has completed previously, so the first hwptr_done
updates will be done nicely staggered.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: MIPS AU1x00 driver
AMD Au1x00 ALSA driver fails compilation with the alternate spinlock
implementation because it doesn't do locking/unlocking correctly in some
places (passes spinlock by value).
Signed-off-by: Konstantin Baydarov <kbaidarov@ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: AZT3328 driver
this is now an even much more reworked patch (#3) for my azt3328.c ALSA driver.
IOW I spent another 4 evenings to get the sequencer timer to work properly
(my head is still hurting) and do lots of other cleanups.
Note that despite the extensive sequencer timer additions, the driver object
is still only 2kB bigger than the previous version, due to those many
optimizations...
Changes in version #3:
- fully working ALSA sequencer timer support for the card's 1024000Hz
DirectX timer (downscaling adjustable via seqtimer_scaling module param)
- an insane amount of code optimizations
- many, many cleanups
Changes in version #2:
- FOUND the 1us DirectX timer area (yay!), made the code respect it
properly
- renamed some 'weird' mixer control names according to ControlNames.txt
- cleanup unneeded debug messages, reformatting
- improved I/O register documentation
- constified many more structs
Changes in version #1:
- improves/fixes some fatal playback/recording interaction
- improves IRQ handler performance (and actually fixes some weird code)
- coalesces some I/O accesses
- slightly improves I/O interface documentation
- improves/fixes logging
- defines out some less important debug code
- constifies some data
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: EMU10K1/EMU10K2 driver,Common EMU synth
This patch fixes problems with voices cutting off or not
sounding at all.
Signed-off-by: Tim <tedon@rogers.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel,ALSA Core
Replace usage of CONFIG_SND_MAJOR with snd_major, where appropriate.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: ALSA Core,ALSA Minor Numbers
Remove the unused and undefined symbols SNDRV_DEVICE_TYPE_{MIXER,
PCM_PLOOP,PCM_CLOOP}, and introduce a new symbol SNDRV_MINOR_GLOBAL
for non-card-specific devices like the sequencer or the timer.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: AD1889 driver,RME9652 driver
This is the sound/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in sound/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use schedule_timeout_{,un}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size. Also use
human-time conversion functions instead of hard-coded division to avoid
rounding issues.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: Intel8x0 driver
1.In intel8x0_measure_ac97_clock routine, when stop DMA, there is not stop
DMA corectly, but start another PCM In2 DMA engine.
2.In do_ali_reset routine, there is only need to enable PCM IN and PCM OUT.
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Modules: Documentation,ALI5451 driver,NM256 driver
Removed multi-card supports for ali5451 and nm256 drivers.
They are supposed to be a single device.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: NM256 driver
The current snd-nm256 driver can cause Dell Latitude CSx laptops to
lock-up during module (un)load. I have isolated this to the writes to
the control port register at offset 0x6cc which were not already
protected by the existing reset_workaround.
I tried grouping these writes with the existing reset_workaround
clause, but that caused the driver to have (un)load problems on the
Dell Latitude LS laptops. So, I have implemented a reset_workaround_2
clause (please feel free to suggest a better name!) to cover this
situation and added a quirk entry for the CSx laptops.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: YMFPCI driver
We better pretend that the ymfpci timer runs at 48 kHz because the
interrupt frequency cannot be higher, and clients that would try to
use 96 kHz would run at half their desired speed.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: ALSA sequencer
When no default timer frequency has been set, initialize_timer() just
uses the maximum frequency supported by the timer, which is ridiculously
high on 96 kHz timers.
This patch introduces a default frequency of 1000 Hz for this case, and
makes sure that a frequency set by the user isn't too high.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: Maestro3 driver
This patch fixes the maestro3 driver to call the snd_m3_assp_init
function to write the DSP firmware into the ASSP chip before sending the
RUN_ASSP command, thereby solving the hang after a cold boot.
Signed-off-by: Charles R. Anderson <cra@alum.wpi.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: Intel8x0 driver
- Set buggy_irq parameter before registration of irq handler.
- Clean up module parameter handling.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: VIA82xx driver
The change only affects the via823x kind of chips.
Here the via8233_pcm_pointer_hw() function
(named snd_via8233_pcm_pointer() before)
needed to loop until a non zero position is red from the chip.
Measurements have shown that more than 200 loops are typically needed on
an Athlon64.
As io-reads cost many cycles, those loops sum up huge.
via8233_pcm_pointer_hw() runs either in interrupt or with interrupts
disabled. So it introduces significant interrupt latency.
The patch introduces a calculated position value hwptr_done,
that is updated by the interrupt routine when a period is completed.
It is only used, if the 823x chip returns a zero position, which can't
be interpreted reliably.
Further optimisation is applied on the 8233 chip's interrupt routine:
Only the SGD_SHADOW is read, as it contains all infos needed.
We ommit ~5 more register reads that way.
Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: USB generic driver
Remove the usb_reset_configuration() call from the probe callback
because it isn't needed and it may interfere with other drivers
already loaded for the device.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: VIA82xx driver
The patch enable separate DXS controls of sound function of VIA VT82xx
controller in case DXS volume is not needed for PCM Playback volume
control emulation.
Signed-off-by: Honza Maly <hkmaly@matfyz.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: Documentation,MIPS AU1x00 driver,PPC Beep,SPARC DBRI driver
Removed the use of chip_t, which was obsoleted.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: Timer Midlevel
Split or rewrite lines that are longer than 80 characters, and remove
whitespaces at the end of lines.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: Timer Midlevel
The return value of list_entry() already has the type from the second
argument, so we don't need to typecase it again.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: RTC timer driver,Timer Midlevel
Add a module pointer to the timer structure and use it for refcounting
instead of the card's module pointer to prevent the global timer
modules (rtctimer and hpetimer) from being removed while in use.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: ES1938 driver
- Clean up the last PM fix
- Add TRIGGER_SUSPEND/RESUME to disable/enable DMA properly during PM
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: ES1938 driver
This patch fixes the suspend/resume issue I'm having with ESS-Solo1
soundcard. Without this patch I might get after resume message
that kernel is disabling the IRQ5 (soundcard). If there was something
playing it wont continue after resume without this patch.
Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
- Remove vmalloc wrapper
- Add release_and_free_resource() to remove kfree_nocheck() from each driver
and simplify the code
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: ALSA Core,ALSA<-OSS emulation
Remove a global function snd_task_name(), and move it local
to snd-pcm-oss module.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: Documentation,PCM Midlevel,Timer Midlevel,ALSA Core
Use the standard getnstimeofday() function instead of ALSA's own one.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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>
Modules: Intel8x0 driver
On my Acer Aspire 3003LCi laptop, the speaker volume is not controlled
by the master control, but by the headphone control. Enabling the
'hp_only' quirk corrects this. The patch below adds this device to the
list of known quirks.
Signed-off-by: Dick Streefland <dick@streefland.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: ICE1724 driver
Remove the restcition of sample rates on Revolution 7.1 board.
This enables the low 8-44kHz sample rates.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Remove the code for supporting eight cards from the integrated
controller drivers because There Can Be Only One controller of
each type per mainboard.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: Sound Core,PCI drivers
AC97 Kconfig entries broke the ALSA device drivers menu,
so move them to a location where that won't happen,
enabling all device sub-menus to be presented together.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch cleans last ac97 audio/modem codec interception in
initialization procedures (ac97_mixer_new()) and removes obsolete
SHARED_TYPE 'locking' which prevents from AMC codecs to function
correctly.
Signed-off-by: Sasha Khapyorsky <sashak@smlink.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Modules: YMFPCI driver
This patch adds a new mixer control called 'IEC958 Loop' which makes
it possible to loop digital signals from S/PDIF-in to S/PDIF-out.
Signed-off-by: Glen Masgai <mimosius@gmx.de>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: ALSA sequencer
Remove the last parameter of snd_seq_timer_set_tick_resolution()
because it is always one.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: RTC timer driver
The check whether rtctimer_freq is a power of two can be done easier
with a simple bit operation.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: RTC timer driver
The rtc_inc variable is never used outside the interrupt handler, and
is always one where it matters, so we can just remove it.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: USB generic driver
Move the usb_complete_callback() compatibility wrapper out of the
kernel tree.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: USB generic driver
Move the usb_pipe_needs_resubmit() compatibility wrapper out of the
kernel tree.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: USB generic driver
Add more comments about other device modes and unsupported devices to
the Roland part of the quirks table.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: USB generic driver
Add a quirk entry for the Hercules DJ Console to ignore timeouts on
some mixer control transfers.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: USB generic driver
Simplify the handling of MIDI quirks by treating an interface without
quirks as a QUIRK_MIDI_STANDARD_INTERFACE.
This also fixes the bug where a MIDI_STANDARD quirk would not be
recognized.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: CMIPCI driver
If possible, use ports in the card's PCI port address range instead of
the legacy ports.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Modules: HDA Intel driver
This patch is to make the Intel HDA code work for NVIDIA azalia controller.
Modified by Takashi Iwai <tiwai@suse.de>
Signed-off-by: Vinod G. <vinodg@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>