Commit graph

21124 commits

Author SHA1 Message Date
Mark Brown 16ca41c6cc Merge remote-tracking branches 'asoc/topic/wm8960', 'asoc/topic/wm8988' and 'asoc/topic/xtfpga' into asoc-next 2015-02-04 20:57:26 +00:00
Mark Brown dacff834fa Merge remote-tracking branches 'asoc/topic/txx9', 'asoc/topic/wm8750', 'asoc/topic/wm8804' and 'asoc/topic/wm8904' into asoc-next 2015-02-04 20:57:24 +00:00
Mark Brown 801a5656da Merge remote-tracking branches 'asoc/topic/tdm-slot', 'asoc/topic/tegra', 'asoc/topic/tlv320aic3x', 'asoc/topic/ts3a227e' and 'asoc/topic/ts3a277e' into asoc-next 2015-02-04 20:57:21 +00:00
Mark Brown cb6bfd3de4 Merge remote-tracking branches 'asoc/topic/rx51', 'asoc/topic/samsung', 'asoc/topic/sh', 'asoc/topic/simple' and 'asoc/topic/sta32x' into asoc-next 2015-02-04 20:57:18 +00:00
Mark Brown e89817d4af Merge remote-tracking branches 'asoc/topic/rockchip', 'asoc/topic/rt5645' and 'asoc/topic/rt5677' into asoc-next 2015-02-04 20:57:17 +00:00
Mark Brown d84dbf3351 Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next 2015-02-04 20:57:16 +00:00
Mark Brown 4f1eacf544 Merge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/imx', 'asoc/topic/intel', 'asoc/topic/mxs-saif' and 'asoc/topic/nuc900' into asoc-next 2015-02-04 20:57:13 +00:00
Mark Brown d40d19447b Merge remote-tracking branches 'asoc/topic/doc', 'asoc/topic/dwc', 'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/fsl-asrc' into asoc-next 2015-02-04 20:57:11 +00:00
Mark Brown 6d5c729dab Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/dai' and 'asoc/topic/davinci' into asoc-next 2015-02-04 20:57:10 +00:00
Mark Brown f238479b6b Merge remote-tracking branches 'asoc/topic/bt-sco', 'asoc/topic/cs35l32', 'asoc/topic/cs42l52' and 'asoc/topic/cs42l56' into asoc-next 2015-02-04 20:57:09 +00:00
Mark Brown 699994d07e Merge remote-tracking branches 'asoc/topic/ad193x', 'asoc/topic/alc5632', 'asoc/topic/atmel' and 'asoc/topic/au1x' into asoc-next 2015-02-04 20:57:07 +00:00
Mark Brown 7a869e108e Merge remote-tracking branch 'asoc/topic/w-codec' into asoc-next 2015-02-04 20:57:06 +00:00
Mark Brown 7d590e4623 Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next 2015-02-04 20:57:06 +00:00
Mark Brown 3223d9c62c Merge remote-tracking branch 'asoc/topic/pcm' into asoc-next 2015-02-04 20:57:05 +00:00
Mark Brown 3967752a57 Merge remote-tracking branch 'asoc/topic/dmaengine' into asoc-next 2015-02-04 20:57:05 +00:00
Mark Brown b47f8a5dfb Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next 2015-02-04 20:57:04 +00:00
Mark Brown d01aa9b704 Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2015-02-04 20:57:04 +00:00
Mark Brown de784bed8f Merge remote-tracking branches 'asoc/fix/ac97', 'asoc/fix/atmel', 'asoc/fix/intel', 'asoc/fix/rt286', 'asoc/fix/rt5640', 'asoc/fix/sgtl5000', 'asoc/fix/sta32x', 'asoc/fix/tlv320aic3x' and 'asoc/fix/wm8731' into asoc-linus 2015-02-04 20:56:58 +00:00
Lad, Prabhakar e7a0332f71 ASoC: ts3a227e: fix sparse warning
this patch fixes following sparse warning:
ts3a227e.c:222:5: warning: symbol 'ts3a227e_enable_jack_detect' was not declared. Should it be static?

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04 20:08:59 +00:00
Jie Yang c41cda1dbe ASoC: Intel: initial scalar variable ba
Reported by Coverity: CID 1267985 CID 1267986

