Commit graph

4793 commits

Author SHA1 Message Date
Takashi Iwai 9e4ce164ee Merge branch 'topic/hda' into for-linus 2012-01-12 09:59:18 +01:00
Takashi Iwai f2cbba7602 ALSA: hda - Fix the lost power-setup of seconary pins after PM resume
When multiple headphone or other detectable output pins are present,
the power-map has to be updated after resume appropriately, but the
current driver doesn't check all pins but only the first pin (since
it's enough to check it for the mute-behavior).  This resulted in the
silent output from the secondary outputs after PM resume.

This patch fixes the problem by checking all pins at (re-)init time.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740347

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-11 12:34:11 +01:00
Clemens Ladisch 56225e4cc8 ALSA: virtuoso: add S/PDIF input support for all Xonars
All Xonar cards support S/PDIF input, but the cards without optical or
coaxial plugs have only undocumented pin connectors.  Support for the
ST/STX was already added in a previous patch; this adds support for the
D1/DX (JP2), DG (J5), DS (J5), and HDAV Slim (J12).

Many thanks to Zoltan Miklos for testing the DS and DX.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-11 09:24:50 +01:00
Pavel Hofman 52cd0a76fd ALSA: ice1724 - Support for ooAoo SQ210a
This card shares PCI ids with Chaintec AV710. Therefore, it will not be
detected automatically, it can only be activated by the module parameter
model=sq210a.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-11 08:57:54 +01:00
Pavel Hofman 2b151ef734 ALSA: ice1724 - Allow card info based on model only
When two different cards share the same PCI vendor/subvendor
identification, allow card info based on model only.
Do not require subvendor ID.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-11 08:57:40 +01:00
Pavel Hofman ffd364ddd3 ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations
Add the capture pcm only if there is at least one ADC configured in
the SYSCONF register.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-11 08:56:59 +01:00
Adrian Knoth f7de8ba3fc ALSA: hdspm - Provide unique driver id based on card serial
Before, /proc/asound looked like this:

 2 [Default        ]: HDSPM - RME RayDAT_f1cd85
                      RME RayDAT S/N 0xf1cd85 at 0xf7300000, irq 18

In case of a second HDSPM card, its name would be Default_1. This is
cumbersome, because the order of the cards isn't stable across reboots.

To help userspace tools referring to the correct card, this commit
provides a unique id for each card:

 2 [HDSPMxf1cd85   ]: HDSPM - RME RayDAT_f1cd85
                      RME RayDAT S/N 0xf1cd85 at 0xf7300000, irq 18

In this example, userspace (configuration files) would then use
hw:HDSPMxf1cd85 to choose the right card.

The serial is masked to 24bits, so this string is always shorter than
sixteen chars.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-11 08:55:58 +01:00
Takashi Iwai 4808d12d1d ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs
Currently the driver checks only the out_mix_path[] for the primary
output route for judging whether to create the loopback-mixing control
or not.  But, there are cases where aamix-routing is available only on
headphone or speaker paths but not on the primary output path.  So, the
driver ignores such cases inappropriately.

This patch fixes the check of the loopback-mixing control by testing
all mix-routing paths.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-10 15:16:02 +01:00
Takashi Iwai 3a90274de3 ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs
When an invalid NID is given, get_wcaps() returns zero as the error,
but get_wcaps_type() takes it as the normal value and returns a bogus
AC_WID_AUD_OUT value.  This confuses the parser.

With this patch, get_wcaps_type() returns -1 when value 0 is given,
i.e. an invalid NID is passed to get_wcaps().

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740118

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-10 12:41:22 +01:00
Takashi Iwai de4da59e48 ALSA: hda - Use auto-parser for HP laptops with cx20459 codec
These laptops can work well with the auto-parser and their BIOS setups,
and in addition, the auto-parser fixes the problem with S3/S4 where
the unsol event handling is killed after resume due to fallback to the
single-cmd mode.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740115

Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-10 09:04:26 +01:00
Takashi Iwai 74eeb141d3 ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info()
Dan Carpenter reported that setting 0 to uinfo->value.enumerated.items
in snd_asihpi_cmode_info() may lead to Oops.  This function should
return an error immediately in such a case instead.

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-09 18:27:54 +01:00
Takashi Iwai 9badda0a0a ALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref()
Dan Carpenter reported that setting 0 to uinfo->value.enumerated.items
in snd_hdsp_info_pref_sync_ref() may lead to Oops.  This function should
return an error immediately in such a case instead.

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-09 18:27:44 +01:00
Jérémy Lal 7e5bea19ae ALSA: hda/cirrus - support for iMac12,2 model
This early 2011 model just need to have headphones on GPI02
instead of GPI01, and use BIOS pincfgs.
It is detected by codec SSID.
The iMac12,1 model is known to work the same way, although maybe
not with the same codec SSID.

