Commit graph

531 commits

Author SHA1 Message Date
Mark Brown 6308419a19 ASoC: Push workqueue data into snd_soc_card
ASoC v2 does not use the struct snd_soc_device at runtime, using struct
snd_soc_card as the root of the card.  Begin removing data from
snd_soc_device by pushing the workqueue data into snd_soc_card, using a
backpointer to the snd_soc_device to keep things going for the time
being.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-02 15:16:23 +00:00
Mark Brown 0ecfe79878 ASoC: Don't free static data in WM9713
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:55 +00:00
Peter Ujfalusi 4290239cd0 ASoC: TWL4030: Add volume controls for outputs
All outputs have dedicated gain controls except the
HandsFree output.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:54 +00:00
Peter Ujfalusi d889a72c5c ASoC: TWL4030: Change the common playback volume controls
Add Playback volume controls for all four DACs.
All four paths has three levels of volume controls:
Digital Fine gain, Digital Coarse gain, Analog gain.

The controls are named to reflect their connection to the DACs.
Per DAC volume can be performed, if needed:
amixer sset 'DAC1 Analog'  5,10
DACL1 analog gain to 5
DACR1 analog gain to 10

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:53 +00:00
Peter Ujfalusi 381a22b564 ASoC: TWL4030: Change the capture volume control to TLV
The digital Capture gain control has a range:
0 to 31 dB in 1 dB steps.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:52 +00:00
Mark Brown fa5c76978c ASoC: Remove in-code changelog from AD73311 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:52 +00:00
Mark Brown 7d8c16a6f7 ASoC: Annotate core removal function
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:51 +00:00
Mark Brown 968a6025aa ASoC: Rename snd_soc_register_card() to snd_soc_init_card()
Currently ASoC card initialisation is completed by a function called
snd_soc_register_card().  As part of the work to allow independant
registration of cards, codecs and machines in ASoC v2 a new function of
the same name has been added so rename the existing function to
facilitate the merge of v2.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:50 +00:00
Takashi Iwai 682d5874f3 ALSA: ASoC: Fix old-style trigger callback in s3c2443-ac97.c
Fix the old-style trigger callback in s3c2443-ac97.c:
    sound/soc/s3c24xx/s3c2443-ac97.c:378: warning: initialization from incompatible pointer type

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 20:08:22 +01:00
Takashi Iwai 5220ed6b32 ALSA: ASoC: Fix compile warnings on corgi.c
Fix the wrong shutdown callback type.  Also removed the unused variables
there:

  sound/soc/pxa/corgi.c: In function 'corgi_shutdown':
  sound/soc/pxa/corgi.c:114: warning: unused variable 'codec'
  sound/soc/pxa/corgi.c: At top level:
  sound/soc/pxa/corgi.c:175: warning: initialization from incompatible pointer type

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 20:00:47 +01:00
Takashi Iwai 0bc286e2ac Revert "ALSA: soc - Fix compile warnings in wm8903.c"
This reverts commit 9171e5e6a2.

I can't reproduce the compile warnings any more.  The warnings
might be some weird cross-compiling set up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 20:00:20 +01:00
Takashi Iwai 2caf6a1f9c ALSA: ASoC: Remove superfluous dependency on SND_SOC
The dependency on SND_SOC is already fulfilled in sound/soc/Kconfig,
thus no more need in Kconfig of each sub directory.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 18:02:33 +01:00
Takashi Iwai 3af4182cc5 Merge branch 'upstream' into topic/asoc 2008-12-01 18:02:17 +01:00
Takashi Iwai f5d4c67e41 ALSA: soc - Remove obsoleted sound/driver.h inclusion
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 16:29:47 +01:00
Takashi Iwai 9171e5e6a2 ALSA: soc - Fix compile warnings in wm8903.c
Hide annoying uninitialized warnings:
  sound/soc/codecs/wm8903.c:382: warning: ‘reg’ may be used uninitialized in this function
  sound/soc/codecs/wm8903.c:383: warning: ‘shift’ may be used uninitialized in this function

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 15:39:13 +01:00
Daniel Mack 54f0191629 ASoC: Allow more routing features for tlv320aic3x
This patch enables more routing functions for tlv320aic3x codecs.
It is now possible to

 - control the volume of the PGA bypass path for the HPL, HPR, HPLCOM
   and HPRCOM outputs individually
 - route right line1 input to the left ADC channel
 - route left line1 input to the right ADC channel
 - route right mic3 input to left DAC channel
 - route left mic3 input to right DAC channel
 - route left line1 input to right line1 output
 - route right line1 input to left line1 output

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-26 18:30:59 +00:00
Mark Brown 414ff491b2 ASoC: Fix word wrapping in OMAP Kconfig
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-26 10:32:26 +00:00
Qinghuang Feng 9e0f1b7f6b ASoC: Clean up kernel-doc for snd_soc_dai_set_fmt
There is no argument named @clk_id in snd_soc_dai_set_fmt,
remove its' comment.

Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-25 15:51:12 +00:00
Dmitry Baryshkov 5c0d7bb797 ASoC: tosa: move gpio probing to machine callbacks
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-25 15:37:37 +00:00
Misael Lopez Cruz 4451582f7e ASoC: Add support for TI SDP3430
This patch add ASoC support for TI SDP3430. It's based on Gumstix
Overo SoC code by Steve Sakoman.

