Commit graph

1197 commits

Author SHA1 Message Date
Mark Brown
56c32c751c Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2013-04-12 13:56:58 +01:00
Mark Brown
1341962577 Merge remote-tracking branch 'asoc/topic/component' into asoc-next 2013-04-12 13:56:56 +01:00
Lars-Peter Clausen
ef03c9ae96 ASoC: Constify the 'compr_ops' field of snd_soc_platform_driver
The ASoC core does not modify a platform driver's compr_ops structure. Making it
const allows ASoC platform drivers to declare their snd_compr_ops struct as
const.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-27 23:09:36 +00:00
Lars-Peter Clausen
1f03f55b0c ASoC: Constify the 'ops' field of snd_soc_platform_driver
The ASoC core does not modify a platform driver's ops structure. Making it const
allows ASoC platform drivers to declare their snd_pcm_ops struct as const.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-27 23:08:35 +00:00
Lars-Peter Clausen
d79e57db84 ASoC: Constify the 'driver' field of snd_soc_platform
The ASoC core does no not modify the driver of a platform. Making it const
allows ASoC platform drivers to declare the snd_soc_platform_driver struct as
const.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-27 23:08:35 +00:00
Kuninori Morimoto
f53179c026 ASoC: snd_soc_[un]register_dai[s]() become non global function
All drivers are using snd_soc_register_component()
instead of snd_soc_register_dai[s]()
snd_soc_[un]register_dai[s]() are no longer needed

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26 21:57:54 +00:00
Mark Brown
de7ba0574e Merge remote-tracking branch 'asoc/fix/max98090' into asoc-next 2013-03-26 14:08:03 +00:00
Mark Brown
a36b32402a Merge remote-tracking branch 'asoc/fix/dapm' into asoc-next 2013-03-26 14:07:58 +00:00
Joe Perches
4480764f57 ASoC:: max98090: Remove executable bit
Source files shouldn't have the executable bit set.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-20 10:54:12 +01:00
Kuninori Morimoto
61782e4f5e ASoC: add .name for snd_soc_component_driver
This patch adds .name member on snd_soc_component_driver.
But this patch doesn't care about whether cmpnt_drv was NULL,
and/or its name was NULL in snd_soc_register_component()
at this point.

Because, it is easy to switch over to
snd_soc_register_component() from snd_soc_register_dais()
if it doesn't care cmpnt_drv was NULL.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-15 01:24:57 +00:00
Kuninori Morimoto
030e79f658 ASoC: add snd_soc_register_component()
Current ASoC has register function for platform/codec/dai/card,
but doesn't have for cpu.
It often produces confusion and fault on ASoC.

As result of ASoC community discussion,
we consider new struct snd_soc_component for CPU/CODEC,
and will switch over to use it.