Fix these two Defects: Uninitialized scalar variable.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04 12:31:43 +00:00
Jyri Sarha b8255930e0 ASoC: tlv320aic3x: Fix bad comment before intercon_extra_3104 definition
The intercon_extra_3104 is obviously for tlv320aic3104.

Reported-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04 10:31:03 +00:00
Takashi Iwai 3fe9cf390f Merge branch 'topic/snd-device' into for-next 2015-02-03 17:57:16 +01:00
Eric Nelson 58cc9c9a17 ASoC: sgtl5000: add delay before first I2C access
To quote from section 1.3.1 of the data sheet:
	The SGTL5000 has an internal reset that is deasserted
	8 SYS_MCLK cycles after all power rails have been brought
	up. After this time, communication can start

	...
	1.0us represents 8 SYS_MCLK cycles at the minimum 8.0 MHz SYS_MCLK.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-02-03 13:08:41 +00:00
Jyri Sarha 9503112d90 ASoC: tlv320aic3x: Add support for tlv320aic3104
Disables GPIO support and LINE2 input and renames Mic3 input to Mic2,
if tlv320aic3104 mode is seleced. Devicetree binding document is
updated accordingly.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-03 12:14:57 +00:00
Nicholas Mc Guire 6ccd93bdb9 ALSA: line6: fixup of line6_start_timer argument type
line6_start_timer passes an unsigned int as argument to be used in mod_timer
which is then used by mod_timer as unsigned long, this just fixes up the
argument type. This change helps make static code checkers happy.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-03 09:44:04 +01:00
Nicholas Mc Guire 695758c6c4 ALSA: line6: use msecs_to_jiffies for conversion
This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-03 09:43:55 +01:00
Takashi Iwai d29697dc3b ASoC: Add sysfs entries via static attribute groups
Instead of calling device_create_file() manually, assign the static
attribute group entries at the device registration.  This simplifies
the error handling and avoids the possible races.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 20:02:42 +00:00
Fang, Yang A 842aaa0cbf ASoC: Intel: Add support rt5645 in sst driver
Added entry in sst driver to support rt5645 codec
for intel Braswell platform.

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 19:05:48 +00:00
Kuninori Morimoto d7c42ff8c3 ASoC: rsnd: call missing snd_soc_unregiter_component/platform()
Current Renesas R-Car sound driver doesn't call
snd_soc_unregiter_component/platform() in .remove.
This patch call these functions.

Reported-by: Nguyen Viet Dung <nv-dung@jinso.co.jp>
Reported-by: Bui Duc Phuc <bd-phuc@jinso.co.jp>
Reported-by: Cao Minh Hiep <cm-hiep@jinso.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 18:37:56 +00:00
Kuninori Morimoto d1f83d6ef4 ASoC: rsnd: call missing snd_ctl_remove()
Current Renesas R-Car sound driver is using snd_ctl_xxx()
functions, but it didn't call snd_ctl free_one() / snd_ctl_remove().
This patch call these functions.

Reported-by: Nguyen Viet Dung <nv-dung@jinso.co.jp>
Reported-by: Bui Duc Phuc <bd-phuc@jinso.co.jp>
Reported-by: Cao Minh Hiep <cm-hiep@jinso.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 18:37:56 +00:00
Peter Ujfalusi caa1d794cc ASoC: davinci-mcasp: Fix DIT only McASP instance support
One of the McASP instances in DM646x line of DMSoC only supports DIT mode.
This means that the given IP does not have support for rx and all the rx
related resources are missing, like irq and DMA request.
The driver should not fail if any or all  of the RX resource is missing
when the op_mode is set to DIT mode.
Since RX is not possible in DIT mode, we can just ignore the rx resources
when the McASP is used in DIT mode.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 18:32:43 +00:00
Peter Ujfalusi 8f511ffb6b ASoC: davicni-mcasp: Mark the common irq line as shared
On DA830 devices McASP0,1 and 2 shares a single combined interrupt request
line.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 18:32:43 +00:00
Peter Ujfalusi 67d35e5bc3 ASoC: davinci-evm: Do not include davinci-pcm.h and davinci-i2s.h
There is no need for them to be included.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 18:26:15 +00:00
Peter Ujfalusi 2f91ab86ec ASoC: davinci-evm: Do not include edma headers
The machine driver has no business with the underlying dma.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 18:26:15 +00:00
Takashi Iwai 830953c072 ALSA: Drop snd_get_device() helper
Since the device is no longer hidden but embedded into each component,
we no longer need snd_get_device().  Let's drop it and relevant codes.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 17:01:38 +01:00
Takashi Iwai 40a4b26385 ALSA: Simplify snd_device_register() variants
Now that all callers have been replaced with
snd_device_register_for_dev(), let's drop the obsolete device
registration code and concentrate only on the code handling struct
device directly.  That said,

