summaryrefslogtreecommitdiffstats
path: root/include/sound
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: Kill snd_assert() in other placesTakashi Iwai2008-08-131-9/+0
| | | | | | | | Kill snd_assert() in other places, 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>
* ALSA: Kill snd_assert() in sound/core/*Takashi Iwai2008-08-131-0/+2
| | | | | | | | 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>
* ALSA: Introduce snd_BUG_ON() macroTakashi Iwai2008-08-131-0/+4
| | | | | | | | | | Introduced snd_BUG_ON() macro as a replacement of snd_assert() macro. snd_assert() is pretty ugly as it has the control flow in its argument. OTOH, snd_BUG_ON() behaves like a normal conditional, thus it's much easier to read the flow. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: wss_lib: use wss detection code instead of ad1848 oneKrzysztof Helt2008-08-061-111/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Use the wss detection code and kill the ad1848 library. The library is fully assimilated into the new wss library. This required reworking of the AD1848 family code so the code is changed to correctly detect chips from the AD1848 and CS4231 families. I have tested it on following cards: Gallant SC-6600 (codec: AD1848, driver: snd-sc6600) SoundScape VIVO/90 (codec: AD1845, driver: snd-sscape) SG Waverider (codec: CS4231A, driver: Rene Herman's snd-galaxy) Opti930 (codec: built-in - CS4231 compatible, driver: snd-opti93x) Opti931 (codec: built-in - CS4231 compatible, driver: snd-opti93x) Gallant SC-70P (chip/codec: CS4237B, driver: snd-cs4236) Audio Plus 3D (chip/codec: CMI8330A, driver: snd-cmi8330) Dell Latitude CP (chip/codec: cs4236, driver snd-cs4232) Sound playback and recording works on all these cards. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Reviewed-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: wss_lib: use wss pcm code instead of ad1848 oneKrzysztof Helt2008-08-062-8/+7
| | | | | | | | | | | | | Use the wss pcm code and kill the ad1848 pcm code. The AD1848 chip is much slower than CS4231 chips so the waiting loop was increased 100x (10x is not enough). Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Reviewed-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: wss_lib: use wss mixer code instead of ad1848 oneKrzysztof Helt2008-08-062-1/+25
| | | | | | | | | Use the wss mixer code and kill the ad1848 mixer code. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Reviewed-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: wss_lib: use CS4231P instead of AD1848P (kill the AD1848P)Krzysztof Helt2008-08-061-9/+0
| | | | | | | | | Use CS4231P instead of AD1848P (kill the AD1848P). Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Reviewed-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: wss_lib: replace ad1848 mixer element macros with wss onesKrzysztof Helt2008-08-061-32/+0
| | | | | | | | | Use the wss macros instead of ad1848 ones. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Reviewed-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: wss_lib: use wss constants instead of ad1848 onesKrzysztof Helt2008-08-062-32/+6
| | | | | | | | | | | | | | Use wss constants for mode. Move ad1848 hardware constants to the wss.h. Move mixer tlv macros into the ad1848_lib.c from the ad1848.h. Drop the MODE_RUNNING spurious IRQ guard on AD1848 as it doesn not seem to be needed. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Reviewed-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: wss_lib: use struct snd_wss instead of snd_ad1848Krzysztof Helt2008-08-062-36/+13
| | | | | | | | | | The snd_wss is superset of the snd_ad1848 so kill the latter and replace it with the snd_wss. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Reviewed-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: wss_lib: rename cs4321_foo to wss_fooKrzysztof Helt2008-08-061-76/+96
| | | | | | | | | | | Rename functions and structures from the former cs4321_lib to names more corresponding with the new name: wss_lib. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Reviewed-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: wss_lib: rename cs4231.h into wss.hKrzysztof Helt2008-08-062-1/+0
| | | | | | | | | | Rename file include/sound/cs4231.h into include/sound/wss.h Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Reviewed-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: Fix limit of 8 PCM devices in SNDRV_CTL_IOCTL_PCM_NEXT_DEVICEPawel MOLL2008-08-012-2/+9
| | | | | | | | | | | | | | | | | | | | | 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>
* ALSA: Add USB US122L driverKarsten Wiese2008-08-011-1/+2
| | | | | | | | Added a new US122L usb-audio driver. This driver works together with a dedicated alsa-lib plugin. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* sound: Revert "ALSA: Fix limit of 8 PCM devices in ↵Jaroslav Kysela2008-08-012-3/+3
| | | | | | | | | | 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>
* ALSA: IEC958 definition for consumer status channel updatePawel MOLL2008-08-011-20/+69
| | | | | | | | Updated IEC958 consumer status channel definitions according to the third edition of IEC60958-3 spec. Signed-off-by: Pawel Moll <pawel.moll@st.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: Fix limit of 8 PCM devices in SNDRV_CTL_IOCTL_PCM_NEXT_DEVICEPawel MOLL2008-07-292-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* ALSA: ASoC: convert use of uint to unsigned intJon Smirl2008-07-291-1/+1
| | | | | | | | | ASOC: convert use of uint to unsigned int Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Make OpenFirmware helper include file conditionalMark Brown2008-07-291-0/+4
| | | | | | | | | | The OpenFirmware API headers don't build on all platforms so ensure that they are not included unless they are being used. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Add OpenFirmware helper for matching bus and codec driversGrant Likely2008-07-291-0/+21
| | | | | | | | | | | | | | | | | | Simple utility layer for creating ASoC machine instances based on data in the OpenFirmware device tree. OF aware platform drivers and codec drivers register themselves with this framework and the framework automatically instantiates a machine driver. At the moment, the driver is not very capable and it is expected to be extended as more features are needed for specifying the configuration in the device tree. This is most likely temporary glue code to work around limitations in the ASoC v1 framework. When v2 is merged, most of this driver will need to be reworked. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Rename mask to max to reflect usageJon Smirl2008-07-291-11/+11
| | | | | | | | | | | | Most of the ASoC controls refer to the maximum value that can be set for a control as mask but there is no actual requirement for all bits to be set at the highest possible value making the name mask misleading. Change the code to use max instead. Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Convert bitfields in ASoC into full int widthJon Smirl2008-07-291-19/+31
| | | | | | | | | | | Convert bitfields in ASoC into full int width. This is a simple mechanical conversion. Two places in the DAPM code were fixed to properly use mask. Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Allow codecs to override register displayMark Brown2008-07-291-0/+2
| | | | | | | | | | | | | | | Some codecs have unusual features in their register maps such as very large registers representing arrays of coefficients. Support these codecs in the register cache sysfs file by allowing them to provide a function register_display() overriding the default output for register contents. Also ensure that we don't overflow PAGE_SIZE while writing out the register dump. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: Add jack reporting APIMark Brown2008-07-292-0/+76
| | | | | | | | | | | | | | | | | | | | | | Currently very few systems provide information about jack status to user space, even though many have hardware facilities to do detection. Those systems that do use an input device with the existing SW_HEADPHONE_INSERT switch type to do so, often independently of ALSA. This patch introduces a standard method for representing jacks to user space into ALSA. It allows drivers to register jacks for a sound card with the input subsystem, binding the input device to the card to help user space associate the input devices with their sound cards. The created input devices are named in the form "card longname jack" where jack is provided by the driver when allocating a jack. By default the parent for the input device is the sound card but this can be overridden by the card driver. The existing user space API with SW_HEADPHONE_INSERT is preserved. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Export dapm_reg_event() fullyMark Brown2008-07-291-0/+3
| | | | | | | | | dapm_reg_event() is used by devices using SND_SOC_DAPM_REG() so needs to be exported to support building them as modules and prototyped to avoid sparse warnings and potential build issues. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Release v1.0.17Jaroslav Kysela2008-07-141-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ALSA driver for SGI O2 audio boardThomas Bogendoerfer2008-07-141-0/+46
| | | | | | | | | | This patch adds a new ALSA driver for the audio device found inside most of the SGI O2 workstation. The hardware uses a SGI custom chip, which feeds a AD codec chip. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: remove CONFIG_KMOD from soundJohannes Berg2008-07-101-1/+1
| | | | | | | | | | A bunch of things in alsa depend on CONFIG_KMOD, use CONFIG_MODULES instead where the dependency is needed at all. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: asoc: core - add Digital Audio Interface (DAI) control functions.Liam Girdwood2008-07-101-0/+21
| | | | | | | | | | This patch adds several functions for DAI control and config and replaces the current method of calling function pointers within the DAI struct. Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: asoc: core - merge structs snd_soc_codec_dai and snd_soc_cpu_dai.Liam Girdwood2008-07-101-48/+23
| | | | | | | | | | | | | This patch series merges struct snd_soc_codec_dai and struct snd_soc_cpu_dai into struct snd_soc_dai in preparation for further ASoC v2 patches. This merger removes duplication in both DAI structures and simplifies the API for other users. Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: asoc: core - refactored DAPM pin control API.Liam Girdwood2008-07-101-10/+5
| | | | | | | | | | | | | Refactored snd_soc_dapm_set_endpoint() to snd_soc_dapm_enable_pin() and snd_soc_dapm_disable_pin(). Renamed snd_soc_dapm_sync_endpoints() to snd_soc_dapm_sync(). Renamed snd_soc_dapm_get_endpoint_status() to snd_soc_dapm_get_pin_status(). Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: Release v1.0.17rc3Jaroslav Kysela2008-06-271-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Add support for generic DAPM register modifier widgetJarkko Nikula2008-06-261-0/+14
| | | | | | | | | | This generic register modifier widget is for updating multiple codec register bits at once when the widget changes its power state. Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] Revert "alsa: add annotations to bitwise type snd_pcm_hw_param_t"Jaroslav Kysela2008-06-262-24/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 36b34d2437104f323e09d7c6af6451d3c0b9c0cd. From: Al Viro <viro@ZenIV.linux.org.uk> WIW, *all* this stuff is not bitwise at all. For crying out loud, half of these types are routinely used as array indices and loop variables... If anything, we want a different set of allowed operations - subtraction between elements of type (yielding integer), addition/subtraction of integer types not bigger than ours (yielding our type), comparisons, assignments (=, +=, -=, passing to function as argument, return from function, initializers) and second/third arguments in ?:. With 0 *not* being allowed as a constant of such type. It's not bitwise; we may use the same infrastructure in sparse, but it should be a separate class of types (__attribute__((affine))). dma_addr_t is another candidate for the same treatment, but there we'll need helpers for conversions to hw-acceptable form (dma_to_le32(), etc.) and gradual conversion of drivers. ALSA ones and pm mess are absolutely straightforward cases, though. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* alsa: add annotations to bitwise type snd_pcm_hw_param_tHarvey Harrison2008-06-192-20/+24
| | | | | | | | Fully half of all alsa sparse warnings are from snd_pcm_hw_param_t degrading to integer type, this goes a long way towards eliminating them. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: Release 1.0.17rc2Jaroslav Kysela2008-06-161-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Don't block system resumeAndy Green2008-06-161-0/+1
| | | | | | | | | | | | | | | | | On OpenMoko soc-audio resume is taking 700ms of the whole resume time of 1.3s, dominated by writes to the codec over I2C. This patch shunts the resume guts into a workqueue which then is done asynchronously. The "card" is locked using the ALSA power state APIs as suggested by Mark Brown. [Added fix for race with resume to suspend and fixed a couple of nits from checkpatch -- broonie.] Signed-off-by: Andy Green <andy@openmoko.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: make snd_ctl_elem_read() and snd_ctl_elem_write() staticTakashi Iwai2008-06-131-3/+0
| | | | | | | | snd_ctl_elem_read() and snd_ctl_elem_write() are no longer used by any other drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Add SOC_SINGLE_EXT_TLV control typeMike Montour2008-06-131-0/+9
| | | | | | | Signed-off-by: Mike Montour <mail@mmontour.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Pass the DAI being configured into CPU DAI probe and removeMark Brown2008-06-131-2/+4
| | | | | | | | This allows per-DAI initialisation to be done by the CPU DAI drivers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: opti93x: add support for Opti93x codec in cs4231-libKrzysztof Helt2008-06-132-0/+11
| | | | | | | | | | This patch adds support for WSS compatible Opti93x codec to the cs4231-lib. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Tested-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: Release v1.0.17rc1Jaroslav Kysela2008-06-031-2/+2
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] emu10k1 - Fix inverted Analog/Digital mixer switch on Audigy2Takashi Iwai2008-06-021-0/+1
| | | | | | | | | | | | On Audigy2 Platinum, the Analog/Digital mixer switch is inverted. https://bugzilla.novell.com/show_bug.cgi?id=396204 The patch adds a simple workaround. There might be another device requiring a similar fix, too (or fix for audigy2 generically), but right now I fix only the known broken one. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] ASoC: Add SOC_DOUBLE_S8_TLV control typeMark Brown2008-05-291-0/+15
| | | | | | | | | The SOC_DOUBLE_S8_TLV control type was originally implemented in the UDA1380 driver by Philipp Zabel and was moved into the core by me. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] Replace CONFIG_SND_DEBUG_DETECT with CONFIG_SND_DEBUG_VERBOSETakashi Iwai2008-05-271-4/+4
| | | | | | | | Replace CONFIG_SND_DEBUG_DETECT with CONFIG_SND_DEBUG_VERBOSE to represent its meaning more better. This config isn't provided only for the detection but for more verbose debug prints in general. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] remove CVS keywordsAdrian Bunk2008-05-271-2/+0
| | | | | | | | This patch removes CVS keywords that weren't updated for a long time from comments. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] ASoC: Clarify API for bias configurationMark Brown2008-05-192-5/+26
| | | | | | | | | | | | | | | | | | | | | Currently the ASoC core configures the bias levels in the system using a callback on codecs and machines called 'dapm_event', passing it PCI style power levels as SNDRV_CTL_POWER_ constants. This is more obscure than it needs to be and has caused confusion to driver authors, especially given that DAPM is also performing power management. Address this by renaming the callback function to 'set_bias_level' and using constants explicitly representing the off, standby, pre-on and on states which DAPM transitions through. Also unexport the API for setting bias level: there are currently no in-tree users of this API other than the core itself and it is likely that the core would need to be extended to cater for any users. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] ASoC: Make CPU and codec DAI operations have same typeMark Brown2008-05-191-24/+6
| | | | | | | | | | The CPU and codec DAI operations differ only in the presence of the digital mute operation for the codec so they may as well be the same type. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] soc - DAPM - Bulk route registrationMark Brown2008-05-191-1/+16
| | | | | | | | | | | | | | | | ASoC codecs and machine drivers that use DAPM routes all cut'n'paste a loop iterating over a null terminated array of routes. Factor out this into a bulk registration function, improving the error reporting for most users, and deprecate the old API to help out of tree users pick up the changes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Graeme Gregory <graeme@openmoko.org> Cc: Frank Mandarino <fmandarino@endrelia.com> Cc: Jarkko Nikula <jarkko.nikula@nokia.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] soc - DAPM - Add bulk control registrationMark Brown2008-05-191-0/+3
| | | | | | | | | | | | | Most SoC drivers cut'n'paste a loop iterating over an array to register their DAPM controls. Provide a function they can call instead. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Graeme Gregory <graeme@openmoko.org> Cc: Frank Mandarino <fmandarino@endrelia.com> Cc: Jarkko Nikula <jarkko.nikula@nokia.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
OpenPOWER on IntegriCloud