Commit Graph

10101 Commits (3198b9eb514fd27dd15c55f36b17ac2cddade1a5)

Author SHA1 Message Date
Ben Gardiner acb8e2666e ASoC: davinci-pcm: increase the maximum channels
Based on the registration of davinci-mcasp.1 in the davinci-evm platform
setup for da830 and dm6467, davinci-pcm can handle more than the currently
reported maximum channels of 2.

Increase the maximum channels to 384 to match the maximum reported by
davinci-mcasp.1.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Steven Faludi <stevenfaludi@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-25 19:14:29 +08:00
Ben Gardiner 8e56d5b834 ASoC: davinci-pcm: expand the .formats
Based on the data_type test in ping_pong_dma_setup, davinci-pcm is capable of
handling data of width up to and including 32bits.

"
	if ((data_type == 0) || (data_type > 4)) {
		printk(KERN_ERR "%s: data_type=%i\n", __func__, data_type);
		return -EINVAL;
	}
"

Update the .format member of the snd_pcm_hardware instances it registers to
reflect this capability.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Steven Faludi <stevenfaludi@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-25 19:14:29 +08:00
Ben Gardiner fb1e9703af ASoC: davinci-pcm: trivial: make ping-pong params setup symmetrical
The setup of the pong channel uses EDMA_CHAN_SLOT instead of & 0x3f as the
setup of the ping channel does.

Make the setup of ping and pong symmetric. There is no functional change
introduced by this patch.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Steven Faludi <stevenfaludi@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-25 19:14:28 +08:00
Daniel Mack d5a0bf6cc5 ALSA: usb-audio: more control quirks for M-Audio FastTrack devices
Make use of the freshly introduced methods to re-use standard mixer
handling and add some controls that are hidden but implemented in a
standard conform way on M-Audio's FastTrack devices.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Original-code-by: Felix Homann <linuxaudio@showlabor.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 09:37:08 +02:00
Daniel Mack 014950b013 ALSA: usb-audio: add new quirk type QUIRK_AUDIO_STANDARD_MIXER
This quirk type will let the driver assume that there is a standard
mixer on a given interface, or that a specific mixer quirks will handle
the device.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 09:36:59 +02:00
Daniel Mack 9e38658f70 ALSA: usb-audio: export snd_usb_feature_unit_ctl
In order to allow quirks functions to hook up to the standard feature
unit op tables, this patch exports a pointer to the struct that is used
internally.

That way, all the code handling the control can be kept private, and
external code can reference the symbol to re-use it.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 09:36:20 +02:00
Daniel Mack ef9d597089 ALSA: usb-audio: rework add_control_to_empty()
This patch renames add_control_to_empty() to snd_usb_mixer_add_control()
and exports it, so the quirks functions can make use of it.

Also, as "struct mixer_build" is private to mixer.c, rewrite the
function to take an argument of type "struct usb_mixer_interface"
instead.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 09:34:34 +02:00
Daniel Mack 5875c2cb76 ALSA: usb-audio: move assignment of chip->ctrl_intf
This is needed for upcoming changes to the quirks mechanism.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 09:34:19 +02:00
Takashi Iwai af4ccf4f86 ALSA: hda - Use model=auto for Lenovo G555
The new auto-parser fixes problems on Lenovo G555.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 07:33:20 +02:00
Stephen Warren 5d44f927a5 ALSA: HDA: Unify HDMI hotplug handling.
This change unifies the initial handling of a pin's state with the code to
update a pin's state after a hotplug (unsolicited response) event. The
initial probing, and all updates, are now routed through hdmi_present_sense.

The stored PD and ELDV status is now always derived from GetPinSense verb
execution, and not from the data in the unsolicited response. This means:

a) The WAR for NVIDIA codec's UR.PD values ("old_pin_detect") can be
   removed, since this only affected the no-longer-used unsolicited
   response payload.

b) In turn, this means that most NVIDIA codecs can simply use
   patch_generic_hdmi instead of having a custom variant just to set
   old_pin_detect.

c) When PD && ELDV becomes true, no extra verbs are executed, because the
   GetPinSense that was previously executed by snd_hdmi_get_eld (really,
   hdmi_eld_valid) has simply moved into hdmi_present_sense.

d) When PD && ELDV becomes false, there is a single extra GetPinSense verb
   executed for codecs where old_pin_detect wasn't set, i.e. some NVIDIA,
   and all ATI/AMD and Intel codecs. I doubt this will be a performance
   issue.

The new unified code in hdmi_present_sense also ensures that eld->eld_valid
is not set unless eld->monitor_present is also set. This protects against
potential invalid combinations of PD and ELDV received from HW, and
transitively from a graphics driver.

Also, print the derived PD/ELDV bits from hdmi_present_sense so the kernel
log always displays the actual state stored, which will differ from the
values in the unsolicited response for NVIDIA HW where old_pin_detect was
previously set.

Finally, a couple of small tweaks originally by Takashi:

* Clear the ELD content to zero before reading it, so that if it's not
  read (i.e. when !(PD && ELDV)) it's in a known state.

* Don't show ELD fields in /proc ELD files when the ELD isn't valid.

The only possibility I can see for regression here is a codec where the
GetPinSense verb returns incorrect data. However, we're already exposed
to that, since that data is used (a) from hdmi_add_pin to set up the
initial pin state, and (b) within snd_hda_input_jack_report to query
a pin's presence value. As such, I don't believe any HW has bugs here.

Includes-changes-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 07:31:32 +02:00
Tony Vroon 4e60b4f830 ALSA: hda - Force AD1988_6STACK_DIG for Asus M3N-HT Deluxe
The microphone input on the back panel (pink connector)
stopped operating correctly after an upgrade from
2.6.35 to 2.6.38; the actual problem manifests itself
as a lack of microphone bias voltage (VREF_HIZ) on
node 0x17.
With AD1988_6STACK_DIG the maximum bias voltage (VREF_80)
is applied and the headset operates correctly.

Signed-off-by: Tony Vroon <tony@linx.net>
Tested-by: Doug Redlich <pbrigade@nxltech.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-25 07:30:39 +02:00
Liam Girdwood 92505299a1 ASoC: core - remove superfluous new line.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-25 04:45:47 +08:00
Linus Torvalds f50d1d9e8d Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
  pcmcia: Make struct pcmcia_device_id const, sound drivers edition
  staging: pcmcia: Convert pcmcia_device_id declarations to const
  pcmcia: Convert pcmcia_device_id declarations to const
  pcmcia: Make declaration and uses of struct pcmcia_device_id const
  pcmcia/sa1100: put sa11x0_pcmcia_hw_init[] to .devinit.data
2011-05-24 13:28:35 -07:00
Liam Girdwood 61b61e3c5c ASoC: core - fix module reference counting for CPU DAIs
Currently CODEC and platform drivers have their module reference count
incremented soc_probe_dai_link() whilst CPU DAI drivers have their reference
count incremented in soc_bind_dai_link().

CPU DAIs should have their reference count incremented in soc_probe_dai_link()
just like the CODEC and platform drivers.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 23:25:34 +08:00
Daniel Mack 477a66948e ASoC: fix raumfeld platform
Commit f0fba2ad (ASoC: multi-component - ASoC Multi-Component Support)
broke support for Raumfeld platforms as it didn't take into account the
different hardware features on individual devices.

In particular, Raumfeld speakers have no S/PDIF output, so the members
of the snd_soc_card struct must be set dynamically.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-05-24 23:25:00 +08:00
Kuninori Morimoto 23ca853392 ASoC: sh: fsi: add fsi_hw_startup/shutdown
This patch is preparation of cleanup suspend/resume patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:42:07 +08:00
Kuninori Morimoto cda828cafe ASoC: sh: fsi: cleanup suspend/resume
Current FSI driver was using saved_xxx variable for suspend/resume.
OTOH, the start and stop of power/clock are controlled by
fsi_hw_startup/fsi_hw_shutdown in current FSI driver.
The all necessary registers value are set by fsi_hw_startup.