This patch adds very basic struct snd_soc_component,
and register function for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-13 11:07:58 +00:00
Lars-Peter Clausen
a93f8e76a4 ASoC: core: Remove unused "n_widgets" field from snd_soc_dapm struct
Commit 497098be ("ASoC: dapm: Remove bodges for no-widget CODECs") removed the
last user of the n_widgets field. Currently it is incremented for each widget
added, but the value is never used, so we can remove it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-08 20:45:10 +08:00
Lars-Peter Clausen
e383c467ce ASoC: core: Drop unused "dapm" field form soc_enum struct
This field was added in commit 2e72f8e ("ASoC: New enum type: value_enum"), but
has never been used since. Considering that the soc_enum struct is usually
shared between all instances of a CODEC, it also doesn't make much sense to have
a pointer to DAPM specific data in it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-08 20:45:05 +08:00
Linus Torvalds
7307c00f33 arm-soc: late OMAP changes
This branch contains changes for OMAP that came in late during the release
 staging, close to when the merge window opened.
 
 It contains, among other things:
 
 - OMAP PM fixes and some patches for audio device integration
 - OMAP clock fixes related to common clock conversion
 - A set of patches cleaning up WFI entry and blocking.
 - A set of fixes and IP block support for PM on TI AM33xx SoCs (Beaglebone, etc)
 - A set of smaller fixes and cleanups around AM33xx restart and revision
   detection, as well as removal of some dead code (CONFIG_32K_TIMER_HZ)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRL9AUAAoJEIwa5zzehBx3BiIQAIwJOAZQhbIsDAmqVAGfj39i
 Y6DneECJ3BvrMsC3nk6IUOC/aW5uUi2GAmhYI6YuDDKzLfeTSGW2VQcMa98cvWig
 dLo2CPqKuuB7YZAwHkg4i3BwHVJcaPntaKOajNmhwJQIiNEiXCauP/f9kG2NKvHu
 XxlWuNyeEB1uQlnB0nXL+HHqcHKxproK6eIvILWYJMdVYnMn+57O3yWBmXkCr07b
 9oOa1NdR+4xN7cSbS5YGUfxqwDWnXSZSKggXEPLglHObmSqj7R7NDBNgRR7ui8+t
 c3UYljPsiRprY8TYVTbator9wyYocZ6pMja+vrPwATHUMsxGZTurURzpYsyAXaMc
 VKWLWItCOOee8CKn1+pGpelon69//EJEFIsg1hChJJZKMRLHYVg48tM64/uN1VOo
 Mu/6XDLx4DearMxZv5pZ7Qe0IkIDGtlpyIwo1Yy6T5xEC6pcwRG0XeTuQtOxndFc
 XUcXrE+Nlg3eW/6xtB7XhftnKVoBsCrIQ5Z+PxMw1QNUTXWxQwZffeBLxGenuoD6
 IofLCdjVyRMcPnVj+s29ZO5k7yMllQ0dO8bySxoU2Y2QvD7wUdZxGDY5Nu7cwfAt
 jL0sEpT32g4ZSD8R75qt+qTDWv/IjB4EE/uNw3y2AUSTT5A+cN7H3MXw5s7hm8nI
 fw5cYz37iH0zUZhoIU/w
 =/vBT
 -----END PGP SIGNATURE-----

Merge tag 'late-omap' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC late OMAP changes from Olof Johansson:
 "This branch contains changes for OMAP that came in late during the
  release staging, close to when the merge window opened.

  It contains, among other things:

   - OMAP PM fixes and some patches for audio device integration
   - OMAP clock fixes related to common clock conversion
   - A set of patches cleaning up WFI entry and blocking.
   - A set of fixes and IP block support for PM on TI AM33xx SoCs
     (Beaglebone, etc)
   - A set of smaller fixes and cleanups around AM33xx restart and
     revision detection, as well as removal of some dead code
     (CONFIG_32K_TIMER_HZ)"

* tag 'late-omap' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (34 commits)
  ARM: omap2: include linux/errno.h in hwmod_reset
  ARM: OMAP2+: fix some omap_device_build() calls that aren't compiled by default
  ARM: OMAP4: hwmod data: Enable AESS hwmod device
  ARM: OMAP4: hwmod data: Update AESS data with memory bank area
  ARM: OMAP4+: AESS: enable internal auto-gating during initial setup
  ASoC: TI AESS: add autogating-enable function, callable from architecture code
  ARM: OMAP2+: hwmod: add enable_preprogram hook
  ARM: OMAP4: clock data: Add missing clkdm association for dpll_usb
  ARM: OMAP2+: PM: Fix the dt return condition in pm_late_init()
  ARM: OMAP2: am33xx-hwmod: Fix "register offset NULL check" bug
  ARM: OMAP2+: AM33xx: hwmod: add missing HWMOD_NO_IDLEST flags
  ARM: OMAP: AM33xx hwmod: Add parent-child relationship for PWM subsystem
  ARM: OMAP: AM33xx hwmod: Corrects PWM subsystem HWMOD entries
  ARM: DTS: AM33XX: Add nodes for OCMC RAM and WKUP-M3
  ARM: OMAP2+: AM33XX: Update the hardreset API
  ARM: OMAP2+: AM33XX: hwmod: Update the WKUP-M3 hwmod with reset status bit
  ARM: OMAP2+: AM33XX: hwmod: Fixup cpgmac0 hwmod entry
  ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags
  ARM: OMAP2+: AM33XX: hwmod: Register OCMC RAM hwmod
  ARM: OMAP2+: AM33XX: CM/PRM: Use __ASSEMBLER__ macros in header files
  ...
2013-02-28 20:00:40 -08:00
Mark Brown
8af294b472 ASoC: dapm: Fix handling of loops
Currently if a path loops back on itself we correctly skip over it to
avoid going into an infinite loop but this causes us to ignore the need
to power up the path as we don't count the loop for the purposes of
counting inputs and outputs. This means that internal loopbacks within a
device that have powered devices on them won't be powered up.

