1
0
Fork 0
Commit Graph

21159 Commits (af03c243a1f014145dae34368fe975b2f08ed964)

Author SHA1 Message Date
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
Takashi Iwai 62a109d9e2 ALSA: line6: Skip volume manipulation during silence copying
A minor optimization; while pausing, the driver just copies the zero
that doesn't need any volume changes.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:52 +01:00
Takashi Iwai c8491535d7 ALSA: line6: Do clipping in volume / monitor manipulations
Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:45 +01:00
Takashi Iwai e90576c595 ALSA: line6: Consolidate PCM stream buffer allocation and free
The PCM stream buffer allocation and free are identical for both
playback and capture streams.  Provide single helper functions.
These are used only in pcm.c, thus they can be even static.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:39 +01:00
Takashi Iwai ccaac9ed79 ALSA: line6: Use dev_err()
This is the last remaining snd_printk() usage in this driver.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:33 +01:00
Takashi Iwai d8131e67f0 ALSA: line6: Consolidate URB unlink and sync helpers
The codes to unlink and sync URBs are identical for both playback and
capture streams.  Consolidate to single helper functions.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:27 +01:00
Takashi Iwai ad0119abe2 ALSA: line6: Rearrange PCM structure
Introduce a new line6_pcm_stream structure and group individual
fields of snd_line6_pcm struct to playback and capture groups.

This patch itself just does rename and nothing else.  More
meaningful cleanups based on these fields shuffling will follow.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:18 +01:00
Takashi Iwai ab5cdcbab2 ALSA: line6: Drop voodoo workarounds
If the problem still really remains, we should fix it instead of
papering over it like this...

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:12 +01:00
Takashi Iwai 9fb754b79e ALSA: line6: Use incremental loop
Using a decremental loop without particular reasons worsens the
readability a lot.  Use incremental loops instead.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:06 +01:00
Takashi Iwai f2a76225b9 ALSA: line6: Drop superfluous spinlock for trigger
The trigger callback is already spinlocked, so we need no more lock
here (even for the linked substreams).  Let's drop it.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:00 +01:00
Takashi Iwai 5343ecf4e5 ALSA: line6: Fix the error recovery in line6_pcm_acquire()
line6_pcm_acquire() tries to restore the newly obtained resources at
the error path.  But some flags aren't recorded and released properly
when the corresponding buffer is already present.  These bits have to
be cleared in the error recovery, too.

Also, "flags_final" can be initialized to zero since we pass only the
subset of "channels" bits.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:53 +01:00
Takashi Iwai 6aa7f8ef29 ALSA: line6: Use logical OR
Fixed a few places using bits OR wrongly for condition checks.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:46 +01:00
Takashi Iwai eab22e4053 ALSA: line6: Fix missing error handling in line6_pcm_acquire()
Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:40 +01:00
Takashi Iwai bc518ba4cc ALSA: line6: Reduce superfluous spinlock in midi.c
The midi_transmit_lock is used always inside the send_urb_lock, thus
it doesn't play any role.  Let's kill it.  Also, rename
"send_urb_lock" as a more simple name "lock" since this is the only
lock for midi.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:34 +01:00
Takashi Iwai b55004f9fd ALSA: line6: Remove unused line6_nop_read()
The function isn't used any longer after rewriting from sysfs to leds
class in toneport.c.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:28 +01:00
Takashi Iwai 6b562f63dd ALSA: line6: Fix memory leak at probe error path
Fix memory leak at probe error path by rearranging the call order in
line6_destruct() so that the common destructor is always called.
Also this simplifies the error path to a single goto label.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:21 +01:00
Takashi Iwai 644d90850c ALSA: line6: Minor refactoring
Split some codes in the lengthy line6_probe().

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:15 +01:00
Takashi Iwai f44edd7b2b ALSA: line6/toneport: Implement LED controls via LED class
Instead of non-standard sysfs, reimplement the LED controls on
TonePort as LED class devices.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:08 +01:00
Takashi Iwai bf115fcf95 ALSA: line6/toneport: Fix wrong argument for toneport_has_led()
Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:02 +01:00
Takashi Iwai eedd0e95d3 ALSA: line6: Don't forget to call driver's destructor at error path
Currently disconnect callback is used as a driver's destructor, and
this has to be called not only at the disconnection time but also at
the error paths during probe.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:19:55 +01:00
Takashi Iwai 6dd1c05cd7 ALSA: line6/toneport: Move setup_timer() at the beginning
... so that timer_del_sync() in the destructor can be called safely at
any time.  Also move the mod_timer() call in toneport_setup(), which
is a bit clearer place.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:19:47 +01:00
Takashi Iwai 8a3b7c086a ALSA: line6: Remove superfluous NULL checks in each driver
The interface and driver objects are always set when callbacks are
called.  Drop such superfluous NULL checks in init and disconnect
calls of each driver.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:19:37 +01:00
Takashi Iwai 2a324fcdb5 ALSA: line6: Abort if inconsistent usbdev is found at disconnect
It's utterly unsafe to proceed further the disconnect procedure if the
assigned usbdev is inconsistent with the expected object.  Better to
put a WARN_ON() for more cautions and abort immediately.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:19:29 +01:00
Takashi Iwai 270fd9c7f9 ALSA: line6: Yet more cleanup of superfluous NULL checks
... in line6_disconnect() as well.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:18:04 +01:00
David S. Miller 95f873f2ff Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	arch/arm/boot/dts/imx6sx-sdb.dts
	net/sched/cls_bpf.c