So, if fsi_hw_shutdown is called when "suspend" is generated,
and fsi_hw_startup is called at "resume",
the saved_xxx are not needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:42:02 +08:00
Kuninori Morimoto 4c48125331 ASoC: sh: fsi: remove fsi_module_init/kill
FSIA/B ports is enabled by default when power-on,
and current FSI is supporting RuntimePM.
In addition, current fsi_module_init/kill doesn't care
simultaneous playback/recorde.
This mean FSI port control is not needed.
This patch remove fsi_module_init/kill

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:57 +08:00
Kuninori Morimoto 2da658927c ASoC: sh: fsi: make sure fsi_stream_push/pop access by spin lock
fsi_stream_push/pop might be called in same time.
This patch protect it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:52 +08:00
Kuninori Morimoto 9478e0b60f ASoC: sh: fsi: remove pm_runtime from fsi_dai_set_fmt.
pm_runtime_get/put_sync were used to access FSI register in fsi_dai_set_fmt
which is called when ALSA probe.
But this register value will disappear after pm_runtime_put_sync
if platform is supporting RuntimePM.
To solve this issue, this patch adds new variable for format,
and remove pm_runtime_get/put_sync from fsi_dai_set_fmt.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:48 +08:00
Kuninori Morimoto 2e651bafa9 ASoC: sh: fsi: tidyup unclear variable naming
Some variables on this driver were a unclear naming,
and were different unit (byte, frame, sample).
And some functions had wrong name
(ex. it returned "sample width" but name was "fsi_get_frame_width").
This patch tidy-up this issue, and the minimum unit become "sample".
Special thanks to Takashi YOSHII.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:44 +08:00
Kuninori Morimoto 1ddddd3635 ASoC: sh: fsi: irq control moves to fsi_port_start/stop
Using fsi_irq_enable/disable in fsi_port_start/stop is very natural.
This patch is preparation of cleanup suspend/resume patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:40 +08:00
Kuninori Morimoto 4f56cde17e ASoC: sh: fsi: add fsi_set_master_clk
Current FSI driver is using set_rate call back function which is for
master mode.
By this patch, it is used from fsi_set_master_clk.
This patch is preparation of cleanup suspend/resume patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:36 +08:00
Kuninori Morimoto 0ffe296add ASoC: sh: fsi: tidyup parameter of fsi_stream_push
It is possible to create buff_len and period_len
from substream->runtime.
This patch is preparation of tidyup unclear variable naming patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:32 +08:00
Mark Brown 60c655e62f ASoC: Convert 16x16 write to use cpu_to_be16()
Make it clear what we're doing.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-24 18:41:09 +08:00
Takashi Iwai e2df82ffb8 ALSA: hda - Fix speaker auto-mute in Cxt auto-parser
Fix some logic failures in auto-mute handling in Conexant auto-parser.
Also, modify codes to be a bit more understandable.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-24 12:15:53 +02:00
Tony Lindgren 9b28b11e2a Merge branch 'for_2.6.40/pm-cleanup' of ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-linus 2011-05-24 00:45:06 -07:00
Linus Torvalds 99dff58562 Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (48 commits)
  serial: 8250_pci: add support for Cronyx Omega PCI multiserial board.
  tty/serial: Fix break handling for PORT_TEGRA
  tty/serial: Add explicit PORT_TEGRA type
  n_tracerouter and n_tracesink ldisc additions.
  Intel PTI implementaiton of MIPI 1149.7.
  Kernel documentation for the PTI feature.
  export kernel call get_task_comm().
  tty: Remove to support serial for S5P6442
  pch_phub: Support new device ML7223
  8250_pci: Add support for the Digi/IBM PCIe 2-port Adapter
  ASoC: Update cx20442 for TTY API change
  pch_uart: Support new device ML7223 IOH
  parport: Use request_muxed_region for IT87 probe and lock
  tty/serial: add support for Xilinx PS UART
  n_gsm: Use print_hex_dump_bytes
  drivers/tty/moxa.c: Put correct tty value
  TTY: tty_io, annotate locking functions
  TTY: serial_core, remove superfluous set_task_state
  TTY: serial_core, remove invalid test
  Char: moxa, fix locking in moxa_write
  ...

Fix up trivial conflicts in drivers/bluetooth/hci_ldisc.c and
drivers/tty/serial/Makefile.

I did the hci_ldisc thing as an evil merge, cleaning things up.
2011-05-23 12:23:20 -07:00
Takashi Iwai 313d2c0652 ALSA: hda - Fix initial capture-source with auto-mic for Cxt auto-parser
Fix the initialization of capture-source route when auto-mic is enabled
for Conexant auto-parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-23 20:27:02 +02:00
Takashi Iwai 506a4196d4 ALSA: hda - Fix auto-mic detection in Conexant codec-parser
Fix the auto-mic detection for Cxt auto-parser due to off-by-one
missing initialization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-23 20:07:15 +02:00
Linus Torvalds 710421cc7d Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (346 commits)
  ASoC: core: Don't set "(null)" as a driver name
  ALSA: hda - Use LPIB for ATI/AMD chipsets as default
  Revert "ALSA: hda - Use position_fix=3 as default for AMD chipsets"
  ASoC: Tegra: Fix compile when debugfs not enabled
  ASoC: spdif-dit: Add missing MODULE_*
  SOUND: OSS: Remove Au1550 driver.
  ALSA: hda - add Intel Panther Point HDMI codec id
  ALSA: emu10k1 - Add dB range to Bass and Treble for SB Live!
  ALSA: hda - Remove PCM mixer elements from Virtual Master of realtek
  ALSA: hda - Fix input-src parse in patch_analog.c
  ASoC: davinci-mcasp: enable ping-pong SRAM buffers
  ASoC: add iPAQ hx4700 machine driver
  ASoC: Asahi Kasei AK4641 codec driver
  ALSA: hda - Enable Realtek ALC269 codec input layer beep
  ALSA: intel8x0m: enable AMD8111 modem
  ALSA: HDA: Add jack detection for HDMI
  ALSA: sound, core, pcm_lib: fix xrun_log
  ASoC: Max98095: Move existing NULL check before pointer dereference.
  ALSA: sound, core, pcm_lib: xrun_log: log also in_interrupt
  ALSA: usb-audio - Add support for USB X-Fi S51 Pro
  ...
2011-05-23 08:52:38 -07:00
Jarkko Nikula 9fb352b18b ASoC: tlv320aic3x: Do soft reset to codec when going to bias off state
TLV320AIC33, TLV320AIC34 and I believe others too in this family have some
hw bugs that cause that analogue and digital VDD supplies remain leaking
up to a few mA of current after certain use cases even the hw blocks inside
codec are driven to off.

Highest leakages occur after using the bypass paths inside codec but it
is possible to get smaller leakages just by toggling mute switches in
unused audio paths (i.e. no DAPM changes) while codec is on due another
active audio path.

While some cases are able to workaroud by making sure that e.g. output mixer
switches are muted before powering down the output stage this doesn't help
all the cases.

Therefore use the software reset command to clear possible leakage currents
since that works in every cases and affects only this codec instance. Only
drawback is that now cache sync is required everytime when codec bias comes
out from bias off state, not only when supply regulators were off.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-23 10:36:44 +01:00
Jarkko Nikula 508b76864c ASoC: tlv320aic3x: Don't sync first two registers from register cache
There is no need to sync first two registers from cache to hw after a reset.
First one is used to select page for register access and this driver is
normally accessing page 0 only. Second one does a software reset which is
obviously unneeded after hardware or previous software reset command.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-23 10:36:43 +01:00
David Henningsson d2859fd492 ALSA: HDA: Add quirk for Lenovo U350
Add model=asus quirk for Lenovo Ideapad U350 to make internal mic
work correctly.

Cc: stable@kernel.org (2.6.38+)
BugLink: http://bugs.launchpad.net/bugs/751681
Reported-by: Kent Baxley <kent.baxley@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-23 08:56:23 +02:00
Takashi Iwai f686c74cc3 Merge branch 'topic/hda' into for-linus 2011-05-22 10:01:35 +02:00
Takashi Iwai 7ec298dfef Merge branch 'topic/asoc' into for-linus 2011-05-22 10:01:33 +02:00
Takashi Iwai 02e5fbf622 Merge branch 'topic/misc' into for-linus 2011-05-22 10:01:29 +02:00
Takashi Iwai b759b3ac9a Merge branch 'topic/lola' into for-linus 2011-05-22 10:01:22 +02:00
Mark Brown de0853c000 Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.40 2011-05-22 10:31:51 +08:00
Jarkko Nikula 2b39535b9e ASoC: core: Don't set "(null)" as a driver name
Commit 22de71b ("ASoC: core - allow ASoC more flexible machine name")
writes "(null)" to driver name string in struct snd_card if card->driver_name
is NULL. This causes segmentation faults with some user space ALSA utilities
like aplay and arecord.

Fix this by using the card->name if no driver name is specified.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-22 10:31:11 +08:00
Linus Torvalds dcb4a1f0e0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: sbp2: parallelize login, reconnect, logout
  firewire: sbp2: octlet AT payloads can be stack-allocated
  firewire: sbp2: omit Scsi_Host lock from queuecommand
  firewire: core: use non-reentrant workqueue with rescuer
  firewire: optimize iso queueing by setting wake only after the last packet
  firewire: octlet AT payloads can be stack-allocated
  firewire: ohci: optimize find_branch_descriptor()
  firewire: ohci: avoid separate DMA mapping for small AT payloads
  firewire: ohci: do not start DMA contexts before link is enabled
2011-05-21 12:25:07 -07:00
Michael Williamson 2aba76f014 audio: tlv320aic26: fix PLL register configuration
The current PLL configuration code for the tlc320aic26 codec appears to assume a
hardcoded system clock of 12 MHz.  Use the clock value provided by the DAI_OPS
API for the calculation.

Tested using a MityDSP-L138 platform providing a 24.576 MHz clock.

Signed-off-by: Michael Williamson <michael.williamson@criticallink.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-21 12:07:56 +01:00
Takashi Iwai 50e3bbf989 ALSA: hda - Use LPIB for ATI/AMD chipsets as default
ATI and AMD chipsets seem not providing the proper position-buffer
information, and it also doesn't provide FIFO register required by
VIACOMBO fix.  It's better to use LPIB for these.

Reported-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20 16:29:09 +02:00
Takashi Iwai 314c3ff476 Revert "ALSA: hda - Use position_fix=3 as default for AMD chipsets"
This reverts commit 447ee6a7cb.

