pandora-kernel.git
12 years agoALSA: hda - Add snd_hda_get_conn_list() helper function
Takashi Iwai [Fri, 24 Jun 2011 12:10:28 +0000 (14:10 +0200)]
ALSA: hda - Add snd_hda_get_conn_list() helper function

Add a new helper function snd_hda_get_conn_list().
Unlike snd_hda_get_connections(), this function doesn't copy the
connection-list but gives the raw pointer for the cached list.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: lx6464es - include mac address in device name
Tim Blechmann [Fri, 24 Jun 2011 15:36:20 +0000 (17:36 +0200)]
ALSA: lx6464es - include mac address in device name

each device has a unique mac address, which can be used to distinguish
multiple devices in the same machine. we therefore include the full mac
address in the device shortname and the last 6 bytes in the device id.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: lola - Fix for Lola280 board
Markus Bollinger [Fri, 24 Jun 2011 10:54:43 +0000 (12:54 +0200)]
ALSA: lola - Fix for Lola280 board

- add/fix comments and debug messages
- fix incomplete matrix init
- comment out creation of buggy lola_dest_gain_mixer controls
- minor optimisations

Signed-off-by: Markus Bollinger <bollinger@digigram.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Fri, 24 Jun 2011 10:36:25 +0000 (12:36 +0200)]
Merge branch 'fix/asoc' into for-linus

12 years agoALSA: Remove unneeded version.h includes from sound/
Jesper Juhl [Thu, 23 Jun 2011 21:54:40 +0000 (23:54 +0200)]
ALSA: Remove unneeded version.h includes from sound/