Signed-off-by: Jérémy Lal <kapouer@melix.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-09 17:26:25 +01:00
Adrian Knoth 7d53a631ed ALSA: hdspm - Refactor serial number to avoid code duplication
The serial number is used multiple times in hdspm.c. Since it belongs
to the card, let's store it in struct hdspm and refer to it whenever
necessary.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08 16:05:40 +01:00
Raymond Yau fb65c2dfe6 ALSA: Au88x0 - Fix channels swapping of 4 channels playback
Fix channels swapping of 4 channels playback by
using vortex_adbdma_stopfifo instead of vortex_adbdma_pausefifo
for SNDRV_PCM_TRIGGER_STOP event

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08 14:39:26 +01:00
Raymond Yau 3ae4e1f7a0 ALSA: Au88x0 - Fix IRQ fifo error and channels swap of 4 channels playback
Fix IRQ fifo error when playing stereo by set stereo flag of fifo control.
This also fix the swap of front and rear channels on au8830.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08 14:38:42 +01:00
Raymond Yau 76474da05f ALSA: Au88x0 - Fix Xtalk's constants
- Fix XtalkGainsDefault, XtalkGains1Chn
- Fix XtalkWideCoefsLeftEQ, XtalkWideCoefsRightEQ
- Fix XtlakWideCoefsLeftXT, XtalkWideCoefsRightXT

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08 14:35:40 +01:00
Raymond Yau 9489f2c63f ALSA: Au88x0 - Xtalk - fix write/read of eq and xt instates
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08 14:35:29 +01:00
Pavel Hofman 219e2cd41b ALSA: ice1724 - External clock item only for cards with SPDIF_IN
Append the external clock item to the clock list only if
the SPDIF_IN capability is defined in the SPDIF register.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08 14:28:32 +01:00
Pavel Hofman e7848163aa ALSA: ice1724 - Check for ac97 to avoid kernel oops
Cards with identical PCI ids but no AC97 config in EEPROM do not have
the ac97 field initialized. We must check for this case to avoid kernel oops.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08 14:26:01 +01:00
David Henningsson f16c2cc3c4 ALSA: HDA: Remove Poulsbo position fix quirks
Now that we have changed the poulsbo chip to use LPIB position fix,
we can remove the individual machine quirks that do the same thing.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08 10:00:10 +01:00
David Henningsson 2267ea9762 ALSA: HDA: Fix typo for ALC269VB_FIXUP_DMIC
This fixup is not actually used, so in practice this is just a
cosmetic fix.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08 09:59:30 +01:00
David Henningsson 5660ffd069 ALSA: HDA: Add support for Cirrus Logic 4213
The CS4213 chip is similar to the CS4210, but it does not have
SPDIF capabilities. Also, it has fewer pins, and the vendor specific
nid is different. With this patch, we have working inputs and outputs
(and automute/autoswitch). However, we don't know anything about
the vendor specific processing coefficients, so we don't read or write
to that node in this patch.

BugLink: https://bugs.launchpad.net/bugs/910792
Tested-by: Hsin-Yi Chen <hychen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08 09:57:37 +01:00
David Henningsson 78e2a928e3 ALSA: HDA: Fix automute for Cirrus Logic 421x
There was a bug in the automute logic causing speakers not to
mute when headphones were plugged in.

Cc: stable@kernel.org
Tested-by: Hsin-Yi Chen <hychen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08 09:57:18 +01:00
David Henningsson 40d03e63e9 ALSA: HDA: Fix master control for Cirrus Logic 421X
The control name "HP/Speakers" is non-standard, and since there is
only one DAC on this chip there is no need for a virtual master
anyway.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08 09:55:13 +01:00
David Henningsson 716e5db488 ALSA: HDA: Use LPIB position fix for Oaktrail
According to the thread on alsa-devel, the LPIB method is to prefer
for Oaktrail controller chip.

Reference: http://mailman.alsa-project.org/pipermail/alsa-devel/2012-January/047800.html

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08 09:54:37 +01:00
Tim Yamin dcc2cf7507 ALSA: emu10k1 - add another Audigy 2 ZS ID
0x20051102 is an Audigy 2 ZS.