- remove the old snd_device_register(),
- rename snd_device_register_for_dev() with snd_device_register(),
- drop superfluous arguments from snd_device_register(),
- change snd_unregister_device() to pass the device pointer directly

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 17:01:26 +01:00
Takashi Iwai 04c5d5a430 ALSA: compress: Embed struct device
Like previous patches, this one embeds the struct device into struct
snd_compr.  As the dev field wasn't used beforehand, it's reused as
the new device struct.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 14:42:45 +01:00
Takashi Iwai 5205388d2d ALSA: seq: Handle the device directly
Like the previous change for the timer device, this patch changes the
device management for the ALSA sequencer device using the struct
device directly.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 14:42:45 +01:00
Takashi Iwai 89da061f0a ALSA: timer: Handle the device directly
This is a relatively straightforward change, using the struct device
directly for managing the ALSA timer device.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 14:42:44 +01:00
Takashi Iwai 7c35860d1a ALSA: timer: Propagate the error at initialization
... instead of just printing errors.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 14:42:44 +01:00
Takashi Iwai 07cc3e8bd5 ALSA: rawmidi: Use rawmidi device file for kernel messages
... instead of card's device.  This will be helpful to distinguish
errors from multiple rawmidi devices on a single card.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 14:42:43 +01:00
Takashi Iwai aee5012fbb ALSA: rawmidi: Embed struct device
Like previous patches, this changes the device management for rawmidi,
embedding the struct device into struct snd_rawmidi.  The required
change is more or less same as hwdep device.

The currently unused dev field is reused as the new embedded struct
field now.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 14:42:43 +01:00
Takashi Iwai ef46c7af93 ALSA: pcm: Embed struct device
Like previous patches, at this time we embed the struct device into
PCM object.  However, this needs a bit more caution: struct snd_pcm
doesn't own one device but two, for both playback and capture!  Thus
not struct snd_pcm but struct snd_pcm_str object contains the device.

Along with this change, pcm->dev field is dropped for avoiding
confusion.  It was meant to point to a non-standard parent.  But,
since now we can touch each struct device directly, we can manipulate
the parent field easily there, too.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 14:42:42 +01:00
Takashi Iwai 7b46160000 ALSA: hwdep: Embed struct device
Like the previous patch, this one embeds the device object into hwdep
object.  For a proper object lifecycle, it's freed in the release
callback.