In the sound/ directory there are two files (flagged by 'make
versioncheck'); sound/pci/asihpi/asihpi.c and
sound/soc/codecs/wm8991.c that include linux/version.h although they
don't need it. This patch removes the unneeded includes.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Use alc_get_pfx_name() for all Realtek codecs
Takashi Iwai [Fri, 24 Jun 2011 09:27:22 +0000 (11:27 +0200)]
ALSA: hda - Use alc_get_pfx_name() for all Realtek codecs

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Clean up multi-channel mixer name assignment in patch_realtek.c
Takashi Iwai [Fri, 24 Jun 2011 09:03:58 +0000 (11:03 +0200)]
ALSA: hda - Clean up multi-channel mixer name assignment in patch_realtek.c

Change alc_get_line_out_pfx() in patch_realtek.c to provide the channel
specific name and assign the index so that each caller doesn't have to
set the channel name by itself.

Also, check the multi-io case with the primary hp-out; for the multi-io
channels, assign the channel name instead of "Headphone" with indices.
This makes the mixer names more intuitive and reduces confusion.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Add a workaround for invalid line-out setups
Takashi Iwai [Fri, 24 Jun 2011 08:43:03 +0000 (10:43 +0200)]
ALSA: hda - Add a workaround for invalid line-out setups

Some BIOS set up the pin config wrongly as line-out although it's
supposed to be a speaker out.  In most cases, though, we can judge
the validity by checking the connection type -- when it's FIXED,
mostly it's an invalid line-out but a speaker.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Fri, 24 Jun 2011 08:36:25 +0000 (10:36 +0200)]
Merge branch 'fix/hda' into topic/hda

12 years agoALSA: hda - Allow multi-io with HP output for ALC662 & co
Takashi Iwai [Fri, 24 Jun 2011 08:35:05 +0000 (10:35 +0200)]
ALSA: hda - Allow multi-io with HP output for ALC662 & co

Even if the machine has no line-out but only HP-out, try to detect the
multi-io.  It'll allow more possibilities for 5.1 outputs on laptops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'for-3.0' into for-3.1
Mark Brown [Thu, 23 Jun 2011 19:10:28 +0000 (20:10 +0100)]
Merge branch 'for-3.0' into for-3.1

12 years agoASoC: pxa-ssp: Correct check for stream presence
Daniel Mack [Wed, 22 Jun 2011 18:48:25 +0000 (20:48 +0200)]
ASoC: pxa-ssp: Correct check for stream presence

Don't rely on the codec's channels_min information to decide wheter or
not allocate a substream's DMA buffer. Rather check if the substream
itself was allocated previously.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
12 years agoASoC: imx: add missing module informations
Arnaud Patard (Rtp) [Wed, 22 Jun 2011 20:21:49 +0000 (22:21 +0200)]
ASoC: imx: add missing module informations

- add some modules aliases
- add module license to avoid tainted kernel when loading the imx-pcm-audio
  driver

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx: Remove unused Kconfig SND_MXC_SOC_SSI entry
Arnaud Patard (Rtp) [Wed, 22 Jun 2011 20:21:48 +0000 (22:21 +0200)]
ASoC: imx: Remove unused Kconfig SND_MXC_SOC_SSI entry

SND_MXC_SOC_SSI looks to be unused, so kill it.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Add basic WM8918 support
Mark Brown [Wed, 22 Jun 2011 19:07:24 +0000 (20:07 +0100)]
ASoC: Add basic WM8918 support

The WM8918 is register compatible with the WM8904 with a subset of the
functionality. Add the device ID, a subsequent patch will ensure that only
the relevant functionality is exported to userspace.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: Allow suppression of series updates on wm_hubs devices
Mark Brown [Tue, 7 Jun 2011 22:32:46 +0000 (23:32 +0100)]
ASoC: Allow suppression of series updates on wm_hubs devices

Some devices do not support manual updates of the DC servo.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: Trigger wm_hubs series update startup off a separate flag
Mark Brown [Tue, 7 Jun 2011 22:23:52 +0000 (23:23 +0100)]
ASoC: Trigger wm_hubs series update startup off a separate flag

Allowing the two to be used independently.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoALSA: HDA: Pinfix quirk for HP Z200 Workstation
David Henningsson [Wed, 22 Jun 2011 07:58:37 +0000 (09:58 +0200)]
ALSA: HDA: Pinfix quirk for HP Z200 Workstation

BIOS lists the internal speaker as an internal line-out. Change to
internal speaker + model=auto for better auto-mute capabilities.

BugLink: http://bugs.launchpad.net/bugs/754964
Reported-by: Marc Legris <marc.legris@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: add WM8782 ADC Codec Driver
Johannes Stezenbach [Wed, 22 Jun 2011 12:59:25 +0000 (14:59 +0200)]
ASoC: add WM8782 ADC Codec Driver

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[zonque@gmail.com: transform to new ASoC structure]
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: add STA32X codec driver
Johannes Stezenbach [Wed, 22 Jun 2011 12:59:24 +0000 (14:59 +0200)]
ASoC: add STA32X codec driver

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[zonque@gmail.com: transform to new ASoC structure]
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoALSA: hda - Implement dynamic-ADC switching for VIA codecs
Takashi Iwai [Wed, 22 Jun 2011 13:23:25 +0000 (15:23 +0200)]
ALSA: hda - Implement dynamic-ADC switching for VIA codecs

Some VIA codecs like VT1702 provide the input-route only to specific
ADCs such as digital-mic inputs.  These routes aren't covered by the
normal primary ADC, and for now, user had to open the capture stream
assigned to that special ADC manually for using such inputs.

This patch implements a way to switch the current ADC dynamically per
the input-source selection in such a case.  When this workaround is
activated, the driver provides only one capture stream and one input-
source control but with the full possible inputs.  The driver switches
the ADC to be used (or being used) according to the input-source on the
fly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: codecs: Max98095: Fix logging of hardware revision.
Taylor Hutt [Mon, 20 Jun 2011 18:54:32 +0000 (11:54 -0700)]
ASoC: codecs: Max98095: Fix logging of hardware revision.

The base hardware revision of the Maxim 98095 part is 0x40; the code
which outputs the revision of the hardware has been updated to
properly use uppercase alphabetic values for the revision numbers.

Also, the use of a constant for the length 'max98095_dai' has been
replaced with ARRAY_SIZE().

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>
12 years agoALSA: hda - Auto-mute smart51 surround pins for VIA codecs
Takashi Iwai [Tue, 21 Jun 2011 14:52:39 +0000 (16:52 +0200)]
ALSA: hda - Auto-mute smart51 surround pins for VIA codecs

When smart51 mode is enabled, auto-mute these surround outputs
as well as the primary line-out.  Also this patch includes minor
clean-ups.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Remove redundant VT1709 and VT1708B codes
Takashi Iwai [Tue, 21 Jun 2011 14:33:55 +0000 (16:33 +0200)]
ALSA: hda - Remove redundant VT1709 and VT1708B codes

Unify the VT1709 10ch and 6ch parsers, as well as VT1708B 8ch and 4ch
parsers.  They have no difference now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - VT1708 independent HP routing fix
Takashi Iwai [Tue, 21 Jun 2011 13:57:44 +0000 (15:57 +0200)]
ALSA: hda - VT1708 independent HP routing fix

The codecs like VT1708 needs more complicated routing using the mixer
widget rather than the simple selector widgets.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix surround-volume parsing for VT1708B codecs
Takashi Iwai [Tue, 21 Jun 2011 12:22:14 +0000 (14:22 +0200)]
ALSA: hda - Fix surround-volume parsing for VT1708B codecs

The surround/CLFE/side DACs on VT1708B and co have no amp but the
connected selector widgets have the amp instead.  Fix the parser to
check these selector widgets for the possible mixer controls as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix the check of loopback-mixer element index in patch_via.c
Takashi Iwai [Tue, 21 Jun 2011 10:57:22 +0000 (12:57 +0200)]
ALSA: hda - Fix the check of loopback-mixer element index in patch_via.c

Fix the check of the multiple loopback-mixer, which gave sometimes
a wrong index assigned to an element even for different names, e.g.
Mic and Front Mic.  Now check the label properly for avoid duplication.

Reported-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Assign smart51 only in the same stack for VIA codecs
Takashi Iwai [Tue, 21 Jun 2011 10:51:33 +0000 (12:51 +0200)]
ALSA: hda - Assign smart51 only in the same stack for VIA codecs

The input jacks assigned as the smart51 outputs must be in the same
stack, either rear, front or other.  Also, prefer line-in as the surround
to mic-in.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix re-routing of HP-independent mode in patch_via.c
Takashi Iwai [Tue, 21 Jun 2011 09:48:29 +0000 (11:48 +0200)]
ALSA: hda - Fix re-routing of HP-independent mode in patch_via.c

Re-route the whole output path when HP-independent mode is changed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix creations of playback volume controls in patch_via.c
Lydia Wang [Tue, 21 Jun 2011 08:11:11 +0000 (16:11 +0800)]
ALSA: hda - Fix creations of playback volume controls in patch_via.c

Fix a issue to create playback volume control if pin has amplifier capability
but not DAC.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Revisit output_path parsing in patch_via.c
Takashi Iwai [Tue, 21 Jun 2011 07:01:36 +0000 (09:01 +0200)]
ALSA: hda - Revisit output_path parsing in patch_via.c

Change the order of the output-path list in a way from the DAC to the
target pin.  Also now the list include the target pin, too.

Together with this format change, simplify the arguments of
parse_output_path() function, and fix the initialization in
via_auto_init_output().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Use xxx Boost Volume for VIA
Takashi Iwai [Tue, 21 Jun 2011 06:37:41 +0000 (08:37 +0200)]
ALSA: hda - Use xxx Boost Volume for VIA

Drop "Capture" prefix from the mic-boost names.
Otherwise some control names can overflow the max name length.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix a compile error in patch_ca0132.c for the recent SPDIF change
Takashi Iwai [Tue, 21 Jun 2011 05:44:51 +0000 (07:44 +0200)]
ALSA: hda - Fix a compile error in patch_ca0132.c for the recent SPDIF change

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'fix/hda' into topic/via-cleanup
Takashi Iwai [Tue, 21 Jun 2011 05:34:00 +0000 (07:34 +0200)]
Merge branch 'fix/hda' into topic/via-cleanup

Conflicts:
sound/pci/hda/patch_via.c

12 years agoALSA: hda - Add Creative CA0132 HDA codec support
Ian Minett [Wed, 15 Jun 2011 22:35:17 +0000 (15:35 -0700)]
ALSA: hda - Add Creative CA0132 HDA codec support

Create patch_ca0132.c, to add support for devices featuring the
Creative CA0132 HD-audio codec.

This driver implements :-
* 1 playback subdevice to headphone and speaker
* 2 capture subdevices:
   i - Mic-in
   ii- Line-in
* mixer device

Advanced DSP features are not yet included.
Developed and maintained by Creative Labs, Inc.

Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: VIA HDA: Create a master amplifier control for VT1718S.
Lydia Wang [Mon, 20 Jun 2011 06:17:56 +0000 (14:17 +0800)]
ALSA: VIA HDA: Create a master amplifier control for VT1718S.

Create a master volume and mute control of playback for VT1718S.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: VIA HDA: Mute/unmute mixer conncted to Headphone for VT1718S.
Lydia Wang [Mon, 20 Jun 2011 06:16:33 +0000 (14:16 +0800)]
ALSA: VIA HDA: Mute/unmute mixer conncted to Headphone for VT1718S.

When switch HP independent mode, mute/unmute connctions of mixer  which is
connected to headphone for VT1718S.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: VIA HDA: Modify initial verbs list for VT1718S.
Lydia Wang [Mon, 20 Jun 2011 06:14:37 +0000 (14:14 +0800)]
ALSA: VIA HDA: Modify initial verbs list for VT1718S.

Remove some invalid initial verbs and correct some wrong initial verbs
for VT1718S codec.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Remove ALC268 model override for CPR2000
Tony Vroon [Mon, 20 Jun 2011 21:11:11 +0000 (22:11 +0100)]
ALSA: hda - Remove ALC268 model override for CPR2000

The "diverse" Quanta ID 0x0763 is overridden to ALC268_ACER.
This keeps headphone automute and microphone input from operating
on at least one laptop from Opti Systems.
Without the override, the BIOS parser does a fine job setting the
card up and everything works.

Tested-By: Peter Schneider <e.at.chi.kaen@googlemail.com>
Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: adau1701: signedness bug in adau1701_write()
Dan Carpenter [Mon, 20 Jun 2011 07:11:25 +0000 (10:11 +0300)]
ASoC: adau1701: signedness bug in adau1701_write()

"ret" is supposed to be signed here.  The current code will only
return -EIO on error, instead of a more appropriate error code such
as -EAGAIN etc.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoALSA: HDA: Remove quirk for an HP device
David Henningsson [Mon, 20 Jun 2011 08:27:07 +0000 (10:27 +0200)]
ALSA: HDA: Remove quirk for an HP device

The reporter, who is running kernel 2.6.38, reports that
he needs to set model=auto for the headphone output to work
correctly.

BugLink: http://bugs.launchpad.net/bugs/761022
Cc: stable@kernel.org (v2.6.38+)
Reported-by: Jo
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Simplify analog-low-current mode check for VIA codecs
Takashi Iwai [Mon, 20 Jun 2011 13:40:19 +0000 (15:40 +0200)]
ALSA: hda - Simplify analog-low-current mode check for VIA codecs

Use the existing aa-loop list for simplifying the check for analog
low-current mode.  Also fix the stream count test for playback streams.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Remove NID_MAPPING hacks in patch_via.c
Takashi Iwai [Mon, 20 Jun 2011 13:10:28 +0000 (15:10 +0200)]
ALSA: hda - Remove NID_MAPPING hacks in patch_via.c

There is no longer virtual kmixer element for NID mapping.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Remove unused defines and struct fields in patch_via.c
Takashi Iwai [Mon, 20 Jun 2011 12:11:59 +0000 (14:11 +0200)]
ALSA: hda - Remove unused defines and struct fields in patch_via.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Name the primary out as Speaker when needed for VIA codecs
Takashi Iwai [Mon, 20 Jun 2011 12:09:02 +0000 (14:09 +0200)]
ALSA: hda - Name the primary out as Speaker when needed for VIA codecs

When the primary output is the speaker output, rather name it as
"Speaker".  This will be more intuitive.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Create loopback-list dynamically in patch_via.c
Takashi Iwai [Mon, 20 Jun 2011 12:05:46 +0000 (14:05 +0200)]
ALSA: hda - Create loopback-list dynamically in patch_via.c

Create loopback list dynamically from the parsed input pins for VIA
codecs instead of the fixed arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix smart51 handling again
Takashi Iwai [Mon, 20 Jun 2011 11:52:33 +0000 (13:52 +0200)]
ALSA: hda - Fix smart51 handling again

Fix the broken detection of smart51 and its handling.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Create virtual-master control for VIA codecs
Takashi Iwai [Mon, 20 Jun 2011 10:47:45 +0000 (12:47 +0200)]
ALSA: hda - Create virtual-master control for VIA codecs

Now let's add the missing Master control to VIA codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Initialize unsol events dynamically in patch_via.c
Takashi Iwai [Mon, 20 Jun 2011 10:39:26 +0000 (12:39 +0200)]
ALSA: hda - Initialize unsol events dynamically in patch_via.c

Issue the init verbs of unsolicited events dynamically from the parsed
results for VIA codecs.  Also, consolidate the unsol handlers for HP
and line-out mutes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Initialize input-path dynamically in patch_via.c
Takashi Iwai [Mon, 20 Jun 2011 10:09:02 +0000 (12:09 +0200)]
ALSA: hda - Initialize input-path dynamically in patch_via.c

Similarly like the previous commit, initialize the input-paths dynamically
from the parsed results instead of the fixed array for VIA codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Initialize output path dynamically in patch_via.c
Takashi Iwai [Mon, 20 Jun 2011 09:32:27 +0000 (11:32 +0200)]
ALSA: hda - Initialize output path dynamically in patch_via.c

Instead of fixed array for each codec type, initialize the output path
dynamically from the parsed results.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Replace with standard consts in patch_via.c
Takashi Iwai [Sun, 19 Jun 2011 14:27:53 +0000 (16:27 +0200)]
ALSA: hda - Replace with standard consts in patch_via.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix independent-HP handling in patch_via.c
Takashi Iwai [Sun, 19 Jun 2011 14:24:21 +0000 (16:24 +0200)]
ALSA: hda - Fix independent-HP handling in patch_via.c

Fix races in handling of HP DAC and independent streams for VIA codecs.
Also, allow the HP output path without front-DAC, and removed
unnecessary activation of HP mixer elements.

This also removes the handling of shared side/HP stream; it's anyway
implemented in a broken way, so we need to re-implement the feature
later...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Unify auto-parser in patch_via.c
Takashi Iwai [Sat, 18 Jun 2011 15:45:49 +0000 (17:45 +0200)]
ALSA: hda - Unify auto-parser in patch_via.c

Now all codecs use the same parser-path, so we can reduce into a single
auto-parser function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Return error for invalid setup for VIA
Takashi Iwai [Sat, 18 Jun 2011 15:33:34 +0000 (17:33 +0200)]
ALSA: hda - Return error for invalid setup for VIA

Instead of ignoring the invalid pin configuration, return the error.
This will avoid unexpected crash, anyway.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Unify capture-mixer creations in patch_via.c
Takashi Iwai [Sat, 18 Jun 2011 15:24:46 +0000 (17:24 +0200)]
ALSA: hda - Unify capture-mixer creations in patch_via.c

Create capture-related mixer elements dynamically from the parsed
ADCs and input-pins instead of fixed values for each codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Assign HP-independent PCM to individual stream
Takashi Iwai [Sat, 18 Jun 2011 14:40:14 +0000 (16:40 +0200)]
ALSA: hda - Assign HP-independent PCM to individual stream

Instead of using the secondary substream, create an individual PCM
stream for HP-independent PCM.  Otherwise it's difficult to handle
different channel numbers with multi-channel stream in the sam PCM
stream structure.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Unify PCM assignments in patch_via.c
Takashi Iwai [Sat, 18 Jun 2011 14:17:45 +0000 (16:17 +0200)]
ALSA: hda - Unify PCM assignments in patch_via.c

Unify PCM streams for all codecs by assigning the NID dynamically.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Don't create secondary substream when no independent-hp is used
Takashi Iwai [Sat, 18 Jun 2011 08:58:49 +0000 (10:58 +0200)]
ALSA: hda - Don't create secondary substream when no independent-hp is used

For VIA codecs, we shouldn't create a substream for independent HP mode,
when no individual HP DAC is found.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Re-implement smart51 detection for VIA codecs
Takashi Iwai [Fri, 17 Jun 2011 16:46:48 +0000 (18:46 +0200)]
ALSA: hda - Re-implement smart51 detection for VIA codecs

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Unify output-control parsing in patch_via.c
Takashi Iwai [Fri, 17 Jun 2011 15:53:38 +0000 (17:53 +0200)]
ALSA: hda - Unify output-control parsing in patch_via.c

Parse the output-paths more dynamically, i.e. traverse the paths
from each output pin instead of fixed assignment for each codec.
Now all codecs are using the same output parser code.

The smart51 setup doesn't work with this change, and will be fixed
in the next commits.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Unify input-volume creations in patch_via.c
Takashi Iwai [Fri, 17 Jun 2011 15:19:19 +0000 (17:19 +0200)]
ALSA: hda - Unify input-volume creations in patch_via.c

Now storing the analog-mixer widget in spec, we can simplify the rest
parts.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Auto-mute all LO and speakers in patch_via.c
Takashi Iwai [Fri, 17 Jun 2011 14:51:39 +0000 (16:51 +0200)]
ALSA: hda - Auto-mute all LO and speakers in patch_via.c

Muting all line-outs and/or speakers is more common in other drivers,
so we should follow it, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Change pin-ctl for auto-muting in patch_via.c
Takashi Iwai [Fri, 17 Jun 2011 14:37:45 +0000 (16:37 +0200)]
ALSA: hda - Change pin-ctl for auto-muting in patch_via.c

Mute the outputs via pin-controls instead of amps for the auto-mute
handling.  This makes our life easier as it avoids conflict of the states
between the mixer elements and the auto-mute toggles.

With this change, we can use vmaster for the master control easily now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Generate PCM names dynamically in patch_via.c
Takashi Iwai [Fri, 17 Jun 2011 14:24:21 +0000 (16:24 +0200)]
ALSA: hda - Generate PCM names dynamically in patch_via.c

This reduces lots of static strings.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Refactor ctl array handling in patch_via.c
Takashi Iwai [Fri, 17 Jun 2011 14:15:26 +0000 (16:15 +0200)]
ALSA: hda - Refactor ctl array handling in patch_via.c

No functional change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Defer mixer element creation to the right time in patch_via.c
Takashi Iwai [Fri, 17 Jun 2011 13:46:13 +0000 (15:46 +0200)]
ALSA: hda - Defer mixer element creation to the right time in patch_via.c

The jack-detect control should be created at the time of build_controls
callback instead of calling snd_hda_add_ctls() at the tree-parsing time.
For that, copy the control to the temporary array like other cases.

Also, fixed typos of vt1708_jack_detect in all places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fill ADCs dynamically for VIA codecs
Takashi Iwai [Fri, 17 Jun 2011 07:01:29 +0000 (09:01 +0200)]
ALSA: hda - Fill ADCs dynamically for VIA codecs

Instead of giving the fixed ADC list, parse the widgets and fill in
ADCs dynamically.

Also, probe the stereo-mixer input more dynamically, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Add control to suppress the dynamic pin-power for VIA
Takashi Iwai [Fri, 17 Jun 2011 14:59:21 +0000 (16:59 +0200)]
ALSA: hda - Add control to suppress the dynamic pin-power for VIA

Currently VIA driver controls the power-state of each pin per jack
detection.  But, it means that the power-state mismatch may occur when
the machine doesn't give the proper jack-detection.

For avoiding this problem, a new control element "Dynamic Power-Control"
is provided so that user can turn on/off the pin-power control.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Remove superfluous NID_MAPPING use for smart51 mixer
Takashi Iwai [Fri, 17 Jun 2011 12:55:02 +0000 (14:55 +0200)]
ALSA: hda - Remove superfluous NID_MAPPING use for smart51 mixer

Just a minor clean up; nid-mapping can be set directly to the smart51
mixer element.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: Fix DAPM sequence run for per-widget I/O methods
Mark Brown [Sun, 19 Jun 2011 12:49:28 +0000 (13:49 +0100)]
ASoC: Fix DAPM sequence run for per-widget I/O methods

Previously we were using the DAPM context rather than a widget as the
argument for update_bits() so we didn't need to care that our list walk
of widgets left us one beyond the end of the list. Now we're using them
for the register update we need to make sure we're pointing at an actual
widget not the list_head.

Fix originally suggested by Liam on IM.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: Remove adau1701 from SND_SOC_ALL_CODECS due to Sigma dependency
Mark Brown [Sat, 18 Jun 2011 14:31:38 +0000 (15:31 +0100)]
ASoC: Remove adau1701 from SND_SOC_ALL_CODECS due to Sigma dependency

The Sigma code is in drivers/firmware which is only included on a very
small subset of architectures and so ends up breaking the build on
others.  There's a pending patch to make the directory build as standard
but it's not merged yet.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Add adau* drivers to the Analog Devices file patterns
Mark Brown [Fri, 17 Jun 2011 10:22:27 +0000 (11:22 +0100)]
ASoC: Add adau* drivers to the Analog Devices file patterns

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agoALSA: HDA: Remove redundant LPIB quirks for ATI chipset
David Henningsson [Fri, 17 Jun 2011 14:27:01 +0000 (16:27 +0200)]
ALSA: HDA: Remove redundant LPIB quirks for ATI chipset

Now that we have changed the position_fix default for ATI and AMD
to be LPIB (see commit 50e3bbf989), we can remove the quirks that
were added for ATI chipsets.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'fix/hda' into topic/misc
Takashi Iwai [Fri, 17 Jun 2011 12:54:47 +0000 (14:54 +0200)]
Merge branch 'fix/hda' into topic/misc

12 years agoALSA: hda - Fix no NID error with VIA codecs
Takashi Iwai [Fri, 17 Jun 2011 12:23:46 +0000 (14:23 +0200)]
ALSA: hda - Fix no NID error with VIA codecs

The via driver spews warnigs like
hda-codec: no NID for mapping control Independent HP:0:0
with some codecs because snd_hda_add_nid() is called with nid=0.
This patch fixes it by skipping the call when no corresponding widget
is found.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: Blackfin: allow SPI for SSM2602 parts
Mike Frysinger [Fri, 17 Jun 2011 02:24:15 +0000 (22:24 -0400)]
ASoC: Blackfin: allow SPI for SSM2602 parts

This board has hardware switches for selecting SPI or I2C, so don't
require I2C for this driver.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoALSA: isight: adjust for new queueing API
Clemens Ladisch [Fri, 17 Jun 2011 06:18:35 +0000 (08:18 +0200)]
ALSA: isight: adjust for new queueing API

Since commit 13882a82ee16 (optimize iso queueing by setting
wake only after the last packet), drivers are required to call
fw_iso_context_queue_flush() after queueing a batch of packets.
The missing call would have an effect only if the controller
queue underruns, but then the DMA would stop completely.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: firewire-speakers, oxygen, ua101: allow > 10 s periods
Clemens Ladisch [Fri, 17 Jun 2011 06:17:56 +0000 (08:17 +0200)]
ALSA: firewire-speakers, oxygen, ua101: allow > 10 s periods

Since commit f2b3614cefb6 (Don't check DMA time-out too shortly),
drivers need no longer restrict their PCM period length to be shorter
than 10 seconds.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: 6fire - Fix signedness bug
Torsten Schenk [Thu, 16 Jun 2011 19:06:27 +0000 (21:06 +0200)]
ALSA: 6fire - Fix signedness bug

Fixed remaining issues of the signedness bug discovered by Dan Carpenter.
A check was remaining that tests if unsigned rt->rate is >= 0.
Changed that so that rt->rate now consistently uses ARRAY_SIZE(rates)
as invalid rate value and not -1.

Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: AD1836: rename suspend/resume funcs
Barry Song [Wed, 15 Jun 2011 19:29:22 +0000 (15:29 -0400)]
ASoC: AD1836: rename suspend/resume funcs

Use less specific names for suspend/resume to match the probe/remove funcs
where these are now used.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Scott Jiang <scott.jiang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: AD1836: fix codec name
Mike Frysinger [Wed, 15 Jun 2011 19:29:21 +0000 (15:29 -0400)]
ASoC: AD1836: fix codec name

The codec name should not have a "-codec" suffix since this is not part of
a MFD.  This was incorrectly changed during the multi-component updated.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: AD1836: fix intermixed tab/space indentation
Mike Frysinger [Wed, 15 Jun 2011 19:29:20 +0000 (15:29 -0400)]
ASoC: AD1836: fix intermixed tab/space indentation

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: AD1836: drop unnecessary spi register check
Mike Frysinger [Wed, 15 Jun 2011 19:29:19 +0000 (15:29 -0400)]
ASoC: AD1836: drop unnecessary spi register check

The only thing the init func does is register a spi driver, so if that
fails, we return the value back up to the caller who will display an
error message for us.  So drop the redundant checking/message.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: AD1836: clean up comment headers
Mike Frysinger [Wed, 15 Jun 2011 19:29:23 +0000 (15:29 -0400)]
ASoC: AD1836: clean up comment headers

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Blackfin: Add bf5xx-adau1701 machine driver
Lars-Peter Clausen [Mon, 13 Jun 2011 13:26:21 +0000 (15:26 +0200)]
ASoC: Blackfin: Add bf5xx-adau1701 machine driver

Add a machine driver to support the ADAU1701 SigmaDSP processors on
Analog Devices BF5XX evaluation boards.

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>
12 years agoASoC: Add ADAU1701 codec driver
Lars-Peter Clausen [Mon, 13 Jun 2011 13:26:20 +0000 (15:26 +0200)]
ASoC: Add ADAU1701 codec driver

This patch adds support for the Analog Devices ADAU1701 SigmaDSP.

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>
12 years agoASoC: Clean up some coding style nits in the bf5xx-i2s-pcm driver
Mark Brown [Mon, 13 Jun 2011 16:50:18 +0000 (17:50 +0100)]
ASoC: Clean up some coding style nits in the bf5xx-i2s-pcm driver

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoALSA: ctxfi: Change PLL initialization code
Harry Butterworth [Tue, 14 Jun 2011 15:09:12 +0000 (23:09 +0800)]
ALSA: ctxfi: Change PLL initialization code

This is a reworked patch from Creative to change the PLL code to address
unreliable 44100Hz initialization.

Signed-off-by: Harry Butterworth <heb1001@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: lola - Fix section mismatch
Takashi Iwai [Wed, 15 Jun 2011 13:14:49 +0000 (15:14 +0200)]
ALSA: lola - Fix section mismatch

Add missing __devinit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: dapm - Refactor widget IO functions in preparation for platform widgets.
Liam Girdwood [Mon, 13 Jun 2011 18:37:36 +0000 (19:37 +0100)]
ASoC: dapm - Refactor widget IO functions in preparation for platform widgets.

This time with soc_widget_update_bits reflecting recent soc_update_bits changes.

Currently widget IO is tightly coupled to the CODEC drivers. Future platform DSP
devices have mixer components that can alter power usage and hence require full
DAPM support.

This provides a generic widget IO operation wrapper in preparation for
future patches that implement platform driver DAPM.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoALSA: rawmidi - Use workq for event handling
Takashi Iwai [Tue, 14 Jun 2011 12:37:06 +0000 (14:37 +0200)]
ALSA: rawmidi - Use workq for event handling

Kill tasklet usage in rawmidi core code.  Use workq for the event callback
instead of tasklet (which is used only in core/seq/seq_midi.c).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: es1968,maestro3 - Use work for hw-volume control
Takashi Iwai [Tue, 14 Jun 2011 11:57:02 +0000 (13:57 +0200)]
ALSA: es1968,maestro3 - Use work for hw-volume control

Instead of tasklet, use workq for handling the hw-volume control.
This reduces lots of spinlocks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: Fix mismerge with release branch
Mark Brown [Tue, 14 Jun 2011 08:51:50 +0000 (09:51 +0100)]
ASoC: Fix mismerge with release branch

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'test/pci-rename' into topic/misc
Takashi Iwai [Tue, 14 Jun 2011 06:56:42 +0000 (08:56 +0200)]
Merge branch 'test/pci-rename' into topic/misc

12 years agoALSA: Update document for using KBUILD_MODNAME
Takashi Iwai [Tue, 14 Jun 2011 06:54:14 +0000 (08:54 +0200)]
ALSA: Update document for using KBUILD_MODNAME

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix missing static inline to beep dummy function
Takashi Iwai [Tue, 14 Jun 2011 06:14:32 +0000 (08:14 +0200)]
ALSA: hda - Fix missing static inline to beep dummy function

The commit 2308f4add3de9f6c9c9f02e49461e94d84bb200a missed static inline
thus it resulted in multiple-definitions error at linking.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: ctxfi: Implement a combined capabilities query method to replace multiple have_...
Harry Butterworth [Sat, 11 Jun 2011 09:41:13 +0000 (17:41 +0800)]
ALSA: ctxfi: Implement a combined capabilities query method to replace multiple have_x query methods.

Signed-off-by: Harry Butterworth <heb1001@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: ctxfi: Add support for Creative Titanium HD
Harry Butterworth [Sat, 11 Jun 2011 08:02:06 +0000 (16:02 +0800)]
ALSA: ctxfi: Add support for Creative Titanium HD

Initialise model-specific DAC and ADC parts.
Add controls for output and mic source selection.
Rename some mixer controls according to ControlNames.txt.
Remove Playback switches for Line-in and IEC958-in - these
were controlling the input mute/unmute which affected
capture too.  Use the capture switches to control the
input mute/unmute instead - it's less confusing.
Initialise the WM8775 to invert the left-right clock
to swap the left and right channels of the mic and aux
input.

Signed-off-by: Harry Butterworth <heb1001@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: 6fire: Fix double-free bug in usb6fire_fw_ezusb_upload()
Jesper Juhl [Mon, 13 Jun 2011 21:52:02 +0000 (23:52 +0200)]
ALSA: 6fire: Fix double-free bug in usb6fire_fw_ezusb_upload()

We have a double-free bug in
sound/usb/6fire/firmware.c::usb6fire_fw_ezusb_upload().
We already call release_firmware(fw) on line 258, so when we then do it
again after usb6fire_fw_ezusb_write() returns <0, we have a double-free.
Easily fixed by just removing the last call to release_firmware().

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>