Signed-off-by: Tim Yamin <plasm@roo.me.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-31 17:54:58 +01:00
Li Peng 09904b9506 ALSA: hda_intel: Add Oaktrail identifiers
Oaktrail has 0x8086, 0x080a - AZX_DRIVER_SCH

Taken from the Meego patches for Oaktrail

Signed-off-by: Li Peng <peng.li@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-31 17:50:12 +01:00
Eliot Blennerhassett 68d5339322 ALSA: asihpi - Fix format validity check.
Sharing and not reinitialising static pcm_hardware struct resulted in
stream format validity flags being incorrectly shared between cards.
Fix and clarify by declaring locally and initialising in the open functions.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:11 +01:00
Eliot Blennerhassett c1d70dd9c4 ALSA: asihpi - Use valid channel count in format enumeration.
Since introduction of mono and low latency modes, fixed channel count of 2
is not always valid.  Use reported max_channels instead.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:10 +01:00
Eliot Blennerhassett 8637bc94f6 ALSA: asihpi - Correct headers in cached control responses.
Previously, only payload and size were correct, sufficient for reading,
but other fields produced spurious debug output.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:10 +01:00
Eliot Blennerhassett f50efa2d9b ALSA: asihpi - Add HPI version to module description.
It is useful to know the HPI version without having to load the module,
in order to determine the matching firmware version.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:09 +01:00
Eliot Blennerhassett 4e225e2649 ALSA: asihpi - Distinguish four different emif init errors.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:08 +01:00
Eliot Blennerhassett 812550e9ef ALSA: asihpi - New defs and comments.
Add new error codes, and adapter properties.
Clean up some comments.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:07 +01:00
Eliot Blennerhassett 862e14185b ALSA: asihpi - Add autofade query.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:07 +01:00
Eliot Blennerhassett 50d5f773ec ALSA: asihpi - Simplify dsp code close.
dsp_code struct is not created if firmware is invalid, so check
and zero of firmware pointer is not necessary

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:06 +01:00
Eliot Blennerhassett 7036b92d30 ALSA: asihpi - Remove redundant struct members.
Structs hpi_adapter and snd_card_asihpi had members that
duplicate those in underlying hpi_adapter_obj or whose info
can be retrieved using hpi_adapter_get_info().

Print less info in probe function, it can be retrieved from /proc.

Avoid name redundancy: hpi_adapter_obj.adapter_type renamed to .type

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:05 +01:00
Eliot Blennerhassett 3dad06ac89 ALSA: asihpi - Increase debug response buffer size.
Enables retrieving more debug info in fewer transactions.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:05 +01:00
Eliot Blennerhassett 72868339e4 ALSA: asihpi - Add new function codes.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:04 +01:00
Eliot Blennerhassett d8aefaef1b ALSA: asihpi - Remove unused structs and defs
Structs related to network flash update are not required in kernel.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:03 +01:00
Eliot Blennerhassett 502f271ae3 ALSA: asihpi - Update node types.
Add "Internal" node type.
Remove GPI and GPO node types.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:02 +01:00
Eliot Blennerhassett 09c728aced ALSA: asihpi - Only set sync if card supports hardware stream grouping.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:02 +01:00
Eliot Blennerhassett 0be55c453f ALSA: asihpi - Relax drained check for more reliable playback startup.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:01 +01:00
Eliot Blennerhassett 8e0874ea72 ALSA: asihpi - Correct stray capital letters in identifier.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:00 +01:00
Eliot Blennerhassett cbd757daf5 ALSA: asihpi - Use snd_pcm_debug_name to get substream name.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:12:59 +01:00
Eliot Blennerhassett d4b06d23ab ALSA: asihpi - Volumes and meters may have 1 or 2 channels.
The channel count can be queried to determine which.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:12:58 +01:00
Eliot Blennerhassett c382a5da5c ALSA: asihpi - Low latency mode stream has fixed channel count.
Unlike other streams which support 1..max channels,

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:12:58 +01:00
Eliot Blennerhassett 40818b6242 ALSA: asihpi - Update copyright to 2011
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:12:57 +01:00
Eliot Blennerhassett f6baaec2af ALSA: asihpi - Split hpi version info into separate header file.
and update HPI version to 4.10

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:12:56 +01:00
Eliot Blennerhassett 47a74a5d1e ALSA: asihpi - fix pcm dma pointer tracking
Elapsed counter should only count data committed to snd_pcm_period_elapsed,
rather than all data available

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:12:52 +01:00