Signed-off-by: Misael Lopez Cruz <mesak82@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-25 15:28:57 +00:00
Arun KS 9c8f1a0e6e ASoC: Fix TWL4030 Kconfig dependency
Fixes Kconfig dependency of TWL4030 audio codec driver
with TWL4030 core driver on both overo and omap2evm
boards

Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-25 15:28:47 +00:00
Jarkko Nikula 375e8a7c94 ASoC: OMAP: Add support for mono audio links in McBSP DAI
Patch adds support for mono audio links so that McBSP DAI can operate with
real mono codecs. In I2S, the signalling remains the same but only first
frame (left channel) is transmitting audio data and second frame having null
data. In DSP_A, only first frame is transmitted.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-25 15:21:26 +00:00
Jarkko Nikula 0be43050d4 ASoC: OMAP: Apply channel constrains to N810 machine driver
Prepare for upcoming McBSP DAI update adding support for mono links by
restricting number of channels to 2 in N810. This is due tlv320aic3x which
claims channels_min = 1 and playing pure mono audio over I2S would cause
it to be played only from left channel if both cpu and codec DAI's claim to
support mono.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-25 15:20:55 +00:00
Mark Brown fde22f272d ASoC: Lower priority of resume work logging
Now that the ASoC resume has been punted to a workqueue for a release
cycle without attracting bug reports it should be safe to make the
log messages associated with it debug level, reducing noise and kernel
size in production configurations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 18:09:05 +00:00
Mark Brown 67c91513b8 ASoC: Flag AD1980 as an AC97 interface
Special handling is required for suspend and resume of AC97 codecs
due to the control path going over the data bus.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 18:01:37 +00:00
Mark Brown 3ba9e10a6d ASoC: Remove DAI type information
DAI type information is only ever used within ASoC in order to special
case AC97 and for diagnostic purposes. Since modern CPUs and codecs
support multi function DAIs which can be configured for several modes
it is more trouble than it's worth to maintain anything other than a
flag identifying AC97 DAIs so remove the type field and replace it with
an ac97_control flag.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 18:01:31 +00:00
Peter Ujfalusi b0bd53a739 ASoC: TWL4030: Add helper function for output gain controls
Some of the gain controls in TWL (mostly those which are associated with
the outputs) are implemented in an interesting way:
 0x0 : Power down (mute)
 0x1 : 6dB
 0x2 : 0 dB
 0x3 : -6 dB
Inverting not going to help with these.
Custom volsw and volsw_2r get/put functions to handle these gains.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 14:05:40 +00:00
Peter Ujfalusi 0d33ea0b0f ASoC: TWL4030: Add CGAIN volume control
Add CGAIN (Coarse gain control) to TWL4030 codec.
The range of the CGAIN is:
0 dB to 12 dB in 6 dB steps.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 14:05:40 +00:00
Peter Ujfalusi c10b82cf08 ASoC: TWL4030: Change the Master volume control to TLV
TWL4030 FGAIN volume control has a range:
-62 to 0 dB in 1 dB steps, 0 in the FGAIN means mute.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 14:05:39 +00:00
Peter Ujfalusi f8d05bdbb0 ASoC: TWL4030: Disable soft-volume
Keep Soft-volume disabled for now, since if it is enabled
the FGAIN volume controls are not working in the current
configuration:
CODEC_MODE:OPT_MODE = 1
OPTION:ARXR2_EN = 1
OPTION:ARXL2_EN = 1
OPTION:ARXR1_EN = 0
OPTION:ARXL1_VRX_EN = 0
RX_PATH_SEL:RXL1_SEL = 0x0 (or 0x1)
RX_PATH_SEL:RXR1_SEL = 0x0 (or 0x1)

After the patch, FGAIN volume control works.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 14:05:39 +00:00
Mark Brown 55b8bac50a ASoC: Use supplied DAI for WM9713 rather than substream
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 14:05:34 +00:00
Mark Brown 39639faba9 ASoC: Improve error reporting for AC97 reset failures
Print something a bit more verbose to help make errors a little more
obvious.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:35:07 +00:00
Mark Brown 0e734ad5d1 ASoC: Staticise pxa2xx_pcm_ops
It's not exported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:35:07 +00:00
Jarkko Nikula 0c758bdd67 ASoC: OMAP: Fix preprocessor filled DAI name in McBSP DAI
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:35:06 +00:00
Mark Brown 2dac9217b2 ASoC: Add Marvell Zylonite machine support
Implement support for the Marvell Zylonite PXA3xx reference platform,
supporting standard AC97 stereo and AUX interfaces together with the
auxiliary I2S interface of the WM9713.