The workaround introduced by this commit seems bogus.
The AMD chipsets don't provide proper position-buffer nor FIFO value
required by VIACOMBO fix.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20 16:27:02 +02:00
Dimitris Papastamos 7e146b5586 ASoC: soc-cache: Cache a pointer to the last accessed rbnode
Whenever we are doing a read or a write through the rbtree code, we'll
cache a pointer to the rbnode.  To avoid looking up the register
everytime we do a read or a write, we first check if it can be found in
the cached register block, otherwise we traverse the rbtree and finally
cache the rbnode for future use.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-20 11:22:06 +01:00
Dimitris Papastamos 0944cc392e ASoC: soc-cache: Block based rbtree compression
This patch prepares the ground for the actual rbtree optimization patch
which will save a pointer to the last accessed rbnode that was used
in either the read() or write() functions.

Each rbnode manages a variable length block of registers.  There can be no
two nodes with overlapping blocks.  Each block has a base register and a
currently top register, all the other registers, if any, lie in between these
two and in ascending order.

The reasoning behind the construction of this rbtree is simple.  In the
snd_soc_rbtree_cache_init() function, we iterate over the register defaults
provided by the driver.  For each register value that is non-zero we
insert it in the rbtree.  In order to determine in which rbnode we need
to add the register, we first look if there is another register already
added that is adjacent to the one we are about to add.  If that is the case
we append it in that rbnode block, otherwise we create a new rbnode
with a single register in its block and add it to the tree.

In the next patch, where a cached rbnode is used by both the write() and the
read() functions, we also check if the register we are about to add is in the
cached rbnode (the least recently accessed one) and if so we append it in that
rbnode block.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-20 11:21:53 +01:00
Stephen Warren 0dfe8da492 ASoC: Tegra: Fix compile when debugfs not enabled
The prototype of the inline dummy version of tegra_i2s_debug_add
was not consistent with the real version.

Reported-by: Rhyland-Klein <rklein@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-20 11:20:13 +01:00
Stephen Warren 6ae759e889 ASoC: spdif-dit: Add missing MODULE_*
MODULE_ALIAS is required so that the module will auto-load based on a
platform_device registration in the board file.

While we're at it, add some other MODULE_*.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-20 11:19:29 +01:00
Ralf Baechle e28fb9c603 SOUND: OSS: Remove Au1550 driver.
This driver does no longer build since at least 2.6.30 and there is a
modern ALSA replacement for it.  RIP, Rot In Pieces.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20 11:33:39 +02:00
Takashi Iwai 4a787a3ff3 Merge branch 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2011-05-20 11:25:32 +02:00
Wu Fengguang 591e610d65 ALSA: hda - add Intel Panther Point HDMI codec id
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20 09:40:00 +02:00
Raymond Yau bfe9fc8aeb ALSA: emu10k1 - Add dB range to Bass and Treble for SB Live!
As the "Wave", "Wave Surround" or "Front" Playback Volume must be
changed to 70% (i.e. -12 dB) so that distortion won't occur when
increase Bass and Treble from 50% to 100%, so the maximum gain in
Bass and Treble are +12 dB.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20 09:08:04 +02:00
Raymond Yau acb373da7c ALSA: hda - Remove PCM mixer elements from Virtual Master of realtek
Afer commit aa202455ee , none of realtek
codec has hardware volume control "PCM Playback Volume" and
"PCM Playback Switch".

As Virtual Master require all slave controls must have same number of step
and dB range.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20 09:03:20 +02:00
Adrian Wilkins 5a2d227fdc ALSA: hda - Fix input-src parse in patch_analog.c
Compare pin type enum to the pin type and not the array index.
Fixes bug#0005368.

Signed-off-by: Adrian Wilkins <adrian.wilkins@nhs.net>
Cc: <stable@kernel.org> (2.6.37 and later)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-20 09:01:28 +02:00
Ben Gardiner a0c8326397 ASoC: davinci-mcasp: enable ping-pong SRAM buffers
The davinci-i2s driver copies the platform data for playback and capture
sram sizes which is in turn used by davinci-pcm to allocate ping-pong
buffers.

Copy also the platform data in davinci-mcasp probe.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-19 14:11:17 -07:00
Dmitry Artamonow c26f642e26 ASoC: add iPAQ hx4700 machine driver
AK4641 connected via I2S and I2C, jack detection via GPIO.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-19 14:10:59 -07:00
Dmitry Artamonow 00d2701070 ASoC: Asahi Kasei AK4641 codec driver
A driver for the AK4641 codec used in iPAQ hx4700 and Glofiish M800
among others.

Signed-off-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-19 14:10:45 -07:00
Madis Janson 39dfe13870 ALSA: hda - Enable Realtek ALC269 codec input layer beep
This fixes the input layer beep not working on some EeePC 1000 models by
adding the subsystem id into whitelist. Otherwise the corresponding ALSA
mixer is not enabled and stays muted, resulting in no console beep.

Signed-off-by: Madis Janson <madis@cyber.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-19 18:32:41 +02:00
Dmitry Eremin-Solenikov df1fe13289 ALSA: intel8x0m: enable AMD8111 modem
AMD 8111 southbridges contain a controller for MC'97 modem. Enable support
for this controller in intel8x0m driver.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-19 18:06:26 +02:00
David Henningsson 07acecc111 ALSA: HDA: Add jack detection for HDMI
Just as for headphones and microphone jacks, this patch adds reporting
of HDMI jack status through the input layer.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-19 12:00:50 +02:00
Ben Gardiner 217658f46c ALSA: sound, core, pcm_lib: fix xrun_log
The xrun_log function was augmented with the in_interrupt parameter whereas the
empty macro definition used when xrun logging is disabled was not.

Add a third parameter to the empty macro definition so as to not cause compiler
errors when xrun logging (CONFIG_SND_PCM_XRUN_DEBUG) is disabled.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-19 07:18:56 +02:00
Taylor Hutt 5394942535 ASoC: Max98095: Move existing NULL check before pointer dereference.
Visual inspection shows that max98095_put_eq_enum() and
max98095_put_bq_enum() each have a possible NULL deref of 'pdata'.

This change moves the NULL check above the use.

Signed-off-by: Taylor Hutt <thutt@chromium.org>
Acked-by: Peter Hsiang <Peter.Hsiang@maxim-ic.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-18 09:33:27 -07:00
Ben Gardiner ec08b14483 ALSA: sound, core, pcm_lib: xrun_log: log also in_interrupt
When debugging pcm drivers I found the "period" or "hw" prefix printed
by either XRUN_DEBUG_PERIODUPDATE or XRUN_DEBUG_PERIODUPDATE events,
respectively to be very useful is observing the interplay between
interrupt-context updates and syscall-context updates.

Similarly, when debugging overruns with XRUN_DEBUG_LOG it is useful to
see the context of the last 10 positions.

Add an in_interrupt member to hwptr_log_entry which stores the value of
the in_interrupt parameter of snd_pcm_update_hw_ptr0 when the log entry
is created. Print a "[Q]" prefix when dumping the log entries if
in_interrupt was true.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 17:12:39 +02:00
Mathieu Bouffard 7cdd8d7313 ALSA: usb-audio - Add support for USB X-Fi S51 Pro
USB X-Fi S51 Pro volume and mute from the volume knob on the unit.
Compiled and tested with 2.6.39-rc7-git12

Signed-off-by: Mathieu Bouffard <mbouffard@strangequarks.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 17:09:17 +02:00
Kailang Yang b896b4ebf0 ALSA: hda - Fix no sound after Windows boot with ALC269
Change power control register to default.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:53:16 +02:00
Kailang Yang 296f03380e ALSA: hda - Add support of ALC221 / ALC276 codecs
Compatible with ALC269.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:52:36 +02:00
Kailang Yang b478b99844 ALSA: hda - Add support of ALC898/899 codec
These are compatible with ALC882 codec.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:52:05 +02:00
Daniel Mack c91d9cda55 ALSA: usb-audio: handle "Fast Track Ultra" with USB_DEVICE_VENDOR_SPEC()
That way, the class compliant MIDI interface is also handled.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Grant Diffey <gdiffey@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:45 +02:00
Daniel Mack 3bc6fbc743 ALSA: usb-audio: assume valid clock
If the interface can't report a clock's validity, assume that it's
valid.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Vicente Joel <vicentejoel@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:44 +02:00
Daniel Mack 0ef283247a ALSA: usb-audio: add quirks for Roland GR-55
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Jeffrey Scott Flesher <jeffrey.scott.flesher@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:43 +02:00
Daniel Mack 56a9eb1f30 ALSA: usb-audio: Add quirk for KORG PANDORA PX5D MIDI interface
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Frédéric Jaume <frederic.jaume@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:42 +02:00
Daniel Mack 759e890f5c ALSA: usb-audio: remove invalid extra mixers for Komplete Audio 6
This was a flaw in the reading of the spec tables - Native Instrument's
"Komplete Audio 6" device has no such extra controls.

This patch also fixes the device name in two comments.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:42 +02:00
Daniel Mack ee95cb6121 ALSA: usb-audio: include format.h in format.c
Just in case a prototype changes, we'll be warned. This also fixes a
sparse warning.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:41 +02:00
Daniel Mack 60ed286a61 ALSA: usb-audio: make hwc_debug a noop in case HW_CONST_DEBUG is not set
Just defining it to nothing is dangerous as it can alter the code
execution flow, for example when used in as only function in a
conditional code block.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-18 11:44:35 +02:00
Takashi Iwai 20c304ed84 ALSA: hda - Enable snoop bit for AMD controllers
AMD Hudson controllers give noisy outputs when the buffer data is
rewritten on the fly as PulseAudio does.  This seems fixed by the
snoop bit enabled just like ATI chipset.