This also allows us to create sysfs entries via passing to the groups
field of the device without explicit function calls.  Since each
driver can see the device and touch its groups field directly, we
don't need to delegate in hwdep core any longer.  So, remove the
groups field from snd_hwdep, and let the user (in this case only
hda_hwdep.c) modify the device groups.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 14:42:42 +01:00
Takashi Iwai 0fcd9f4b3c ALSA: control: Embed struct device
This patch embeds a struct device for the control device into the card
object and avoid the device creation at registration time.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 14:42:41 +01:00
Takashi Iwai 4b440be667 ALSA: Add a helper to initialize device
Introduce a new helper function snd_device_initialize() to initialize
the device object for sound devices.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 14:42:33 +01:00
Takashi Iwai 23c18d4bfd ALSA: control: Provide a helper to look for the preferred subdevice
Instead of open-coding the search over the control file loop, provide
a helper function for the preferred subdevice assigned to the current
process.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 14:21:21 +01:00
Takashi Iwai 92b7952da8 ALSA: Allow to pass the device object to snd_register_device*()
This is a preliminary patch for the further work on embedding struct
device into each sound device instance.  It changes
snd_register_device*() helpers to receive the device object directly
for skipping creating a device there.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 14:21:07 +01:00
Bo Shen 56bbd86c2e ASoC: atmel-pcm-dma: won't check direction when configure dma
As DMA framework request DMA using direction only in prep_slave
function, (The At91 xdma driver has adapted to this request).
So won't check direction when do DMA configuration.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 12:18:45 +00:00
Chris Rorvick 58647286ab ALSA: line6: Remove unused line6_midibuf_skip_message()
Use of this function ended with commits 3e58c868db ("staging: line6:
drop midi_mask_receive") and af89d2897a ("staging: line6: drop
midi_mask_transmit".)

[Removed the corresponding line in midibuf.h, too -- tiwai]

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-01 09:35:25 +01:00
Chris Rorvick 642adf5f9a ALSA: line6: Remove unused line6_midibuf_status()
This function has not been used since merging the driver into the kernel
(and a good while before that.)

[Removed the corresponding line in midibuf.h, too -- tiwai]

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-01 09:35:24 +01:00
Bo Shen 3fd5b30c57 ASoC: atmel_ssc_dai: only clean PDC when using PDC
Only using PDC, it needs to clean PDC registers.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 14:20:24 +01:00
Bo Shen cbaadf0f90 ASoC: atmel_ssc_dai: refactor the startup and shutdown
In startup function, enable ssc clock and in shutdown function,
disable clock. And also remove disable ssc in shutdown function,
as ssc is disabled in prepare function.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 14:20:23 +01:00
Bo Shen 20cf2603b1 ASoC: atmel_ssc_dai: fix the setting for DSP mode
When SCC work in DSP A mode, the data outputs/inputs are shift out on
falling edge, the frame sync are sample on the rising edge.

Reported-by: Songjun Wu <songjun.wu@atmel.com>
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 14:19:41 +01:00
Filip Brozovic 9ee802ec5b ASoC: sgtl5000: Use shift mask when setting codec mode
Shift the I2S mode value by the necessary amount before writing the
registers. This makes Right Justified and PCM mode work in addition to
the default Left Justified mode.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 14:18:21 +01:00
Peter Ujfalusi 0b65ba9981 ASoC: tlv320aic3x: Fix data delay configuration
Fix the issue introduced by:
3684940933 ASoC: tlv320aic3x: Add TDM support

The CTRLC register were not receiving the correct delay configuration,
which will corrupt DSP_A audio mode.

Fixes: 3684940933 (ASoC: tlv320aic3x: Add TDM support)
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-01-30 14:11:45 +01:00
Peter Ujfalusi 2ca087bc9e ASoC: rx51: Correct DAPM route for capture
"Mic Bias" is DAPM_SUPPLY so it has to be connected in the route
accordingly.
Fixes audio capture on the board.

Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 13:50:31 +01:00
Arnd Bergmann 7c47cd7ffd ASoC: pxa: make TTC DKB tristate
In a rare combination of Kconfig settings, the 88pm860x-codec
module may be selected as a loadable module, while it's also being
used by the ttb-dkb code that is built-in, resulting in a link
error:

sound/built-in.o: In function `ttc_pm860x_init':
:(.text+0x3e888): undefined reference to `pm860x_hs_jack_detect'
:(.text+0x3e898): undefined reference to `pm860x_mic_jack_detect'

Changing ttb-tkb to a tristate option tells Kconfig that 88pm86x
actually needs to be built-in if ttc-dkb is also built-in.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 13:44:35 +01:00
Peter Rosin eb5271497f ASoC: atmel_ssc_dai: Support SND_SOC_DAIFMT_CBM_CFS on I2S
Signed-off-by: Peter Rosin <peda@axentia.se>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 13:29:04 +01:00
Takashi Iwai 6eb3db91f2 Merge branch 'topic/line6' into for-next 2015-01-30 12:15:55 +01:00
Peter Rosin 9c7da1a57b ASoC: pcm512x: Use the correct range constraints for S24_LE
This was overlooked in the late change to remove the I2S padding bits
from S24_LE mode. The patch also limits S32_LE mode to 384kHz, the
maximum according to the datasheets.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-29 12:02:29 +00:00
Peter Rosin 2599a9609c ASoC: pcm512x: Fixup warning splat
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-29 12:02:29 +00:00
Arnd Bergmann 4c121129c9 ASoC: rt5677: fix SPI dependency
The rt5677 codec has gained code that requires SPI to work correctly,
but there is no provision in Kconfig to prevent the driver from
being used when SPI is disabled or a loadable module, resulting
in this build error:

sound/built-in.o: In function `rt5677_spi_write':
:(.text+0xa7ba0): undefined reference to `spi_sync'
sound/built-in.o: In function `rt5677_spi_driver_init':
:(.init.text+0x253c): undefined reference to `spi_register_driver'

ERROR: "spi_sync" [sound/soc/codecs/snd-soc-rt5677-spi.ko] undefined!
ERROR: "spi_register_driver" [sound/soc/codecs/snd-soc-rt5677-spi.ko] undefined!

This makes the SPI portion of the driver depend on the SPI subsystem,
and disables the function that uses SPI for firmware download if SPI
is disabled. The latter may not be the correct solution, but I could
not come up with a better one.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: af48f1d08a ("ASoC: rt5677: Support DSP function for VAD application")
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-29 11:52:21 +00:00
Arnd Bergmann f9a7ba3269 ASoC: davinci: fix DM365_EVM codec selection
An earlier bug fix of mine made the SND_DM365_VOICE_CODEC symbol
tristate to avoid creating an undefined reference from the
davinci-vcif.c driver to the davinci_soc_platform_register
function that may be in a module.

However, this may now lead to a different error on randconfig
kernels:

"warning: SND_DM365_VOICE_CODEC creates inconsistent choice state"

This happens because we now have a choice statement with
one bool and one tristate option, and the latter might not
support being set to 'y' because of dependencies.

This new change turns the other option into 'tristate' as well,
which avoids the problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 19926c6de0 ("ASoC: davinci: vcif must be a module if SND_DAVINCI_SOC is")
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-29 11:51:29 +00:00
Takashi Iwai d832f3dcb6 Merge branch 'topic/ak411x-fix' into for-next 2015-01-28 22:32:10 +01:00
Takashi Iwai 1781e78c63 ALSA: ak411x: Fix race of reinit() calls
Protect the call with a mutex, as this may be called in parallel
(either from the PCM rate change and the clock change).

Acked-by: Jaroslav Kysela <perex@perex.cz>
Tested-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 22:30:18 +01:00
Takashi Iwai 1293617cdd ALSA: ak411x: Add PM helper functions
Define snd_ak4114_suspend() and snd_ak4114_resume() functions to
handle PM properly, stopping and restarting the work at PM.
Currently only ice1712/juli.c deals with the PM and ak4114, so fix the
calls there appropriately.

The same PM functions are defined in ak4113.c, too, although they
aren't currently called yet (ice1712/quartet.c may be enhanced to
support PM later).

Acked-by: Jaroslav Kysela <perex@perex.cz>
Tested-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 22:30:12 +01:00
Takashi Iwai a850ef8afd ALSA: ak4114: Move EXPORT_SYMBOL() after each function
... just to follow the standard coding style.

Acked-by: Jaroslav Kysela <perex@perex.cz>
Tested-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 22:29:34 +01:00
Takashi Iwai 4161b4505f ALSA: ak411x: Fix stall in work callback
When ak4114 work calls its callback and the callback invokes
ak4114_reinit(), it stalls due to flush_delayed_work().  For avoiding
this, control the reentrance by introducing a refcount.  Also
flush_delayed_work() is replaced with cancel_delayed_work_sync().

The exactly same bug is present in ak4113.c and fixed as well.

Reported-by: Pavel Hofman <pavel.hofman@ivitera.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Tested-by: Pavel Hofman <pavel.hofman@ivitera.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 22:29:20 +01:00
Takashi Iwai 1263f61179 ALSA: line6: Remove snd_line6_ prefix of pcm property fields
It's just superfluous and doesn't give any better readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:54:47 +01:00
Takashi Iwai 72f18d0075 ALSA: line6: Remove invalid capability bits for PODxt Live Variax
PODxt Live Variax doesn't have PCM and HWMON but only MIDI.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:54:46 +01:00
Takashi Iwai b3313476dd ALSA: line6: Remove struct usb_line6_podhd
It's identical with struct usb_line6.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:54:45 +01:00
Takashi Iwai 129b3be689 ALSA: line6: Move the contents of usbdefs.h into driver.h
Most of them are rather relevant with the definitions in driver.h,
and there are only a few lines, so just rip it off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:54:45 +01:00
Takashi Iwai fd9301d33f ALSA: line6: Remove revision.h
The definition is no longer used.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:54:44 +01:00
Takashi Iwai cddbd4f170 ALSA: line6: Tidy up and typo fixes in comments
Just reformatting the comments and typos fixed, no functional
changes.  Particularly,
- avoid the kerneldoc marker "/**",
- reduce multiple comment lines into single lines,
- corrected wrongly referred function names

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:54:43 +01:00
Takashi Iwai 0416980d0a ALSA: line6: Fix volume calculation for big-endian
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:50:54 +01:00
Alexander Morozov b1a5fad5f8 ASoC: wm8904: add dt ids table
The WM8904 and WM8918 has the same data type, while the WM8912
has different data type. So, use the data in dt ids table to
distinguish them.

Signed-off-by: Alexander Morozov <linux@meltdown.ru>
[voice.shen@atmel.com: add code to distinguish device type]
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 19:30:12 +00:00
Peter Rosin d11c2978bf ASoC: pcm512x: Support SND_SOC_DAIFMT_CBM_CFS
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 19:28:54 +00:00
Peter Rosin 7c4e1119a9 ASoC: pcm512x: Avoid the PLL for the DAC clock, if possible
The PLL introduces jitter, which in turn introduces noice if used
to clock the DAC. Thus, avoid the PLL output, and use the PLL input
to drive the DAC clock, if possible.

This is described for the PCM5142/PCM5242 chips in the answers to the
forum post "PCM5142/PCM5242 DAC clock source" at the TI E2E community
pages (1).

(1) http://e2e.ti.com/support/data_converters/audio_converters/f/64/t/389994

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 19:28:53 +00:00
Peter Rosin f086ba9d53 ASoC: pcm512x: Support mastering BCLK/LRCLK using the PLL
Using the PLL in master mode requires using an external connection
between one of the GPIO pins (configured as PLL/4 output) and the
SCK pin. It also requires the external clock to be fed to some other
GPIO pin instead of the SCK pin.

This is described for the PCM5122 chip in the answers to the forum post
"PCM5122 DAC as I2S master troubles with PLL mode" at the TI E2E
community pages (1). The clocking functionality is also much better
described in the datasheet for the chip PCM5242, which seems to be
register compatible with PCM512x and PCM514x (which both have severely
lacking datasheets).

(1) http://e2e.ti.com/support/data_converters/audio_converters/f/64/t/267830

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 19:28:53 +00:00
Peter Rosin 8124930713 ASoC: pcm512x: Support mastering BCLK/LRCLK without using the PLL
Use register field names from the seemingly compatible PCM5242 datasheet,
as the PCM512x and PCM514x datasheets are severly lacking.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 19:28:53 +00:00
Peter Rosin 376dc4903e ASoC: pcm512x: Fix spelling of register field names.
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 19:28:52 +00:00
Peter Rosin f66f898e95 ALSA: pcm: Add snd_interval_ranges() and snd_pcm_hw_constraint_ranges()
Add helper functions to allow drivers to specify several disjoint
ranges for a variable. In particular, there is a codec (PCM512x) that
has a hole in its supported range of rates, due to PLL and divider
restrictions.

This is like snd_pcm_hw_constraint_list(), but for ranges instead of
points.

Signed-off-by: Peter Rosin <peda@axentia.se>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 19:27:15 +00:00
Andrew Jackson acae254a8e ASoC: dwc: Remove unnecessary conditional compilation
of_match_ptr is already conditionally compiled based on
CONFIG_OF so further conditional compilation is not
required.  Remove conditional compilation surrounding
of_match_ptr.

Signed-off-by: Andrew Jackson <Andrew.Jackson@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 17:40:08 +00:00
Takashi Iwai 5da7f924a4 ALSA: usx2y: Move UAPI definition into include/uapi/sound/usb_stream.h
The user-space API definition for usb_stream stuff should be moved
to include/uapi/sound to be exposed publicly.

While we're at it, add the missing ifdef guard for double inclusion,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 17:33:49 +01:00
Takashi Iwai ba6211a2e8 ALSA: au88x0: Remove superfluous ifdef __KERNEL__
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 17:26:45 +01:00
Takashi Iwai 976412fbc9 ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/*
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 17:25:07 +01:00
Takashi Iwai 6cbbfe1c8d ALSA: Include linux/io.h instead of asm/io.h
Nowadays it's recommended.  Replace all in a shot.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 16:49:33 +01:00
Arnd Bergmann 37419584ab ALSA: sscape: add missing include of linux/io.h
The soundscape driver uses the ISA inb/outb functions declared
in linux/io.h, so it needs to include this header to avoid
a build error:

sscape.c: In function 'sscape_write_unsafe':
sscape.c:203:2: error: implicit declaration of function 'outb' [-Werror=implicit-function-declaration]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 16:27:46 +01:00
Dan Carpenter c33bd08d65 ASoC: Intel: remove an unused struct member
We never set the ->scratch pointer, so let's delete it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 11:36:41 +00:00
Masanari Iida 2f1a11e624 ASoC: Fix warning with make xmldocs caused by soc-devres.c
This patch fix warning while "make xmldocs".

Warning(.//sound/soc/soc-devres.c:70): No description
 found for parameter 'platform_drv'
Warning(.//sound/soc/soc-devres.c:70): Excess function
 parameter 'platform' description in 'devm_snd_soc_register_platform'

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 11:36:03 +00:00
Takashi Iwai 5e0ddd07fa Merge branch 'topic/line6' into for-next 2015-01-28 07:24:41 +01:00
Takashi Iwai 247d95ee6d ALSA: line6: Handle error from line6_pcm_acquire()
Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:57 +01:00
Takashi Iwai 2954f914f2 ALSA: line6: Make common PCM pointer callback
Both playback and capture callbacks are identical, so let's merge
them.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:45 +01:00
Takashi Iwai 63e20df1e5 ALSA: line6: Reorganize PCM stream handling
The current code deals with the stream start / stop solely via
line6_pcm_acquire() and line6_pcm_release().  This was (supposedly)
intended to avoid the races, but it doesn't work as expected.  The
concurrent acquire and release calls can be performed without proper
protections, thus this might result in memory corruption.
Furthermore, we can't take a mutex to protect the whole function
because it can be called from the PCM trigger callback that is an
atomic context.  Also spinlock isn't appropriate because the function
allocates with kmalloc with GFP_KERNEL.  That is, these function just
lead to singular problems.

This is an attempt to reduce the existing races.  First off, separate
both the stream buffer management and the stream URB management.  The
former is protected via a newly introduced state_mutex while the
latter is protected via each line6_pcm_stream lock.

Secondly, the stream state are now managed in opened and running bit
flags of each line6_pcm_stream.  Not only this a bit clearer than
previous combined bit flags, this also gives a better abstraction.
These rewrites allows us to make common hw_params and hw_free
callbacks for both playback and capture directions.

For the monitor and impulse operations, still line6_pcm_acquire() and
line6_pcm_release() are used.  They call internally the corresponding
functions for both playback and capture streams with proper lock or
mutex.  Unlike the previous versions, these function don't take the
bit masks but the only single type value.  Also they are supposed to
be applied only as duplex operations.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:36 +01:00
Takashi Iwai f2bb614bb6 ALSA: line6: Clear prev_fbuf and prev_fsize properly
Clearing prev_fsize in line6_pcm_acquire() is pretty racy.
This can be called at any time while the stream is being played.
Rather better to clear prev_fbuf and prev_fsize at the proper place
like the stream stop for capture, and just after copying the monitor /
impulse data inside the spinlock.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:30 +01:00
Takashi Iwai 3d3ae4454d ALSA: line6: Fix racy loopback handling
The impulse and monitor handling in submit_audio_out_urb() isn't
protected thus this can be racy with the capture stream handling.
This patch extends the range to protect via each stream's spinlock
(now the whole submit_audio_*_urb() are covered), and take the capture
stream lock additionally for the impulse and monitor handling part.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:23 +01:00
Takashi Iwai d6ca69d825 ALSA: line6: Minor tidy up in line6_probe()
Move the check of multi configurations before snd_card_new() as a
short path, and reduce superfluous pointer references.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:16 +01:00
Takashi Iwai aca514b823 ALSA: line6: Let snd_card_new() allocate private data
Instead of allocating the private data individually in each driver's
probe at first, let snd_card_new() allocate the data that is called in
line6_probe().  This simplifies the primary probe functions.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:07 +01:00
Takashi Iwai f66fd990c5 ALSA: line6: Drop interface argument from private_init and disconnect callbacks
The interface argument is used just for retrieving the assigned
device, which can be already found in line6->ifcdev.  Drop them from
the callbacks.  Also, pass the usb id to private_init so that the
driver can deal with it there.  This is a preliminary work for the
further cleanup to move the whole allocation into driver.c.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:59 +01:00