Fix this by treating any path that is currently in the process of being
recursed as having a single input or output so that it is counted for
the purposes of power decisions.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2013-02-25 13:51:22 +00:00
Takashi Iwai
c881f80ba8 ASoC: Final updates for v3.9
A few more updates from the past week - a new driver from Dialog and
 some small fixes and tweaks.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRHR9WAAoJELSic+t+oim9H3QP/A7oiOZ2uF1IcIKSrAr5NTAM
 523dXLfomETMyIqJAJ0RHC19xWb3CRpU0TBzlMnv/RGorVo89DHOTpzxUsuMYpYP
 VZiGTJFAm4c4LEIjcT4zYKwkEWQ+2dppLkjDRSTgf//SM6bgQKbpfct6fRx7GY2x
 ay1wb6zUjLhNBrW9P15Ci8KfhOigJ/iuNJfkhgOvsTU8JI6Gvl3bMhzGooQV0RYL
 oY7nf9N+AauoaAbvC76BBhT56kEx+2VqQGQXQNFXFwXr5MTrnHD7zMismNYo7jvJ
 LU0V9z85jNJtsV7Q0Ho2n5PsVs6pPg5elbMAVgnN5iDBXkQApxqmiPXPihgAtdCk
 PC96cCabwfmCzZwVN9+n7sZ05SF+knaHgObnFOgbRwzTkNsgeMGXuvN82STxP+tO
 H60ZT14MuaICIaflq3Zp0OibLY4oGfeE2zN7fVf30RHTkdxBkoiET8bb4mBrzeL5
 vZ0PxqsTu3pty4OlOtzC9qiZ8KAc3L7rM+BrQmH7NJdLiEKZ+oKwN3pVpmxS/0l4
 P9/ugz7m1zuceb4qPLg0svV5tXegwOfIZdr2nekM2BpOFJm0pYy6glvdMEW9kPr5
 oV255aTQRrFEV6LygMxIbycdGdSA/zjaUxrXIN2vthQYChCwrlKeTzhxmx+DrpLb
 TAvcZm453VXhyuTAb4N2
 =ivD5
 -----END PGP SIGNATURE-----

Merge tag 'asoc-3.9-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Final updates for v3.9

A few more updates from the past week - a new driver from Dialog and
some small fixes and tweaks.
2013-02-16 15:48:48 +01:00
Mark Brown
54759313ec Merge remote-tracking branch 'asoc/topic/da7213' into asoc-next 2013-02-14 17:28:00 +00:00
Adam Thomson
ef5c2eba24 ASoC: codecs: Add da7213 codec
This patch adds support for the Dialog DA7213 audio codec.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-14 17:27:17 +00:00
Jeeja KP
9727b490e5 ALSA: compress: add support for gapless playback
this add new API for sound compress to support gapless playback.
As noted in Documentation change, we add API to send metadata of encoder and
padding delay to DSP. Also add API for indicating EOF and switching to
subsequent track

Also bump the compress API version

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-14 12:30:22 +01:00
Takashi Iwai
83048ea7b1 ASoC: Updates for v3.9
A fairly quiet release for ASoC:
 
 - Support for a wider range of hardware in the compressed stream code.
 - The ability to mute capture streams as well as playback streams while
   inactive.
 - DT support for AK4642, FSI, Samsung I2S and WM8962.
 - AC'97 support for Tegra.
 - New driver for max98090, replacing the stub which was there.
 
 Due to dependencies we've also got support for asynchronous I/O in regmap
 and DTification of DMA support for Samsung platforms (used only by the
 I2S driver and SPI) merged here as well.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRGNLwAAoJELSic+t+oim9LoAP/23tmxelymeLVP7pIBuzI8Tz
 nMjF1K1H1C2cAiBYuPfHEeydsq5dIL+NDWo95ZDn3iLzcb95XVGUHpM9FMD5twZ1
 7gQ69c8bVYuKqP6lzm8NZ+daOw20iRsFkz+XeBD+XLVGiPlIJYRXT/AvwZEkn4WD
 +UrX/II3ipJqZumrnZtcXo79lcZw0UwymasUbyLLO9x8WO+XPJ0Mrf3NZqEUvjiR
 XhkS1KkV7MnjKPQcttuTIN88pNDVdU7s6B0kyM34XdF9S9bsMqj4VPUEVYKgtNuq
 TFm5ULbOU5NPfS+CDPSDmXQYj0uR6vPK9mM4hZwJNbdk7bCN/Ljq3aVc/jQYqeLD
 f4XyS9WlHV2iGizz8pHfRA1V6AQolvIp/b/nd1uJ5oh1R606SMzYzN53ogQacjYI
 gEMk7eXHUHEtZFhfkV/dDkMWkFChdiOT99kErObhRraNtW+0G2hrG3juXlhoWgMM
 qJdlAQs47g2/C2lFBJDH/ClAzbXNttEQn7eryo4VyS/SEy1nomoOa/ZFeWBavngJ
 HKAtuX571Ux67Vwqo+/xEI40JR6fy8RqSSPZUj346TNJg1WToH9uEUm/0M6FMJQg
 Z4hK63VIo7ZxxfCSP2lfR7UMU+aDtN1Ey2HTuskZrUqua+5VF3eXoRmcfndxDbUY
 /GsiyNOGJENoAAsrwBZw
 =tDkv
 -----END PGP SIGNATURE-----