Two simple sets of overlapping changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-27 16:59:56 -08:00
Mark Brown 60d66c9a24 Merge branch 'topic/arizona' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-w-codec 2015-01-27 23:52:44 +00:00
Bard Liao 5c4ca99df7 ASoC: rt5645: Add rt5650 codec support
This patch adds support for rt5650 codec.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 18:37:27 +00:00
Jie Yang 09a34aa582 ASoC: Intel: Used lock version to update shim registers
We need hold lock each time updating shirm registers, otherwise,
we may set unexpected values to them when they are set in
different thread at different time sequence.

The notification work will be scheduled in global work queue,
which won't hold this sst->spinlock itself, so here we need
change to use the lock version to update shim registers.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 18:36:22 +00:00
Anatol Pomozov 39552d7ad1 ASoC: ts3a227e: Add dts property that allows to specify micbias voltage
The voltage controls key press threshold.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 18:32:14 +00:00
Anatol Pomozov ddf9ea21f5 ASoC: ts3a227e: Remap keys to match Android headset specification
ts3a227e datasheet says typical key resistance is
  key1 50 Ohm
  key2 135 Ohm
  key3 240 Ohm
  key4 470 Ohm

The android headset specification expect buttons impedance:
  A (MEDIA) 0-70 Ohm
  D (VOICECOMMAND) 110-180 Ohm
  B (VOLUMEUP) 210-290 Ohm
  C (VOLUMEDOWN) 360-680 Ohm

Thus key mapping should be
  key1 - MEDIA
  key2 - VOICECOMMAND
  key3 - VOLUMEUP
  key3 - VOLUMEDOWN

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 18:32:04 +00:00
Manuel Lauss 8a6cf30bf9 ASoC: wm8731: init mutex in i2c init path
The I2C init path forgot to init the mutex, leading to an oops when
controls are accessed.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-01-27 18:21:26 +00:00
Mark Brown 8d23dd9c66 Merge branch 'fix/rt5677' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-w-codec 2015-01-27 17:54:24 +00:00
Mark Brown a7834aa932 Merge branch 'topic/rt286' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-w-codec
Conflicts:
	sound/soc/codecs/rt286.c
2015-01-27 17:52:51 +00:00
Bo Shen 67d1aed0a5 ASoC: atmel_ssc_dai: remove clock pin comments
As the clock can be get from TK/RK pin, so remove the comments.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:35:56 +00:00
Mark Brown c90ff1fb7b Merge branch 'fix/atmel' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-atmel 2015-01-27 17:35:41 +00:00
Bo Shen a43bd7e125 ASoC: atmel_ssc_dai: fix start event for I2S mode
According to the I2S specification information as following:
  - WS = 0, channel 1 (left)
  - WS = 1, channel 2 (right)