Also, disable 64bit DMA as now, to be sure.
We can revisit this later.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 18:41:25 +02:00
Takashi Iwai b55fcb508d ALSA: hda - Handle dock line-in as auto-detecable for Cxt auto-parser
Similar process like in patch_realtek.c and patch_sigmatel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:57:46 +02:00
Tony Lindgren b08827f4c7 Merge branches 'devel-fixes', 'devel-cleanup' and 'devel-genirq' into for-next 2011-05-17 03:44:50 -07:00
Takashi Iwai 1f83ac5ac9 ALSA: hda - Handle dock line-in as auto-detectable for IDT codecs
When a docking-station has a line-in jack, we can handle it also as
a detectable jack just like mic-in.  This will improve the usability
of HP laptops with a docking-station.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:35:03 +02:00
Takashi Iwai 8ed99d9768 ALSA: hda - Add dock-mic detection support to Realtek auto-parser
In addition to the normal mic jack, the mic (or line-in) jack on the
docking-station is checked also as a candidate for auto-selection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:34:57 +02:00
Takashi Iwai e35d9d6a15 ALSA: hda - Check unsol-cap in is_jack_detectalbe()
Also replace more open-codes with this function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:33:27 +02:00
Takashi Iwai 43c1b2e920 ALSA: hda - Add support of dock-mic detection to Conexant auto-parser
In addition to the normal external mic jack, check also the mic jack
on a docking-station as well, and select the input source appropriately.

The similar functionality was already implemented in patch_sigmatel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:33:00 +02:00
Takashi Iwai 52d3cb88d7 ALSA: hda - Fix initialization of spec->automute_lines in patch_realtek.c
spec->automute_lines shouldn't be set unless the line-detection is
available.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 10:04:08 +02:00
Takashi Iwai 1682c81746 ALSA: hda - Use get_wcaps_type()
Replace the open-code with get_wcaps_type() macro.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 10:03:02 +02:00
Takashi Iwai 06dec2282b ALSA: hda - Use is_jack_detectable() helper
Replaced the open-code with the new helper function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 10:00:16 +02:00
Takashi Iwai 03697e2acc ALSA: hda - Add automute-mode enum to Conexant auto-parser
Implement the same functionality as Realtek's auto-mute mode control.
Now Conexant auto-parser can also mutes line-out and provide the enum
control for different automute behavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 09:57:19 +02:00
Takashi Iwai a3a85d3983 ALSA: hda - Add missing Front/Surround/CLFE as slaves for Cxt auto-parser
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 09:17:52 +02:00
Takashi Iwai 47ad1f4e40 ALSA: hda - Code refactoring in patch_conexant.c
Use a struct instead of each array for managing input-source info
for auto-parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 09:15:55 +02:00
Stephen Boyd 34e268d87d ASoC: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following
warning:

In file included from arch/x86/include/asm/uaccess.h:573,
                 from include/linux/poll.h:14,
                 from include/sound/pcm.h:29,
                 from include/sound/ac97_codec.h:31,
                 from sound/soc/soc-core.c:34:
In function 'copy_from_user',
    inlined from 'codec_reg_write_file' at
    sound/soc/soc-core.c:252:
arch/x86/include/asm/uaccess_64.h:65:
warning: call to 'copy_from_user_overflow' declared with
attribute warning: copy_from_user() buffer size is not provably
correct

presumably due to buf_size being signed causing GCC to fail to
see that buf_size can't become negative.

Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-16 13:21:41 -07:00
Jarkko Nikula 9d03545d88 ASoC: Fix wrong data type access in a few codec drivers
Commit fafd217 ("ASoC: Store a list of widgets in a DAPM mux/mixer kcontrol")
changed the control private data type that is passed to snd_soc_cnew when
creating dapm mixer and mux controls. Commit did not update a few codec
drivers that are using their own put callbacks and thus are accessing a
wrong data type.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-16 09:06:47 -07:00
Mark Brown fa63e477dd ASoC: Don't restart an already running WM8958 DSP2
Don't want to upset the DSP.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-05-16 08:55:52 -07:00
Mark Brown d7fdae7c65 ASoC: Skip noop reconfiguration of WM8958 DSP2 algorithms
If we're setting the currently applied value for one of the DSP algorithm
configurations we can just skip all the handling as the control set is a
noop. This ensures we do not disrupt a running DSP.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-05-16 08:55:20 -07:00
Mark Brown fb5af53d42 ASoC: Add some missing volume update bit sets for wm_hubs devices
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-05-16 08:54:47 -07:00
Mark Brown d0b48af6c2 ASoC: Ensure output PGA is enabled for line outputs in wm_hubs
Also fix a left/right typo while we're at it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com.
Cc: stable@kernel.org
2011-05-16 08:54:20 -07:00
David Henningsson e033ebfb39 ALSA: HDA: Use one dmic only for Dell Studio 1558
There are no signs of a dmic at node 0x0b, so the user is left with
an additional internal mic which does not exist. This commit removes
that non-existing mic.

Cc: stable@kernel.org (2.6.32+)
BugLink: http://bugs.launchpad.net/bugs/731706
Reported-by: James Page <james.page@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16 14:23:56 +02:00
Takashi Iwai fea4a4f973 ALSA: hda - Add support of auto-parser to cxt5066 codecs
Still experimental.
Not enabled as default unless model=auto is passed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16 11:50:00 +02:00
Takashi Iwai f9759301c6 ALSA: hda - Don't create multiple same volume/boost controls in Cxt auto-parser
Check the routing more exactly for avoiding the duplicated controls for
the very same effect for multiple capture routes in Conexant auto-parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16 11:45:15 +02:00
Takashi Iwai cf27f29ae2 ALSA: hda - Build boost controls from selector widget in Cxt auto-parser
When the intermediate selector widget in the capture path provides the
boost volume, create the corresponding volume control.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16 11:33:02 +02:00
Kukjin Kim 4b42120df7 ASoC: Remove to support sound for S5P6442
According to removing ARCH_S5P6442, we don't need to support
sound for S5P6442.

Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-05-16 14:04:41 +09:00
Jin Park 25709f6d83 ASoC: codecs: max98088: Added digital mute function in DAI1 and DAI2
Added digital mute function in DAI1 and DAI2.

Signed-off-by: Jin Park <jinyoungp@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-15 21:26:36 -07:00
Jin Park 938b4fbc91 ASoC: codecs: max98088: Moved the EX Limiter Mode from dapm widget to control
Moved the EX Limiter Mode from dapm widget to control, because it was not
required DAPM route.

Signed-off-by: Jin Park <jinyoungp@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-15 21:26:26 -07:00
Jin Park 770939c37f ASoC: codecs: max98088: Fixed invalid register definitions in mixer controls
Fixed invalid register definitions in mixer controls such as left
speaker mixer, left hp mixer and left rec mixer.

Signed-off-by: Jin Park <jinyoungp@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-15 21:25:46 -07:00
Mark Brown f7391fce6a ASoC: Reintroduce do_spi_write()
There is an unfortunate difference in return values between spi_write()
and i2c_master_send() so we need an adaptor function to translate.

Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-15 08:50:59 -07:00
Takashi Iwai 9b842cd868 ALSA: hda - Don't use auto-parser for cxt5045 / 5051 as default
Just for safety reason (for avoiding any possible regressions), don't
enable auto-parser as default for cxt5045 and 5051, as well as 5047.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-15 12:35:04 +02:00
Takashi Iwai 1387cde51d ALSA: hda - Enable codec->pin_amp_workaround always for Conexant auto-parser
It can (must for some) be used for all Conexnat codecs safely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-15 12:22:20 +02:00
Takashi Iwai 22ce5f74a9 ALSA: hda - Search ADC NIDs dynamically in Conexant auto-parser
Instead of giving fixed arrays, look for ADC nids dynamically in the
tree in Conexant auto-parser code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-15 12:21:06 +02:00
Ondrej Zary fdb62b500d ALSA: fm801: clean-up radio-related Kconfig
Remove TEA575X_RADIO define from fm801.c.
Also update Kconfig help text to include all supported cards.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-15 11:43:31 +02:00
Ondrej Zary 10ca720147 ALSA: tea575x: use better card and bus names
Provide real card and bus_info instead of hardcoded values.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:43:24 +02:00
Ondrej Zary 3d11ba5593 ALSA: tea575x: remove unused card from struct
struct snd_card *card is present in struct snd_tea575x but never used.
Remove it.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:43:14 +02:00
Ondrej Zary ea27316e4c ALSA: tea575x: remove freq_fixup from struct
freq_fixup is a constant, no need to hold it in struct snd_tea575x and set in
each driver.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:43:01 +02:00
Takashi Iwai fa5dadcbe0 ALSA: hda - Add support of auto-parser to cxt5047 / CX20551 Waikiki
Similarly like other Conexant codecs, now model=auto is supported for
cxt5047.