Merge tag 'asoc-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v3.9

A fairly quiet release for ASoC:

- Support for a wider range of hardware in the compressed stream code.
- The ability to mute capture streams as well as playback streams while
  inactive.
- DT support for AK4642, FSI, Samsung I2S and WM8962.
- AC'97 support for Tegra.
- New driver for max98090, replacing the stub which was there.

Due to dependencies we've also got support for asynchronous I/O in regmap
and DTification of DMA support for Samsung platforms (used only by the
I2S driver and SPI) merged here as well.
2013-02-11 14:03:37 +01:00
Mark Brown
3bb26706d9 Merge remote-tracking branch 'asoc/topic/wm2200' into asoc-next 2013-02-11 11:06:49 +00:00
Mark Brown
3dc4b7af38 Merge remote-tracking branch 'asoc/topic/wm2000' into asoc-next 2013-02-11 11:06:48 +00:00
Mark Brown
315472d5ab Merge remote-tracking branch 'asoc/topic/tlv320aic3x' into asoc-next 2013-02-11 11:06:46 +00:00
Mark Brown
6ee00c164e Merge remote-tracking branch 'asoc/topic/simple-card' into asoc-next 2013-02-11 11:06:43 +00:00
Mark Brown
556d8b55d0 Merge remote-tracking branch 'asoc/topic/of' into asoc-next 2013-02-11 11:06:38 +00:00
Mark Brown
f0f3214e8b Merge remote-tracking branch 'asoc/topic/mxs' into asoc-next 2013-02-11 11:06:37 +00:00
Mark Brown
a948cae6ab Merge remote-tracking branch 'asoc/topic/max98090' into asoc-next 2013-02-11 11:06:36 +00:00
Mark Brown
d0c65252c4 Merge remote-tracking branch 'asoc/topic/fsi' into asoc-next 2013-02-11 11:06:35 +00:00
Mark Brown
e790245eb3 Merge remote-tracking branch 'asoc/topic/cs4271' into asoc-next 2013-02-11 11:06:33 +00:00
Mark Brown
d289323286 Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2013-02-11 11:06:30 +00:00
Paul Walmsley
cf8ba17154 ASoC: TI AESS: add autogating-enable function, callable from architecture code
Add a basic header file for the TI AESS IP block, located in the OMAP4
Audio Back-End subsystem.

Currently, this header file only contains a function to enable the
AESS internal clock auto-gating.  This will be used by a subsequent
patch to ensure that the AESS won't block the entire chip
low-power-idle mode.  We wish to be able to place the AESS into idle
even when no AESS driver has been compiled in.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Péter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-10 11:22:23 -07:00
Mark Brown
da18396f94 ASoC: core: Allow digital mute for capture
Help avoid noise from the power up of the capture path propagating through
into the start of the recording (especially noise caused by the ramp of
microphone biases) by keeping the capture muted until after we've finished
powering things up with DAPM in the same manner we do for playback. This
allows us to take advantage of soft mute support in the hardware more
effectively and is more consistent.

The core code using the existing digital mute operation is updated to take
advantage of this. Some additional cases in the soc-pcm code and suspend
will need separate handling but these are less practically relevant than
the main runtime stream start/stop case.