The board has two options for the MCLK of the WM9713: either the standard
AC97 system clock can be used or the 13MHz CLK_POUT output of the PXA3xx
can be used, selected via SW15 on the board. Currently only the AC97
system clock is supported by this driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:35:02 +00:00
Mark Brown dee89c4d94 ASoC: Merge snd_soc_ops into snd_soc_dai_ops
Liam Girdwood's ASoC v2 work avoids having two different ops structures
for DAIs by merging the members of struct snd_soc_ops into struct
snd_soc_dai_ops, allowing per DAI configuration for everything.
Backport this change.

This paves the way for future work allowing any combination of DAIs to
be connected rather than having fixed purpose CODEC and CPU DAIs and
only allowing CODEC<->CPU interconnections.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:12:10 +00:00
Karl Beldan 5de27b6cc0 ASoC: ssm2602: Update supported stream formats
Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:02:07 +00:00
Karl Beldan faab5a32f4 ASoC: ssm2602: Fix priv substreams refs
Clean up our record of the active streams in shutdown(), fixing
subsequent failures of snd_pcm_hw_constraints_complete after closure of
a stream.

NOTE:
- The ssm2602 allows pairs of non-matching PB/REC rates.
- This is a fix for less evil:
  The logic is flawed (e.g. the slave might startup before the
  master's rate and sample_bits are set).

Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:02:07 +00:00
Mark Brown 875065491f ASoC: Rename snd_soc_card to snd_soc_machine
One of the issues with the ASoC v1 API which has been addressed in the
ASoC v2 work that Liam Girdwood has done is that the ALSA card provided
by ASoC is distributed around the ASoC structures. For example, machine
wide data such as the struct snd_card are maintained as part of the
CODEC data structure, preventing the use of multiple codecs. This has
been addressed by refactoring the data structures so that all the data
for the ALSA card is contained in a single structure snd_soc_card which
replaces the existing snd_soc_machine and snd_soc_device.

Begin the process of backporting this by renaming struct snd_soc_machine
to struct snd_soc_card, better reflecting its function and bringing it
closer to standard ALSA terminology.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:02:01 +00:00
Mark Brown 9b0db7e7fd ASoC: Convert blackfin machines to use DAI accessor functions
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-19 13:25:32 +00:00
Mark Brown d0c36631bb ASoC: s3c24xx_uda134x DAI accessor functions and static cleanup
Missed these during review.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-19 13:24:52 +00:00
Arun KS df573d2fd1 ASoC: Add support for omap2evm board
This patch adds twl4030 audio support on omap2evm

Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-19 13:18:59 +00:00
Hugo Villeneuve 08bd168696 ASoC: Add driver for the Lyrtech SFFSDR board
The PCM3008 is used on the Lyrtech SFFSDR board, in conjunction with an
FPGA that generates the bit clock and the master clock

[Downgraded the rate debug print to pr_debug() in hw_params, converted
asm/gpio.h to linux/gpio.h -- broonie]

Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-19 13:18:42 +00:00
Hugo Villeneuve 1c0090c280 ASoC: Add PCM3008 ALSA SoC driver
The PCM3008 is a 16-bit stereo audio codec. It accepts
left-justified format for ADC, and right-justified format
for DAC. Independent power-down modes for ADC and DAC are
provided, as well as a digital de-emphasis filter (4 modes).

[Merged Makefile & Kconfig, changed asm/gpio.h to linux/gpio.h -- broonie]

Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-19 13:16:38 +00:00
Mark Brown 72f2b89445 ASoC: Move uda134x_codec.h to uda134x.h
For consistency with other ASoC codec drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-18 12:32:33 +00:00
Mike Frysinger a0bd65f45f ASoC: Blackfin: always set a default value for that GPIO range
Cc: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-18 12:32:33 +00:00
Bryan Wu 27b9be5a78 ASoC: Blackfin: Simplify the MMAP_SUPPORT macros protected code
Cc: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-18 12:32:32 +00:00
Mike Frysinger caa45836d6 ASoC: Blackfin: do not force TWI bus for ssm2602 codec
Cc: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-18 12:32:32 +00:00
Michael Hennerich 0cade26e36 ASoC: Fix Blackfin AC97 DAI probe function return code
A probe function should have a clean return 0 path.

Cc: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-18 12:32:11 +00:00
Cliff Cai a89e611a1d ASoC: Blackfin: Fix AD1980/1 build with MMAP support disabled
clean up redudent code and correct building problem in non-mmap mode

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-18 11:40:21 +00:00