But the auto-parser mode isn't activated as default yet, since BIOS
pin-configs seem often broken on machines with this codec.  User need
to pass model=auto explicitly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:37:45 +02:00
Takashi Iwai 5c9887e087 ALSA: hda - Parse more deep input-source routes in Conexant auto-parser
Handle not only a single-depth input-route but two-level depth routes
(PIN->MUX->ADC), too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 19:30:58 +02:00
Takashi Iwai f6100bb4b8 ALSA: hda - Clean up input-mux handling in Conexant auto-parser
Keep the registered input-pins in imux_pins[], and fix the inconsistent
use of sepc->auto_mic_ext.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 18:28:03 +02:00
Takashi Iwai 1f8458a262 ALSA: hda - Add auto-parser support to cxt5045 / CX20549 Venice
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 17:22:05 +02:00
Takashi Iwai 6764bcef4c ALSA: hda - Add auto-parser support to cxt5051 / CX20561 Hermosa
Extend the existing auto-parser for CX2064x for cxt5051 codec.
Now the auto-parser supports ADC-switching for this codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 16:52:25 +02:00
Takashi Iwai 0ad1b5b619 ALSA: hda - Check AMP CAP at initialization of Conexant auto-parser
Some codecs have no mute caps in audio I/O widgets.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 16:43:12 +02:00
Takashi Iwai da33986651 ALSA: hda - Turn on EAPD dynamically per jack plug in Conexant auto mode
Instead of keeping always EAPD on, turn on/off appropriately at jack
plugging in Conexant auto-parser mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 16:24:15 +02:00
Takashi Iwai 2557f7427d ALSA: hda - Fix auto-mic for CX2064x codecs
The wrong id is assigned for external/internal mics in the auto-mic
selection parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-13 16:18:37 +02:00
Tony Lindgren 91d94af56a omap: Remove support for omap2evm
The board support has never been merged for it as noticed
by Russell King <linux@arm.linux.org.uk>. So let's remove the
related dead code.

Cc: linux-fbdev@vger.kernel.org
Cc: alsa-devel@alsa-project.org
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-13 04:41:32 -07:00
Sanjeev Premi d491297752 ASoC: omap-mcbsp: Remove restrictive checks for cpu type
Current checks for cpu type were too restrictive leading
to failures for other silicons in same family.

The problem was found while testing audio playback on
AM37x and AM35x processors. But should exist on OMAP36xx
as well.

Signed-off-by: Sanjeev Premi <premi@ti.com>
cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
cc: Liam Girdwood <lrg@ti.com>
cc: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-13 12:00:15 +01:00
Peter Ujfalusi b417382419 ASoC: omap-pcm: Period wakeup disabling on OMAP2+
Allow disabling ALSA period wakeup interrupts.
This can only be done on OMAP2+ (2/3/4), since there
we can chain the DMA.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-13 12:00:14 +01:00
Liam Girdwood 1f71a3ba8f ASoC: twl6040 - fix LINEGAIN volume control
Fix the TWL6040 LINEGAIN volume control to match the TRM.

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-13 11:49:39 +01:00
Linus Torvalds ca1376d108 Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: WM8903: Fix Digital Capture Volume range
  ASoC: UDA134x: Remove POWER_OFF_ON_STANDBY define.
  ASoC: SSM2602: Fix reg_cache_size
  ASoC: SSM2602: Fix 'Mic Boost2' control
  ASoC: SSM2602: Properly annotate i2c probe and remove functions
  ASoC: sst_platform: add hw_free callback to fix resource leak
  ASoC: Don't crash on PM operations
  ASoC: JZ4740: Fix i2s shutdown
2011-05-12 12:41:30 -07:00
Misael Lopez Cruz d5e4b0adf6 ASoC: DMIC codec - Add input widget
Digital microphones can have some additional elements in their
audio path (like microphone bias). An input widget is required
for digital microphone CODEC driver to allow external connections
in machine drivers.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-12 17:40:05 +02:00
Liam Girdwood 22de71ba03 ASoC: core - allow ASoC more flexible machine name
Allow ASoC machine drivers to register a driver name
and a longname. This allows user space to determine
the flavour of machine driver.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-12 17:40:03 +02:00
Mark Brown ed0bd2333c ASoC: Update cx20442 for TTY API change
receive_buf() was recently changed to return the number of bytes
received but the cx20442 driver wasn't updated to match the new API.
I don't have any hardware but since we don't actually appears to be
listening to the data at all just report that we accepted all the data
that was offered to us.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-11 15:11:21 -07:00
Randy Dunlap 9e53d856af ASoC: fix wm8958-dsp2 printk format warnings
Fix printk format warnings in wm8958-dsp2.c:

sound/soc/codecs/wm8958-dsp2.c:103: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
sound/soc/codecs/wm8958-dsp2.c:111: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
sound/soc/codecs/wm8958-dsp2.c:144: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-11 18:15:54 +02:00
Peter Ujfalusi 0ac3a014b8 ASoC: RX51: Update e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-11 16:52:02 +01:00
Peter Ujfalusi 1c7687b995 ASoC: omap-pcm: Update e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-11 16:15:18 +01:00
Peter Ujfalusi 56a8742916 ASoC: omap-mcbsp: Update e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-11 16:12:57 +01:00
Peter Ujfalusi b4079ef40a ASoC: tpa6130a2: Update e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-11 16:12:45 +01:00
Peter Ujfalusi 93864cf042 ASoC: tlv320dac33: Update e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-11 16:12:35 +01:00
Mark Brown ca629928b9 ASoC: Disable WM8994/58 microphone detection over suspend
It will be non-functional with the basises and clocks off anyway, if the
system needs microphone detection enabled over suspend then it should be
causing the CODEC to ignore suspend using the APIs for that to prevent
the biases being disabled.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-11 15:56:32 +02:00
Mark Brown 6e28f976ec ASoC: Use spi_write() for SPI writes
do_spi_write() is just an open coded copy of do_spi_write() so we can
delete it and just call spi_write() directly.  Indeed, as a result of
recent refactoring all the SPI write functions are just very long
wrappers around spi_write() which don't add anything except for some
pointless copies so we can just use spi_write() as the hw_write
operation directly. It should be as type safe to do this as it is to do
the same thing with I2C and it saves us a bunch of code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-11 15:56:03 +02:00
Mark Brown 063b7cc43f ASoC: Remove byte swap in 4x12 SPI write
snd_soc_4_12_spi_write() contains a byte swap. Since this code was written
for an Analog CODEC on a Blackfin reference board it appears that this is
done because while Blackfin is little endian the CODEC is big endian (as
are most CODECs).

Push this up into the generic 4x12 write function and use cpu_to_be16() to
do the byte swap so things are more regular and things work on both CPU
endiannesses.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-11 15:55:45 +02:00
Mark Brown 051e994e95 ASoC: Don't squash 16x8 registers down to 8 bits
Currently we'll force all registers to fit in 8 bits before passing
down to the I/O function. Looks like a cut'n'paste bug.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-11 15:55:06 +02:00
Mark Brown 3afb1b3e6f ASoC: Fix NULL vs. 0 warning in SSM2602
sparse complains if 0 is used as a NULL pointer constant.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-11 15:24:05 +02:00
Clemens Ladisch f3f7c1837f ALSA: isight: fix locking
Lockdep complains about conflicts between isight->mutex,
ALSA's register_mutex, mm->mmap_sem, and pcm->open_mutex.

This can be fixed by moving the calls to isight_pcm_abort(),
snd_card_disconnect(), and fw_iso_resources_update() out of
isight->mutex.  These functions are designed to be called
asynchronously; the mutex needs to protect only the device
streaming state modified by isight_start/stop_streaming().

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:53:09 +02:00
Clemens Ladisch 3cabffd72c ALSA: isight: remove experimental status
Experiments have shown this driver to work now.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:53:09 +02:00
Clemens Ladisch aee7040018 ALSA: isight: fix hang when unplugging a running device
When aborting a PCM stream, the xrun is signaled only if the stream is
running.  When disconnecting a PCM stream, calling snd_card_disconnect()
too early would change the stream into a non-running state and thus
prevent the xrun from being noticed by user space.

To prevent this, move the snd_card_disconnect() call after the xrun.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:53:08 +02:00
Stefan Richter ac34dad26e ALSA: isight: wrap up register accesses
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
[cl: removed superfluous variable]
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:52:54 +02:00
Stefan Richter 8839eedafd ALSA: isight: add AudioEnable register write
which is needed to get the iSight to talk.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:51:20 +02:00
Clemens Ladisch f2934cd499 ALSA: isight: fix divide error when queueing packets
Set the .header_size field when queueing packets to avoid a division by
zero.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:51:16 +02:00
Clemens Ladisch 898732d1f1 ALSA: isight: fix packet requeueing
After handling a received packet, we want to resubmit the same packet,
so do not increase the packet index too early.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:51:13 +02:00
Clemens Ladisch 03c29680d4 ALSA: isight: fix isight_pcm_abort() crashes
Fix crashes in isight_pcm_abort() that happen when the driver tries to
access isight->pcm->runtime which does not exist when the device is not
open.  Introduce a new field pcm_active to track this state.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:51:09 +02:00
Clemens Ladisch 3a691b28a0 ALSA: add Apple iSight microphone driver
This adds an experimental driver for the front and rear microphones of
the Apple iSight web camera.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:51:05 +02:00
Ondrej Zary d7ba858a7f ALSA: fm801: implement TEA575x tuner autodetection
Autodetect TEA575x tuner connection type during init. This allows tuner to
work out-of-the box.

tea575x_tuner module parameter remains functional to force tuner type.

Tested with SF256-PCP and SF64-PCR.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 10:52:24 +02:00
Joe Perches 4ef7e71444 pcmcia: Make struct pcmcia_device_id const, sound drivers edition
Make declarations of struct pcmcia_device_id const.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2011-05-11 10:48:57 +02:00
Clemens Ladisch 13882a82ee firewire: optimize iso queueing by setting wake only after the last packet
When queueing iso packets, the run time is dominated by the two
MMIO accesses that set the DMA context's wake bit.  Because most
drivers submit packets in batches, we can save much time by
removing all but the last wakeup.