Rather than refactor the digital mute function in every single driver a
new operation is added for drivers taking advantage of this functionality,
the old operation should be phased out over time.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2013-02-08 11:08:44 +00:00
Jerry Wong
685e42154d ASoC: Replace max98090 Device Driver
This patch completes the replacement of the existing max98090 driver,
by installing a more complete driver.

Signed-off-by: Jerry Wong <jerry.wong@maximintegrated.com>
Tested-by: Matthew Mowdy <matthew.mowdy@maximintegrated.com>
Reviewed-by: Ralph Birt <ralph.birt@maximintegrated.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-07 12:59:34 +00:00
Chris Rattray
1a78624323 ASoC: wm2200: Provide platform data for MICBIAS configuration
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-05 15:53:07 +00:00
Hebbar Gururaja
e2e8bfdf61 ASoC: tlv320aic3x: Convert mic bias to a supply widget
Convert MicBias widgets to supply widget.

On tlv320aic3x, Mic bias power on/off shares the same register bits
with output mic bias voltage.  So, when power on mic bias, we need
reclaim it to voltage value.

Provide a new platform data so that the micbias voltage can be sent
according to board requirement. Now since tlv320aic3x codec driver
is DT aware, update dt files and functions to handle this new
"micbias-vg"  platform data.

Because of sharing of bits, when enabling the micbias, voltage also
needs to be updated. So use SND_SOC_DAPM_POST_PMU & SND_SOC_DAPM_PRE_PMD
macro to create an event to handle this.

Since micbias is converted to supply widget, updated machine drivers as
well.

This change is runtime tested on da850-evm with audio loopback
(arecord|aplay) for confirmation.

Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 18:35:19 +00:00
Kuninori Morimoto
eef28e1082 ASoC: SND_SOC_DAIFMT_GATED become 0 as default settings
Current soc-dai.h defines SND_SOC_DAIFMT_GATED as (2 << 4),
but gated clock should be default settings (= 0).
This patch fixup SND_SOC_DAIFMT_GATED as (0 << 4).

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-30 16:42:24 +08:00
Antonio Ospite
019d80db57 ALSA: Force a cast to silence a warning from "sparse"
Some audio drivers are calling snd_dma_continuous_data(GFP_KERNEL)
which makes "sparse" give a warning:

  $ make C=2 M=sound/usb modules
    ...
  sound/usb/6fire/pcm.c:625:25: warning: cast from restricted gfp_t
  sound/usb/caiaq/audio.c:845:41: warning: cast from restricted gfp_t
  sound/usb/usx2y/usbusx2yaudio.c:997:54: warning: cast from restricted gfp_t
  sound/usb/usx2y/usbusx2yaudio.c:1001:54: warning: cast from restricted gfp_t
  sound/usb/usx2y/usx2yhwdeppcm.c:774:54: warning: cast from restricted gfp_t
  sound/usb/usx2y/usx2yhwdeppcm.c:778:54: warning: cast from restricted gfp_t

Add __force to the cast to silence the warning.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-29 15:08:43 +01:00
Kuninori Morimoto
a7930ed458 ASoC: add snd_soc_of_parse_daifmt() for DeviceTree
This patch adds snd_soc_of_parse_daifmt() and supports below style on DT.

        [prefix]format = "i2c";
        [prefix]clock-gating = "continuous";
        [prefix]bitclock-inversion;
        [prefix]bitclock-master;
        [prefix]frame-master;

Each driver can use specific [prefix]
(ex simple-card,cpu,dai,format = xxx;)

This sample will be
SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CONT |
SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBM_CFM

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-27 11:41:54 +08:00
Takashi Iwai
86b2723725 ALSA: Make snd_printd() and snd_printdd() inline
Because currently snd_printd() and snd_printdd() macros are expanded
to empty when CONFIG_SND_DEBUG=n, a compile warning like below
appears sometimes, and we had to covert it by ugly ifdefs:
  sound/pci/hda/patch_sigmatel.c: In function ‘stac92hd71bxx_fixup_hp’:
  sound/pci/hda/patch_sigmatel.c:2434:24: warning: unused variable ‘spec’ [-Wunused-variable]

For "fixing" these issues better, this patch replaces snd_printd() and
snd_printdd() definitions with empty inline functions instead of
macros.  This should have the same effect but shut up warnings like
above.

But since we had already put ifdefs, changing to inline functions
would trigger compile errors.  So, such ifdefs is removed in this
patch.