So, the start event should be TF/RF falling 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>
Cc: stable@vger.kernel.org
2015-01-27 17:32:36 +00:00
Charles Keepax e1ae5fba3f ASoC: arizona: Coalesce output power up delays
Save a bit of scheduling by coalescing all the output power up delays
into a single delay.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:28:50 +00:00
Charles Keepax 054e1b4892 ASoC: arizona: Add delay for output disable
Give the output disable sequence a chance to fully complete, otherwise
there is a danger we may remove the clock before it is finished
resulting in a pop noise. The delay for each output must be cumulative
and these are coalesced into a single delay.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:28:50 +00:00
Thomas Niederprüm 3c9390ad0f ASoC: sta32x: change dai name to be in line with the sta350 driver.
Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:28 +00:00
Thomas Niederprüm 6fad625999 ASoC: sta32x: minor Kconfig update.
- Add description for the driver
- Add dependency on the I2C module

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:27 +00:00
Thomas Niederprüm 30374d5dd3 ASoC: sta32x: use dev_dbg() for debug output.
Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:25 +00:00
Thomas Niederprüm f04b1e760a ASoC: sta32x: add device tree binding.
make the sta32x driver usable with device tree configs.  Code is heavily based
on the sta350 driver.

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:25 +00:00
Thomas Niederprüm 1c34c876c4 ASoC: sta32x: move code to calculate mclk divider and extrapolation ratio to sta32x_hw_params()
Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:24 +00:00
Thomas Niederprüm 88483f59d9 ASoC: sta32x: use DECLARE_TLV_DB_RANGE macro.
Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:23 +00:00
Thomas Niederprüm b66a29808e ASoC: sta32x: make sta32x a gpio consumer for the reset GPIO
The reset GPIO on the STA32X Codecs is used to reset the Codec and clear
all registers. Also taking it down puts the IC in power save mode, so
we put the device in reset mode when we go to sleep.

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:22 +00:00
Thomas Niederprüm a1be4cead9 ASoC: sta32x: Convert to direct regmap API usage.
use the regmap API directly rather than relying on the snd_soc_read/write
functions as this seems to be in accordance with common practice.

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:21 +00:00
Thomas Niederprüm b0402717c9 ASoC: sta32x: correct bit shift value for IDE register
The IDE bit in the CONFF register is the third bit not the fourth.

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:10:00 +00:00
Jarkko Nikula 3463667aa1 ASoC: rt5640: Add RT5642 ACPI ID for Intel Baytrail
Asus T100TAF uses ACPI ID "10EC5642" for its audio codec. I suppose it is
updated ACPI ID for the RT5642 codec since some earlier platforms are using
"10EC5640" with the RT5642 too.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-26 19:17:03 +00:00
Bard Liao 54d96a40e0 ASoC: rt286: Fix capture volume setting issue
The purpose of rt286_adc_event is to mute/numnte the ADC mixer.
However, it will also set the capture volume to default value.
As a result, "ADC0 Capture Volume" is not working if it is set
before capture start. This patch remove rt286_adc_event and add
"ADC0 Capture Switch" to mute/unmute ADC mixer.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-26 19:16:18 +00:00
Lars-Peter Clausen f8d71be555 ASoC: wm97xx: Reset AC'97 device before registering it
The wm97xx touchscreen driver binds itself to the snd_ac97 device that gets
registered by the CODEC driver and expects that the device has already been
reset. Before commit 6794f709b7 ("ASoC: ac97: Drop delayed device
registration") the device was only registered after the probe function of
the CODEC driver had finished running, but starting with the mentioned
commit the device is registered as soon as snd_soc_new_ac97_codec() is
called. This causes the touchscreen driver to no longer work. Modify the
CODEC drivers to use snd_soc_alloc_ac97_codec() instead of
snd_soc_new_ac97_codec() and make sure that the AC'97 device is reset before
the snd_ac97 device gets registered.

Fixes: 6794f709b7 ("ASoC: ac97: Drop delayed device registration")
Reported-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Manuel Lauss <manuel.lauss@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-01-26 19:15:06 +00:00
Lars-Peter Clausen 47e039413c ASoC: Add support for allocating AC'97 device before registering it
In some cases it is necessary to before additional operations after the
device has been initialized and before the device is registered. This can
for example be resetting the device.

This patch introduces a new function snd_soc_alloc_ac97_codec() which is
similar to snd_soc_new_ac97_codec() except that it does not register the
device. Any users of snd_soc_alloc_ac97_codec() are responsible for calling
device_add() manually.

Fixes: 6794f709b7 ("ASoC: ac97: Drop delayed device registration")
Reported-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-01-26 19:14:20 +00:00
Clemens Ladisch a55bdf1ec5 ALSA: seq: remove unused callback_all field
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-26 13:56:58 +01:00
Clemens Ladisch de20b572a3 ALSA: seq: fix off-by-one error in port limit check
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-26 13:54:47 +01:00
Clemens Ladisch 467be357c6 ALSA: seq: correctly report maximum number of ports
Due to SNDRV_SEQ_ADDRESS_BROADCAST, not all 256 port number values can
be used.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-26 13:54:39 +01:00
Takashi Iwai 7533185eee Merge branch 'for-linus' into for-next
Sync with the latest 3.19-rc state for applying other ALSA sequencer
core fixes.
2015-01-26 13:53:41 +01:00
Clemens Ladisch 0767e95bb9 ALSA: seq-dummy: remove deadlock-causing events on close
When the last subscriber to a "Through" port has been removed, the
subscribed destination ports might still be active, so it would be
wrong to send "all sounds off" and "reset controller" events to them.
The proper place for such a shutdown would be the closing of the actual
MIDI port (and close_substream() in rawmidi.c already can do this).

This also fixes a deadlock when dummy_unuse() tries to send events to
its own port that is already locked because it is being freed.

Reported-by: Peter Billam <peter@www.pjb.com.au>
Cc: <stable@vger.kernel.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-26 13:53:13 +01:00
Mark Brown 88343ee38d Merge remote-tracking branches 'asoc/fix/rt5677', 'asoc/fix/simple', 'asoc/fix/ts3a227e', 'asoc/fix/wm8904' and 'asoc/fix/wm8960' into asoc-linus 2015-01-26 11:29:58 +00:00
Mark Brown 8a6dcddf4c Merge remote-tracking branches 'asoc/fix/adi', 'asoc/fix/compress', 'asoc/fix/fsl-ssi', 'asoc/fix/imx', 'asoc/fix/intel', 'asoc/fix/omap', 'asoc/fix/rockchip' and 'asoc/fix/rt286' into asoc-linus 2015-01-26 11:29:55 +00:00
Mark Brown a9bb437ab0 Merge remote-tracking branch 'asoc/fix/pcm512x' into asoc-linus 2015-01-26 11:29:55 +00:00
Mark Brown d9b35aa056 Merge remote-tracking branch 'asoc/fix/fsl-esai' into asoc-linus 2015-01-26 11:29:54 +00:00
TienFu Chen b4b33f9d64 ALSA: hda - Enable docking station for an HP machine
On this machine we need to inform the driver where the docking
station pins are, because it has not been set up by BIOS.

Tested-by: TienFu Chen <tienfu.chen@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1412800
Signed-off-by: TienFu Chen <tienfu.chen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 15:09:19 +01:00
Takashi Iwai 3b15d0d505 Merge branch 'topic/timer-cleanup' into for-next 2015-01-20 10:11:27 +01:00
Takashi Iwai 86b5f3ec41 Merge branch 'topic/line6' into for-next 2015-01-20 10:08:06 +01:00
Chris Rorvick c078a4aac2 ALSA: line6: Remove driver version from header comment
The driver version string was removed in an ealier commit for being
useless.  These are equally useless.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 09:52:40 +01:00
Chris Rorvick c6fffce92e ALSA: line6: Refer to manufacturer as "Line 6"
The correct spelling includes the space.  Fix this in strings and
comments that refer to the manufacturer.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 09:52:30 +01:00
Chris Rorvick 35ae48a3f4 ALSA: line6: Remove superfluous NULL checks
Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 09:52:20 +01:00
Takashi Iwai 4d79fb1ed2 ALSA: line6: Drop line6_send_program() and line6_transmit_parameter()
Both functions are used nowhere.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:19:12 +01:00
Takashi Iwai 7372319028 ALSA: line6: Make line6_send_raw_message() static
It's used only locally.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:19:05 +01:00
Takashi Iwai 5a4753112a ALSA: line6: Sync PCM stop at disconnect
Call line6_pcm_disconnect() at disconnect to make sure that all URBs
are cleared.  Also reduce the superfluous snd_pcm_stop() calls from
the function (and remove the unused function) since the streams are
guaranteed to be stopped at this point via snd_card_disconnect().

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:18:44 +01:00
Takashi Iwai 31ca192139 ALSA: line6: Remove superfluous disconnect call in suspend handler
Calling line6_pcm_disconnect() at suspend callback is superfluous and
rather confusing.  Let's get rid of it.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:18:33 +01:00
Takashi Iwai b2a3b02392 ALSA: line6: Remove CHECK_RETURN macro
Such a macro doesn't improve readability.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:18:27 +01:00