The internal kernel API is changed to require a call to
fw_iso_context_queue_flush() after a batch of queued packets.
The user space API does not change, so one call to
FW_CDEV_IOC_QUEUE_ISO must specify multiple packets to take
advantage of this optimization.

In my measurements, this patch reduces the time needed to queue
fifty skip packets from userspace to one sixth on a 2.5 GHz CPU,
or to one third at 800 MHz.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2011-05-10 22:53:45 +02:00
Stefan Richter f30e6d3e41 firewire: octlet AT payloads can be stack-allocated
We do not need slab allocations anymore in order to satisfy
streaming DMA mapping constraints, thanks to commit da28947e7e
"firewire: ohci: avoid separate DMA mapping for small AT payloads".

(Besides, the slab-allocated buffers that firewire-core, firewire-sbp2,
and firedtv used to provide for 8-byte write and lock requests were
still not fully portable since they crossed cacheline boundaries or
shared a cacheline with unrelated CPU-accessed data.  snd-firewire-lib
got this aspect right by using an extra kmalloc/ kfree just for the
8-byte transaction buffer.)

This change replaces kmalloc'ed lock transaction scratch buffers in
firewire-core, firedtv, and snd-firewire-lib by local stack allocations.
Perhaps the most notable result of the change is simpler locking because
there is no need to serialize usages of preallocated per-device buffers
anymore.  Also, allocations and deallocations are simpler.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
2011-05-10 22:53:44 +02:00
Mark Brown 0f3c6af921 Merge branch 'for-2.6.39' into for-2.6.40 2011-05-10 15:58:17 +02:00
Stephen Warren 61bf35b9a3 ASoC: WM8903: Fix Digital Capture Volume range
Increase the range of the Digital Capture Volume control to be 120 steps.
Each step is 0.75dB, and the range starts at -72dB, giving a max setting
of 18dB, which matches the latest datasheet, to the precision of the step
size.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-10 11:48:33 +02:00
Ondrej Zary 938a1566b1 ALSA: fm801: convert TEA575x support to new interface
Use common functions to access TEA575x tuner - remove original read/write
functions and provide new pin manipulation functions instead.

Also convert the original triple implementation to a simple GPIO pin map.

Tested with SF256-PCP and SF64-PCR (added the GPIO pin for MO/ST signal
for them).
SF256-PCS untested (pin for MO/ST signal is a guess).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-10 09:31:45 +02:00
Ondrej Zary 72587173cc ALSA: es1968: convert TEA575x support to new interface
Use common functions to access TEA575x tuner - remove original read/write
functions and provide new pin manipulation functions instead.

Tested with SF64-PCE2 card.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-10 09:31:29 +02:00
Ondrej Zary 14219d0659 ALSA: tea575x: unify read/write functions
Implement generic read/write functions to access TEA575x tuners. They're now
implemented 4 times (once in es1968 and 3 times in fm801).
This also allows mute to work on all cards.
Also improve tuner detection/initialization.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-10 09:29:42 +02:00
Takashi Iwai 1209842af4 Merge branch 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2011-05-10 09:24:50 +02:00
Takashi Iwai f0a2b0cb71 Merge branch 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2011-05-10 09:20:19 +02:00
Linus Torvalds 047ec4b5de Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: Fix CODEC DAI names for Goni
  ASoC: Fix CODEC name in Goni
  davinci-mcasp: fix _CBM_CFS pin directions
  davinci-mcasp: fix _CBM_CFS hw_params
  davinci-mcasp: use bitfield definitions for PDIR
  ASoC: davinci-mcasp: correct tdm_slots limit
2011-05-09 09:13:10 -07:00
Lars-Peter Clausen f3eee00da3 ASoC: SSM2602: Provide dB ranges for the volume controls
Also fix the maximum value for the capture volume control.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 01:45:26 +02:00
Lars-Peter Clausen 2a43801a76 ASoC: SSM2602: Model power supply for the digital core as a DAPM widget
Model the power supply for the digital core as a DAPM_SUPPLY widget. This allows
to cleanup the code a bit.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 01:45:17 +02:00
Lars-Peter Clausen 7dcf2760bf ASoC: SSM2602: Add entry for the ssm2603 to the device id table
The SSM2603 is mostly register compatible with the SSM2602 and can be supported
by the current driver without any changes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 01:45:09 +02:00
Lars-Peter Clausen b1f7b2b56b ASoC: SSM2602: Add SSM2604 support
The SSM2604 is basically a lightweight variant of the SSM2602 with a compatible
register layout. Thus we can easily support both devices by the same driver,
by providing a slightly set of controls, widgets and routes.