In addition, snd_pci_quirk name field is defined only when
CONFIG_SND_DEBUG_VERBOSE is set, and the reference to it in
snd_printdd() argument triggers the build errors, too.  For avoiding
these errors, introduce a new macro snd_pci_quirk_name() that is
defined no matter how the debug option is set.

Reported-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-25 18:32:14 +01:00
Kuninori Morimoto
5d163336a7 ASoC: SND_SOC_DAIFMT_NB_NF become 0 as default settings
Current soc-dai.h defines SND_SOC_DAIFMT_NB_NF as (1 << 8),
but normal bit clock / normal frame should be
default settings (= 0).
This patch fixup SND_SOC_DAIFMT_NB_NF as (0 << 8).

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-16 20:28:24 +09:00
Lars-Peter Clausen
13aec722f3 ASoC: Constify ops and compr_ops fields of snd_soc_dai_link
The core does not modify these fields, so they can be made const. This allows
drivers to declare their op tables as const.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-14 07:45:21 +09:00
Kuninori Morimoto
a4a2992c53 ASoC: simple-card: add asoc_simple_dai for initializing
Current simple-card driver calls asoc_simple_card_dai_init()
if platform had a asoc_simple_card_dai_init pointer.
And, this initialization function works only
when platform has an applicable initial value for each dai settings.
And basically, almost all sound card requires certain initialization.
This means that almost all platform has initialization settings,
and driver do nothing if it doesn't have settings.

And additionally, current simple-card supports sysclk settings but it was
only for codec.  In order to abolish deviation between cpu and codec,
and in order to simplify processing,
this patch adds asoc_simple_dai, and removed pointless
struct asoc_simple_dai_init_info which was trigger of
calling asoc_simple_card_dai_init().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-14 06:55:43 +09:00
Mark Brown
587691ea39 Merge remote-tracking branch 'asoc/fix/cs4271' into tmp 2013-01-10 12:22:11 +00:00
Mark Brown
a18a31a161 Merge remote-tracking branch 'asoc/fix/core' into tmp 2013-01-10 12:21:50 +00:00
Fabio Estevam
4498a3cae5 ASoC: mxs-saif: Remove platform data
All MXS users have been converted to device tree and the board files have been
removed.

No need to keep platform data in the driver.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08 11:23:26 +00:00
David Howells
3d33fcc11b UAPI: Remove empty Kbuild files
Empty files can get deleted by the patch program, so remove empty Kbuild
files and their links from the parent Kbuilds.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-01-02 17:36:10 -08:00
Kuninori Morimoto
5d0bfc5eb9 ASoC: fsi: cleanup sh_fsi.h
FSI driver's flag usage was changed/removed by
3449f5fab8
(ASoC: fsi: add SND_SOC_DAIFMT_INV_xxx support)
ab6f6d8521
(ASoC: fsi: add master clock control functions)

And unused flags had been removed on FSI driver,
but the definition had been kept to avoid compile error.

It is possible to cleanup sh_fsi.h now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:57:20 +00:00
Kuninori Morimoto
abca75814a ASoC: fsi: remove SH_FSI_xxx_INV flags
3449f5fab8
(ASoC: fsi: add SND_SOC_DAIFMT_INV_xxx support)
added clock inversion support via snd_soc_dai_set_fmt().
Thus, this patch removed SH_FSI_xxx_INV and fsi_get_info()
from fsi driver, and modified platform settings to use new style.
Then, it cleaned up meaningless settings from platform.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:57:09 +00:00
Kuninori Morimoto
6cbdbffba1 ASoC: fsi: remove platform depended .set_rate() callback support
ab6f6d8521
(ASoC: fsi: add master clock control functions)
added driver level clock control functions.
And now, platform depended .set_rate() is no longer needed.
This patch removed unnecessary .set_rate() platform callback support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:56:55 +00:00
Daniel Mack
fd23fb9f6b ALSA: ASoC: cs4271: add optional soft reset workaround
The CS4271 requires its LRCLK and MCLK to be stable before its RESET
line is de-asserted. That also means that clocks cannot be changed
without putting the chip back into hardware reset, which also requires
a complete re-initialization of all registers.

One (undocumented) workaround is to assert and de-assert the PDN bit
in the MODE2 register.

This patch adds a new flag to both the DT bindings as well as to the
platform data to enable that workaround.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:53:28 +00:00