summaryrefslogtreecommitdiff
path: root/sound/pci/ca0106/ca0106_mixer.c
AgeCommit message (Collapse)Author
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2010-10-23ALSA: ca0106: Use card specific dac id for mute controls.Andy Owen
Signed-off-by: Andy Owen <andy-alsa@ultra-premium.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-23ALSA: ca0106: Allow different sound cards to use different SPI channel mappings.Andy Owen
Signed-off-by: Andy Owen <andy-alsa@ultra-premium.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2009-11-05ALSA: rename "PC Speaker" and "PC Beep" controls to "Beep"Jaroslav Kysela
To avoid confusion in control names for the standard analog PC Beep generator using a small Internal PC Speaker, rename all related "PC Speaker" and "PC Beep" controls to "Beep" only. This name is more universal and can be also used on more platforms without confusion. Introduce also "Internal Speaker" in ControlNames.txt for systems with full-featured build-in internal speaker. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08ALSA: ca0106 - Fix master volume scaleTakashi Iwai
The master volume dB scale was wrongly defined as 0.50dB setp while it must be 0.25dB step. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02ALSA: ca0106 - Add missing card->mixername field setupTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02ALSA: ca0106 - Add missing registrations of vmaster controlsTakashi Iwai
Although the vmaster controls are created, they aren't registered thus they don't appear in the real world. Added the missing snd_ctl_add() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@kernel.org>
2009-05-22ALSA: Kill truncate warning by shortening Sigmatel-specific AC97 control nameAndreas Mohr
ALSA sound/core/control.c:232: Control name 'Sigmatel Surround Phase Inversion Playback Switch' truncated to 'Sigmatel Surround Phase Inversion Playback ' bootup message by omitting weird Sigmatel prefix in this case; also fix up the related ca0106 mixer control removal part by using identical naming there. Signed-off-by: Andreas Mohr <andi@lisas.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-20Merge branch 'topic/ca0106-spdif-stream' into topic/ca0106Takashi Iwai
2008-12-19ALSA: ca0106 - Fix typo in resume codeTakashi Iwai
The register and channel_id pair were twisted in the pm code... Oh my. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-19ALSA: ca0106 - Add IEC958 PCM Stream controlsTakashi Iwai
Added "IEC958 PCM Stream" controls for the per-stream IEC958 status bits. Using this instead of "IEC958 Default" is safer since the status bits will be recovered to the default states after closing the PCM stream. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-04ALSA: ca0106 - Add power-management supportTakashi Iwai
Added the missing PM support for snd-ca0106 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] sound: ca0106_mixer.c fix shadowed variable warningsHarvey Harrison
Change the variable err to _err within the ADD_CTLS macro to avoid shadowing the local variable. sound/pci/ca0106/ca0106_mixer.c:710:2: warning: symbol 'err' shadows an earlier one sound/pci/ca0106/ca0106_mixer.c:663:6: originally declared here sound/pci/ca0106/ca0106_mixer.c:712:3: warning: symbol 'err' shadows an earlier one sound/pci/ca0106/ca0106_mixer.c:663:6: originally declared here sound/pci/ca0106/ca0106_mixer.c:721:3: warning: symbol 'err' shadows an earlier one sound/pci/ca0106/ca0106_mixer.c:663:6: originally declared here Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] ca0106 - Add master volume controlsTakashi Iwai
Added master volume and switch controls for ca0106 using vmaster. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai
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>
2007-11-19[ALSA] ca0106 - Check value range in ctl callbacksTakashi Iwai
Check the value ranges in ctl put callbacks properly. Some callbacks may access a wrong pointer depending on the value passed. Also, fixed the access to the wrong field for enum values, and fixed some callbacks to return the proper error code. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-16[ALSA] ca0106: Add more symbol SPI register names and use themTrent Piepho
Add more symbol name for SPI register values. Change the SPI_XXX_BIT defines from the bit number to a mask. Saves having to write (1<<SPI_XXX_BIT) all the time to convert to mask. We never end up wanting the bit number. Use all the symbol names for the SPI DAC init sequence. The sequence is exactly the same as it was before. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] ca0106: replaced control add sequences with macroTrent Piepho
Turn a rather long lined for loop that is duplicated multiple times into a macro. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] ca0106: Add analog mute controls for cards with SPI DACTrent Piepho
Add four mute controls for the analog output channels for cards that use an SPI DAC, like the SB0570 SB Live! 24-bit / Audigy SE. The Wolfson DAC doesn't support muting left/right so the controls are mono. The chip state struct gets a 32-byte array to act as a shadow of the spi dac registers. Only two registers are used for mute, but more would be needed for analog gain, de-emphasis, DAC power down, phase inversion, and other features. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] Clean up with common snd_ctl_boolean_*_info callbacksTakashi Iwai
Clean up codes using the new common snd_ctl_boolean_*_info() callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-02PCI: Cleanup the includes of <linux/pci.h>Jean Delvare
I noticed that many source files include <linux/pci.h> while they do not appear to need it. Here is an attempt to clean it all up. In order to find all possibly affected files, I searched for all files including <linux/pci.h> but without any other occurence of "pci" or "PCI". I removed the include statement from all of these, then I compiled an allmodconfig kernel on both i386 and x86_64 and fixed the false positives manually. My tests covered 66% of the affected files, so there could be false positives remaining. Untested files are: arch/alpha/kernel/err_common.c arch/alpha/kernel/err_ev6.c arch/alpha/kernel/err_ev7.c arch/ia64/sn/kernel/huberror.c arch/ia64/sn/kernel/xpnet.c arch/m68knommu/kernel/dma.c arch/mips/lib/iomap.c arch/powerpc/platforms/pseries/ras.c arch/ppc/8260_io/enet.c arch/ppc/8260_io/fcc_enet.c arch/ppc/8xx_io/enet.c arch/ppc/syslib/ppc4xx_sgdma.c arch/sh64/mach-cayman/iomap.c arch/xtensa/kernel/xtensa_ksyms.c arch/xtensa/platform-iss/setup.c drivers/i2c/busses/i2c-at91.c drivers/i2c/busses/i2c-mpc.c drivers/media/video/saa711x.c drivers/misc/hdpuftrs/hdpu_cpustate.c drivers/misc/hdpuftrs/hdpu_nexus.c drivers/net/au1000_eth.c drivers/net/fec_8xx/fec_main.c drivers/net/fec_8xx/fec_mii.c drivers/net/fs_enet/fs_enet-main.c drivers/net/fs_enet/mac-fcc.c drivers/net/fs_enet/mac-fec.c drivers/net/fs_enet/mac-scc.c drivers/net/fs_enet/mii-bitbang.c drivers/net/fs_enet/mii-fec.c drivers/net/ibm_emac/ibm_emac_core.c drivers/net/lasi_82596.c drivers/parisc/hppb.c drivers/sbus/sbus.c drivers/video/g364fb.c drivers/video/platinumfb.c drivers/video/stifb.c drivers/video/valkyriefb.c include/asm-arm/arch-ixp4xx/dma.h sound/oss/au1550_ac97.c I would welcome test reports for these files. I am fine with removing the untested files from the patch if the general opinion is that these changes aren't safe. The tested part would still be nice to have. Note that this patch depends on another header fixup patch I submitted to LKML yesterday: [PATCH] scatterlist.h needs types.h http://lkml.org/lkml/2007/3/01/141 Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-09[ALSA] Add even more 'const' to everything related to TLVTakashi Iwai
Mark TLV data as 'const' Signed-of-by: Philipp Matthias Hahn <pmhahn@pmhahn.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] ca0106: Fix sound capture on Audigy LS via AC97.James Courtier-Dutton
Fixes ALSA bug#2286 Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] snd-ca0106: Updated Enum control names.James Courtier-Dutton
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23[ALSA] Fix compile errors with older gccTakashi Iwai
Fixed compile errors with older gcc for initialization of a union. sound/pci/ca0106/ca0106_mixer.c: At top level: sound/pci/ca0106/ca0106_mixer.c:499: unknown field 'p' specified in initializer sound/pci/ca0106/ca0106_mixer.c:499: warning: missing braces around initializer sound/pci/ca0106/ca0106_mixer.c:499: warning: (near initialization for 'snd_ca0106_volume_ctls[0].tlv') Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23[ALSA] snd-ca0106: Fix dB gain TLVs.James Courtier-Dutton
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23[ALSA] HDA codec & CA0106 - add/fix TLV supportJaroslav Kysela
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23[ALSA] Control API - TLV implementation for additional information like dB scaleJaroslav Kysela
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>
2006-06-22[ALSA] ca0106: Fixes MSI K8N's SB Live 24 bit, no sound from line-in.James Courtier-Dutton
Fixed bug#1331 Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-06-22[ALSA] ca0106: Add analog capture controls.James Courtier-Dutton
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03[ALSA] snd-ca0106: update SPDIF to IEC958 in mixer control names.James Courtier-Dutton
Modules: CA0106 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03[ALSA] Remove xxx_t typedefs: PCI CA0106Takashi Iwai
Modules: CA0106 driver Remove xxx_t typedefs from the PCI CA0106 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] ca0106 - Code clean upTakashi Iwai
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>
2005-09-12[ALSA] snd-ca0106: Tidy up volume controlsJames Courtier-Dutton
CA0106 driver Playback volume controls were appearing in both the playback and capture displays of alsamixer. Now those playback controls only appear in the playback display. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-08-30[ALSA] use PCM interface for IEC958 controlsClemens Ladisch
Digigram VX core,ENS1370/1+ driver,CA0106 driver,EMU10K1/EMU10K2 driver RME HDSP driver,RME9652 driver For consistency, use the PCM interface instead of MIXER for IEC958 default/mask/stream mixer controls. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-06-22[ALSA] Add Mic capture support.James Courtier-Dutton
CA0106 driver Notes: This adds a new mixer item to switch between Mic and Line-in. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-05-29[ALSA] Implement surround71 outputs on SB Live 24bit.James Courtier-Dutton
CA0106 driver Notes: Requires updated alsa-lib. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-05-29[ALSA] Skip ac97 SPDIF controlsTakashi Iwai
CA0106 driver Skip building ac97 SPDIF controls via AC97_SCAP_NO_SPDIF. Clean up the code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds
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!