Compared to the SSM2602 the SSM2604 has no microphone input and no headphone
output.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 01:45:01 +02:00
Lars-Peter Clausen f6c1f2d5e5 ASoC: SSM2602: Do not power the codec up in probe
It is not required to have the codec powered at this stage and DAPM will power
the ADC and DAC down again after probe has run anyway.
Thus we avoid some unnecessary writes by this change.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 01:44:54 +02:00
Lars-Peter Clausen 7164bdb643 ASoC: SSM2602: Fix default register cache
Some of the values in the default register cache did not represent the codecs
state after reset. This patch fixes it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 01:44:45 +02:00
Mark Brown afd8f37c80 Merge branch 'for-2.6.39' into for-2.6.40 2011-05-08 15:33:41 +01:00
Marek Belisko bf707de21f ASoC: UDA134x: Remove POWER_OFF_ON_STANDBY define.
Define POWER_OFF_ON_STANDBY cause trobles when trying to get some
sound from codec because code for bias setup was not compiled
(define wasn't defined). This define was removed in commit:
cc3202f5 but again introduced by commit: f0fba2ad1 which then
completely break codec functionality so remove it again.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-05-08 15:27:48 +01:00
Lars-Peter Clausen 5663940e2a ASoC: SSM2602: Remove unused struct and define
Those are leftovers from a pre-multicomponent era.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:44:11 +01:00
Lars-Peter Clausen ffd13c39c7 ASoC: SSM2602: Remove duplicate control
There are currently two controls which allow selecting the capture source, one
as a normal control, the other as part of a DAPM_MUX widget.
Remove the normal control.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:44:11 +01:00
Lars-Peter Clausen 0b4cd2e01c ASoC: SSM2602: Cleanup coeff handling
Drop unused field from the coeff struct, precalculate the srate register at
compile-time and cleanup up the naming.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:44:05 +01:00
Mark Brown 5e8bc53b7c Merge branch 'for-2.6.39' into for-2.6.40 2011-05-08 14:43:18 +01:00
Lars-Peter Clausen 8fc63fe941 ASoC: SSM2602: Fix reg_cache_size
reg_cache_size is supposed to be the number of elements in the register cache,
not the size in bytes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:42:21 +01:00
Lars-Peter Clausen 36c90ab33f ASoC: SSM2602: Fix 'Mic Boost2' control
The 'Mic Boost2' control's shift was off by one and thus was not working.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-05-08 14:42:15 +01:00
Lars-Peter Clausen 04b894553f ASoC: SSM2602: Properly annotate i2c probe and remove functions
Annotate the i2c probe and remove functions with __devinit and __devexit.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:41:34 +01:00
Dimitris Papastamos 64d2706975 ASoC: soc-cache: Allow codec->cache_bypass to be used with snd_soc_hw_bulk_write_raw()
If we specifically want to write a block of data to the hw bypassing the
cache, then allow this to happen inside snd_soc_hw_bulk_write_raw().

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:38:31 +01:00
Lars-Peter Clausen 77530150fb ASoC: Create codec DAPM widgets before calling the codecs probe function
This allows to create DAPM routes depending on those widgets in the
codecs probe function.  This is helpful when supporting similar codecs
with minor differences in the DAPM routing with the same driver.

Something similar has already been done for cards in commit
a841ebb9 (ASoC: Create card DAPM widgets early so they can be used in
callbacks).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:38:08 +01:00
Randy Dunlap f428c94c84 ALSA: lola - fix lola build
sound/pci/lola/Makefile was trying to build lola modules even
when PCI and SND_LOLA were not enabled, causing build errors:

ERROR: "snd_pcm_hw_constraint_step" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_period_elapsed" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_dma_alloc_pages" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_hw_constraint_integer" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_sgbuf_ops_page" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_set_ops" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_lib_free_pages" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_lib_ioctl" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_lib_malloc_pages" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_sgbuf_get_chunk_size" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_dma_free_pages" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_lib_preallocate_pages_for_all" [sound/pci/lola/snd-lola.ko] undefined!
ERROR: "snd_pcm_new" [sound/pci/lola/snd-lola.ko] undefined!

Fix the Makefile to build only when CONFIG_SND_LOLA is enabled.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-04 19:55:13 +02:00
Takashi Iwai 447ee6a7cb ALSA: hda - Use position_fix=3 as default for AMD chipsets
AMD chipsets often behave pretty badly regarding the DMA position
reporting.  It results in the bad quality audio recording.
Using position_fix=3 works well in general for them, so let's enable
it as default for AMD.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-04 18:28:50 +02:00
Mark Brown 20ed0938bf Merge branch 'for-2.6.39' into for-2.6.40 2011-05-03 23:30:36 +01:00
xingchao 9ab88434e8 ASoC: sst_platform: add hw_free callback to fix resource leak
Signed-off-by: xingchao <xingchao.wang@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 23:29:54 +01:00
Mark Brown e1a0206608 ASoC: Remove outdated FIXME from WM8915
Actually the current code is perfectly sensible given the hardware.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-03 23:29:28 +01:00
Mark Brown abc9d5aa08 ASoC: Use shared controls for input signal path in WM8915
Gives finer grained power management.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-03 23:29:08 +01:00
Mark Brown ed77cc122a ASoC: Don't crash on PM operations
The move over to exposing snd_soc_register_card() let the initialisation
of the driver data we use to find the card in PM operations go AWOL. Fix
this by setting the driver data when we register the card.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-03 23:28:04 +01:00
Stephen Warren af46800b9a ASoC: Implement mux control sharing
Control sharing is enabled when two widgets include pointers to the
same kcontrol_new in their definition. Specifically:

static const struct snd_kcontrol_new adcinput_mux =
	SOC_DAPM_ENUM("ADC Input", adcinput_enum);

static const struct snd_soc_dapm_widget wm8903_dapm_widgets[] = {
  SND_SOC_DAPM_MUX("Left ADC Input", SND_SOC_NOPM, 0, 0, &adcinput_mux),
  SND_SOC_DAPM_MUX("Right ADC Input", SND_SOC_NOPM, 0, 0, &adcinput_mux),
};

This is useful when a single register bit or field affects multiple
muxes at once. The common case is to have separate control bits or
fields for each mux (channel). An alternative way of looking at this
is that the mux is a stereo (or even n-channel) mux, rather than
independant mono muxes.

Without this change, a separate kcontrol will be created for each
DAPM_MUX. This has the following disadvantages:

* Confuses the user/programmer with redundant controls that don't
  map to separate hardware.

* When one of the controls is changed, ASoC fails to update the DAPM
  logic for paths solely affected by the other controls impacted by
  the same register bits. This causes some paths not to be correctly
  powered up or down. Prior to this change, to work around this, the
  user or programmer had to manually toggle all duplicate controls away
  from the intended setting, and then back to it.

Control sharing implies that the control is named based on the
kcontrol_new itself, not any of the widgets that are affected by it.

Control sharing is implemented by: When creating kcontrols, if a
kcontrol does not yet exist for a particular kcontrol_new, then a new
kcontrol is created with a list of widgets containing just a single
entry. This is the normal case. However, if a kcontrol does already
exists for the given kcontrol_new, the current widget is simply added
to that kcontrol's list of affected widgets.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 19:29:15 +01:00
Stephen Warren fafd2176f7 ASoC: Store a list of widgets in a DAPM mux/mixer kcontrol
A future change will allow multiple widgets to be affected by the same
control. For example, a single register bit that controls separate muxes
in both the L and R audio paths.

This change updates the code that handles relevant controls to be able
to iterate over a list of affected widgets. Note that only the put
functions need significant modification to implement the iteration; the
get functions do not need to iterate, nor unify the results, since all
affected widgets reference the same kcontrol.

When creating the list of widgets, always create a 1-sized list, since
the control sharing is not implemented in this change.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 19:29:05 +01:00
Stephen Warren fad598887d ASoC: Add w->kcontrols, and populate it
Future changes will need reference to the kcontrol created for a given
kcontrol_new. Store the created kcontrol values now.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 19:28:57 +01:00
Stephen Warren 82cfecdc03 ASoC: s/w->kcontrols/w->kcontrol_news/g
A future change will modify struct snd_soc_dapm_widget to store the
actual kcontrol pointers for each kcontrol_new in a field named
kcontrols. Rename the existing kcontrols field to enable this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 19:28:47 +01:00
Mark Brown 65f7e32520 Merge branch 'for-2.6.39' into for-2.6.40 2011-05-03 19:07:45 +01:00
Lars-Peter Clausen 005967a1df ASoC: JZ4740: Fix i2s shutdown
The i2s shutdown callback has the check whether it should be disabled reversed.
Currently it is disabled if another stream is still active, but kept enabled if
the last stream is closed. This patch fixes it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 18:48:24 +01:00
Lars-Peter Clausen 6c45e12656 ASoC: Remove DAPM debugfs entries before freeing widgets
Remove the DAPM debugfs entries before freeing the context's widgets, otherwise a
use after free situation might occur.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 18:43:52 +01:00
Lars-Peter Clausen d5d1e0bef4 ASoC: Move DAPM widget debugfs entry creation to snd_soc_dapm_new_widgets
Currently debugfs entries for a DAPM widgets are only added in
snd_soc_dapm_debugfs_init. If a widget is added later (for example in the
dai_link's probe callback) it will not show up in debugfs.
This patch moves the creation of the widget debugfs entry to
snd_soc_dapm_new_widgets where it will be added after the widget has been
properly instantiated.

As a side-effect this will also reduce the number of times the DAPM widget list
is iterated during a card's instantiation.

Since it is possible that snd_soc_dapm_new_widgets is invoked form the codecs or
cards probe callbacks, the creation of the debugfs dapm directory has to be
moved before these are called.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 18:43:44 +01:00
Lars-Peter Clausen 8eecaf6244 ASoC: Move DAPM debugfs directory creation to snd_soc_dapm_debugfs_init
Move the creation of the DAPM debugfs directory to snd_soc_dapm_debugfs_init
instead of having the same duplicated code in both codec and card DAPM setup.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 18:43:32 +01:00
Lars-Peter Clausen 0aaae527c7 ASoC: Free the card's DAPM context
Free the card's DAPM context when the card is removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 18:43:15 +01:00
Mike Rapoport 1307394afd ASoC: tegra: TrimSlice machine support
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 18:42:44 +01:00
Takashi Iwai f2e0192519 ALSA: lola - Yet another linux/delay.h inclusion
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 18:48:29 +02:00
Takashi Iwai f044785d0a ALSA: lola - Add missing inclusion of linux/delay.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 18:21:01 +02:00
Takashi Iwai fe4af1b55e ALSA: lola - Implement polling_mode like hd-audio
Also protect the call of lola_update_rirb() with spinlock.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 17:06:53 +02:00
Takashi Iwai 2db3002029 ALSA: lola - Rename to Digital SRC Capture Switch
Renamed to Digial SRC Capture Switch for more correct representation.
Also fixed analog volume control on Lola161611 and lola881.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 17:05:08 +02:00
Takashi Iwai c7aad3c317 ALSA: lola - Add sync in loop implementation
For assuring the synchronized state with the pause operation,
loop over the all linked streams and waits until all get ready
in a loop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 17:02:35 +02:00
Takashi Iwai 7e79f22676 ALSA: lola - Add SRC refcounting
Added the refcounting for the exclusive SRC control.
Also, fixed the possible stall after PCM pause operations.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:59:27 +02:00
Takashi Iwai 8bd172dc96 ALSA: lola - Allow granularity changes
Add some sanity checks.
Change PCM parameters appropriately per granularity.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:51:56 +02:00
Takashi Iwai 972505ccde ALSA: lola - Use SG-buffer
Completely switch to SG-buffer now, as it's working stably.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:50:51 +02:00
Takashi Iwai fe3d393eda ALSA: lola - Add Lola-specific module options
Added granularity and sample_rate_min module options.

The former controls the h/w access granularity.  As default, it's set
to the max value 32.

The latter controls the minimum sample rate in Hz, as default 16000.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:48:59 +02:00
Takashi Iwai 0f8f56c959 ALSA: lola - Fix PCM stalls
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:47:03 +02:00
Takashi Iwai 333ff3971f ALSA: lola - Use a single BDL
Use a single BDL for both buffers instead of allocating for each.

Also a few tune-up to avoid the stream stalls in the PCM code and
the prelimianry work for SG-buffer support are added, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:41:02 +02:00
Takashi Iwai a426c78723 ALSA: lola - Suppress the debug print
Use snd_printdd() for less important debug messages.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:40:53 +02:00
Takashi Iwai c772bbe69a ALSA: lola - Changes in proc file
The codec proc file becomes a read only that shows the codec widgets
in a text form.  A new proc file, codec_rw, is introduced instead for
accessing the Lola verb directly by reading and writing to it.

Also, regs proc file shows the contents of DSD, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:40:52 +02:00
Takashi Iwai 1c5d7b312f ALSA: lola - Make SRC helper global
Make lola_sample_rate_convert() global so that it can be accessed from
other files.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:40:52 +02:00
Takashi Iwai d43f3010b8 ALSA: Add the driver for Digigram Lola PCI-e boards
Added a new driver for supporting Digigram Lola PCI-e boards.

Lola has a similar h/w design like HD-audio but with extended verbs.
Thus the driver is written similarly like HD-audio driver in the bus
part.  The codec part is rather written in a fixed way specific to the
Lola board because of the verb incompatibility.

The driver provides basic PCM, supporting multi-streams and mixing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 16:31:05 +02:00
Raymond Yau ce85c9ac8d ALSA: hda - fix NULL-dereference in patch_realtek
Fix NULL-dereference when try to use alt_playback since those codecs
which support multistreaming playback usually have more than 1 adc but
the driver should create alt_capture when spec->stream_analog_alt_capture
is also defined.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-03 10:32:04 +02:00
Linus Torvalds c7bcecbe98 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix Realtek's chained fixup checks
  Revert "ALSA: hda - Fix pin-config of Gigabyte mobo"
  ALSA: HDA: Fix automute for Gateway NV79
  ALSA: hda: add beep quirk for Realtek 0x1043:831a
  ALSA: usb-audio - Terratec Aureon 7.1 USB ID as C-Media cm6206 quirks
  ALSA: hda - VIA: Fix notify_aa_path_ctls() invalid issue.
  ALSA - au88x0 - Add buffer bytes constraints
2011-05-02 09:07:27 -07:00
Takashi Iwai 20ec8b2463 Merge branch 'fix/hda' into topic/hda 2011-05-02 13:58:23 +02:00
Takashi Iwai 24af2b1cc4 ALSA: hda - Fix Realtek's chained fixup checks
The check of chained fixup list entry was done against the wrong element.
A stupid mistake during refactoring.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 13:55:36 +02:00
Takashi Iwai 90dd48a1a9 ALSA: hda - Constify fixup and other array data in patch_via.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:38:19 +02:00
Takashi Iwai 2b63536f0c ALSA: hda - Constify fixup and other array data in patch_sigmatel.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:33:43 +02:00
Takashi Iwai 9cf0aa9eba ALSA: hda - Constify fixup and other array data in patch_si3054.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:22:39 +02:00
Takashi Iwai fb79e1e0a2 ALSA: hda - Constify fixup and other array data in patch_hdmi.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:31 +02:00
Takashi Iwai 34cbe3a6fa ALSA: hda - Constify fixup and other array data in patch_conexant.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:31 +02:00
Takashi Iwai c42d47829a ALSA: hda - Constify fixup and other array data in patch_cirrus.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:30 +02:00
Takashi Iwai 728850a7f2 ALSA: hda - Constify fixup and other array data in patch_ca0110.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:29 +02:00
Takashi Iwai 779d065983 ALSA: hda - Constify fixup and other array data in patch_cmedia.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:28 +02:00
Takashi Iwai 498f5b175b ALSA: hda - Constify fixup and other array data in patch_analog.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:27 +02:00
Takashi Iwai 4c6d72d138 ALSA: hda - Constify fixup and other array data in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:20:21 +02:00
Takashi Iwai dda144103c ALSA: hda - Constify some API function arguments
Also fixed the assignment of multiout.dac_nids to satisfy const.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:07:48 +02:00
Takashi Iwai a9111321f2 ALSA: hda - Constify fixup and other array data in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 11:30:18 +02:00
Takashi Iwai 031024eea8 ALSA: hda - Constify some API function arguments
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 11:29:30 +02:00
Takashi Iwai a3ea8e8f24 Merge branch 'fix/hda' into topic/hda 2011-05-02 10:41:40 +02:00
Takashi Iwai ebb47241ea Revert "ALSA: hda - Fix pin-config of Gigabyte mobo"
This reverts commit c6b358748e.

It turned out that there are different pin configurations for this
PCI SSID, including multi-channel modes.  And more proper fix for
allowing line-out mutes will come up in 2.6.40 tree, so we won't need
this fixup any more there.

Reported-by: Andrew Clayton <andrew@digital-domain.net>
Reported-by: Emmanuel Benisty <benisty.e@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 10:37:29 +02:00
David Henningsson 94024cd1ae ALSA: HDA: Fix automute for Gateway NV79
The PCI SSID is 1025:031c and the codec SSID is 1025:031d,
so the driver mistakes this for a SKU value, but looking at
the numbers, this is obviously wrong.

Cc: stable@kernel.org (2.6.38+)
BugLink: http://bugs.launchpad.net/bugs/761861
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-29 14:19:31 +02:00
Takashi Iwai c2de187e5b ALSA: hda - Show the line-out type in snd_hda_parse_pin_def_config()
Helpful for debugging.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-29 13:01:33 +02:00
Daniel Cordero a7e985e18f ALSA: hda: add beep quirk for Realtek 0x1043:831a
PC Beep was not being reported as enabled on my EeePC 901:
        SKU: enable_pcbeep=0x0

Signed-off-by: Daniel Cordero <danielcordero@lavabit.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-29 08:18:06 +02:00
Wolfgang Breyha 8129e79ed7 ALSA: usb-audio - Terratec Aureon 7.1 USB ID as C-Media cm6206 quirks
This patch adds support for the Terratec Aureon 7.1 USB which uses a
C-Media cm6206 and needs all the quirks already found in the past.

Signed-off-by: Wolfgang Breyha <wbreyha@gmx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 18:22:41 +02:00
Takashi Iwai ae8a60a598 ALSA: hda - Add Auto-Mute Mode enum for two-output cases
The Auto-Mute Mode control is useful even when only two outputs
(e.g. HP and speaker) are available.  Then user can enable/disable
the auto-mute behavior on the fly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 18:09:52 +02:00
Takashi Iwai 1daf5f46c6 ALSA: hda - More line-out auto-mute support for Realtek
Not only supporting the line-out automute as additional feature
to the existing headphone automute, now the headphone jack can
mute the line-out alone even without the speaker outs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 17:57:46 +02:00
Takashi Iwai 1a1455de10 ALSA: hda - Add support for Line-Out automute to Realtek auto-parser
By popular demands, I add the functionality to mute / unmute the
line-out jacks per the headphone plug / unplug.  For achieving this
and keeping the compatibility with the old behavior, the new mixer
enum "Auto-Mute Mode" is added.  With this, user can control the
auto-mute behavior either disabled, speaker-only or lineout+speaker.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 17:55:53 +02:00
Takashi Iwai 0f0f391c73 ALSA: hda - More reduction of redundant automute codes in Realtek parser
Removed the redundant codes by replacing with the common helper
functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 16:26:24 +02:00
Takashi Iwai e9427969f5 ALSA: hda - Consolidate auto-mute with master-switch for Realtek
Yet another consolidation of auto-mute functions for the devices
controlling the output muts together with the master mixer switch,
typically found for ALC262 machines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 15:46:07 +02:00
Takashi Iwai e6a5e1b709 ALSA: hda - Add support of line-out automute for Realtek
Add the common helper function and flags to support the auto-mute
per line-out jack detection, and also the mute of line-out jacks.

A few model-specific implementations are replaced with the common
helpers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 14:45:56 +02:00
Takashi Iwai 3b8510ce97 ALSA: hda - Add common automute support for mxier-amp on/off for Reatek
Some models do mute on/off the connected mixer widget for the automatic
muting, instead of controlling the pin widget itself.  This patch adds
the implementation of such type of auto-mute in the common helper
function, and reduces the redundant codes for each model preset.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 14:45:50 +02:00
Takashi Iwai d922b51dab ALSA: hda - Consolidate default automute functions for Realtek
There are two entry points for the headphone automute functions for
Realtek, alc_automute_amp() and alc_automute_pin().  These call the
same function in the end, so we can basically consolidate these
with a flag in spec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 14:45:19 +02:00
Mark Brown 9b1b937c77 ASoC: Don't specify the DMA driver for Goni baseband link
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-28 12:11:06 +01:00
Mark Brown 3784019af3 ASoC: Don't specify the DMA driver for OpenMoko baseband link
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-28 12:11:00 +01:00
Mark Brown dd4028c59e Merge branch 'for-2.6.39' into for-2.6.40 2011-04-28 12:10:25 +01:00
Mark Brown 69b91bc155 ASoC: Fix CODEC DAI names for Goni
Immediately after sending the last fix I realised that the CODEC DAI names
also don't correspond to the WM8994 driver. Update the DAI names to match.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-28 12:09:53 +01:00
Mark Brown 1270b01f75 ASoC: Fix CODEC name in Goni
This was typoed at some point in the multi-component merge, though the
driver was added along with that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-28 12:09:41 +01:00
Mark Brown fb257897bf ASoC: Work around allmodconfig failure
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-28 12:09:06 +01:00
Lydia Wang 525566cb60 ALSA: hda - VIA: Fix notify_aa_path_ctls() invalid issue.
In notify_aa_path_ctls(), adds 'rear mic' item and confirms the A-A
path control existing before notifying card that the A-A path volume
is muted if smart5.1 is enabled.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 11:35:18 +02:00
Takashi Iwai 59bb7f0eeb ALSA: usb-audio - Don't expose broken dB ranges
Some crappy USB-audio devices give broken dB ranges, e.g. both min and max
are 0dB.  This confuses the volume control that prefers dB expression such
as alsactl or PulseAudio.  In such a case, it's much better not to expose
the broken dB information.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-28 09:58:43 +02:00
Mark Brown 6be449e53d ASoC: Implement WM8962 ADC high pass filter configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-27 22:33:13 +01:00
Lars-Peter Clausen 91a5fca4b1 ASoC: Add dapm_find_widget helper
This patch adds a helper function for searching DAPM widgets by name.
This allows to streamline functions which operate on widgets by name.
It also allows to get rid of copy'n'pasted code which was added to fallback to
widgets from other contexts if the widget was not found in the current context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-27 22:33:13 +01:00
Mark Brown b864a8c9dd ASoC: Don't specify the DMA driver for Speyside baseband link
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-27 22:33:12 +01:00
Mark Brown 848dd8beef ASoC: Add more natural support for no-DMA DAIs
Since we can now support multiple platforms allow machines to not specify
a platform in a DAI link. Since the rest of the code requires that we have
a struct device for all objects we do this by substituting in a dummy
device that we register automatically.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-27 22:33:11 +01:00