Commit graph

3183 commits

Author SHA1 Message Date
Takashi Iwai ceaa86ba2e ALSA: hda - Remove invalid init verbs for Nvidia 2ch codecs
Nvidia 2ch codecs have no NIDs greather than 0x05.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-15 14:41:59 +02:00
Takashi Iwai d0b1252dd1 ALSA: hda - Use common codes for ATI, Nvidia and VIA simple codecs
The code refactoring using the same helper functions for sharing the
codes among ATI, Nvidia and VIA simple_hdmi* stuff.  Except for that
spec->pcm_playback is no longer pointer, the functionality doesn't
change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-15 14:36:20 +02:00
Takashi Iwai 4f0110ced1 ALSA: hda - Merge ATI/VIA HDMI simple init functions
Just a minor code cleanup to use the same function for both AMD and VIA
simple_hdmi*().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-15 12:53:39 +02:00
Takashi Iwai 4b6ace9e71 ALSA: hda - Add the support for VIA HDMI pin detection
This patch adds the hotplug unsol event handling to simple_hdmi*().
It works on VIA VX900.  If AMD or Nvidia chips support the
pin-detection similarly, it can be added easily, too.

Reported-by: Annie Liu <annieliu@viatech.com.cn>
Tested-by: Annie Liu <annieliu@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-15 11:53:32 +02:00
Seth Heasley c20c5a841c ALSA: hda_intel: activate COMBO mode for Intel client chipsets
This patch activates the COMBO position_fix for recent Intel client chipsets.
COMBO mode is the recommended setting for Intel chipsets and eliminates HD
audio warnings in dmesg.  This patch has been tested on Lynx Point, Panther
Point, and Cougar Pont.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-15 10:28:16 +02:00
David Henningsson 80c8bfbe76 ALSA: HDA: Create phantom jacks for fixed inputs and outputs
PulseAudio sometimes have difficulties knowing that there is a
"Speaker" or "Internal Mic", if they have no individual volume
controls or selectors. As a result, only e g "Headphone" might
be created for a laptop, but no "Speaker".
To help out, create phantom jacks (that are always present,
at least for now) for "Speaker", "Internal Mic" etc, in case we
detect them.
The naming convention is e g "Speaker Phantom Jack".

In order not to pollute the /dev/input namespace with even more
devices, these are added to the kcontrols only, not the input devices.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-14 12:59:35 +02:00
Takashi Iwai 2e8b2b29d1 ALSA: hda - Don't forget to call init verbs added by fixup list
During the split to the auto-parser helper functions, the actual call
of init verbs was lost.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43366

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-13 16:47:32 +02:00
David Henningsson edfe3bfc1b ALSA: HDA: Pin fixup for Zotac Z68 motherboard
Pin 0x1b was connected to the front panel connector, which according to
the HDA standard should contain a mic and a headphone. In this case,
the headphone was listed as "line out" by BIOS.

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/993162
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-12 17:55:46 +02:00
Takashi Iwai f2a8ecaf6d ALSA: hda - Fix detection of Creative SoundCore3D controllers
The PCI ID entries of Creative SoundCore3D HD-audio controllers should
be before the wildcard for vendor = Creative.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-11 15:51:54 +02:00
Annie Liu 3de5ff8877 ALSA: hda - add support for HD-Audio CODECes of VIA HDMI GFX Cards
This is patch supporting the CODECes of HD-Audio function of VIA GFX
cards which support HDMI.
For CODECes 0x9f80/0x9f81, which belong to VX900, since the hardware
is not fully compliant to HD-Audio 1.3, simple_i*() is adopted
temporarily.

Signed-off-by: Annie Liu <annieliu@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-11 12:47:31 +02:00
Annie Liu 754fdff86f ALSA: hda - add support for HD-Audio of VIA HDMI GFX Cards
This is patch supporting HD-Audio function of VIA GFX cards which
support HDMI.
Those are integrated graphics of chipsets VX900 and VX11 separately.

Signed-off-by: Annie Liu <annieliu@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-11 12:47:15 +02:00
Steven Newbury 8393ec4a13 ALSA: hda - HDMI Audio init all connectors when VGA-switcheroo is off
When VGA_SWITCHEROO support is enabled hda_intel initialises the HDMI
audio device on the current VGA device.  When it's not enabled it only
initialises the HDMI device on the default VGA adaptor, this means
secondary cards get no audio support which is very unhelpful for
multi-seat!

With this patch, when SUPPORT_VGA_SWITCHEROO is disabled hda_intel
initialises all HDMI audio devices, not just the default VGA.

[minor optimizations by tiwai]

Signed-off-by: Steven Newbury <steve@snewbury.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-08 13:07:41 +02:00
Takashi Iwai 12b78a7f67 ALSA: hda - Fix uninitialized HDMI controllers with VGA-switcheroo
When VGA-switcheroo is built in but unused on systems with multiple
graphics cards, the initializations of non-default graphics cards are
skipped and never enabled (because the switcheroo is activated only
when the controller supports).  The current behavior is for avoiding
the system lockup by accessing the disabled GPU, but due to the recent
change in VGA-switcheroo, it determines the state simply by checking
with the default VGA device.  This is the culprit.

Now with the new vga_switcheroo_get_client_state(), we can know the
initial state of the bound GPU, thus can determine the initial audio
client state more correctly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-08 11:24:19 +02:00
Wang Xingchao 09617ce477 ALSA: hda - power setting error check
codec may reject power state transition requests(reporting PS-ERROR set),
in that case we re-issue a power state setting and check error bit again.

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-08 09:00:37 +02:00
Wang Xingchao e076eb5c95 ALSA: hda - check proper return value
snd_hda_param_read() return value -1 means error, others are responses

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-07 11:40:58 +02:00
Wang Xingchao 0f4ccbb025 ALSA: hda - reduce msleep time if EPSS power states supported
if EPSS supported, transition from D3 state to D0 state in less
than 10ms

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-07 11:40:33 +02:00
Wang Xingchao 0c7f46ad92 ALSA: hda - check supported power states
Add function to check whether power states supported by specific
codec node.

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-07 11:39:52 +02:00
Takashi Iwai 167d2d55bf ALSA: hda - Show D3cold state in proc files
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-06 12:17:45 +02:00
Wang Xingchao ce63f3ba25 ALSA: hda - add power states information in proc
add more power states information:
- reset status
- clock stop ok
- power states error

Output like:
Power: setting=D0, actual=D0, Error, Clock-stop-OK, Setting-reset

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-06 12:12:49 +02:00
Linus Torvalds be87cfb47c Sound updates #2 for 3.5-rc1
This is the second updates for 3.5-rc1.  It's mainly for OMAP4 HDMI
 updates and the device tree updates for OMAP, in addition to a couple
 of PCM accuray improvement and Realtek ALC269VD codec support.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJPvz1xAAoJEGwxgFQ9KSmk6eoQAILf1oW24ZoYfN4daJRmM0dj
 aQP1YqOCio0llgYZEM+VpuEdvRjfopUC00/TGyp/NGzWApJdkxZps6Ia8Dvuw215
 CG079u4z6fPqO82IeTkn9GkDkVo+BPkuvW2dz9j9QobkALZ7YNYNVXnNZ10qo8tU
 JqbNBSgn/bIOJ8nkbu7X1WwecVdZbqgj+xlobi/IidyNqJMkm95NR6OmFGJjyyAO
 dyA/i8WdMO1V2eypDvVAD7+0oLcJeTilkSj337UJex7SL/KlopBVdTgDqUyhXHtq
 +2G+2L3jHDjs+38d3DosPik5DRQkGswJWK08jNC5VAE+/SggLSf1aRDWUouJ1zqd
 0rpDZs9lB8XD8pt3/AYPVai6Yo+dGBVmoexvru1VnKivQ5R78kG+UV27yfhyjxeu
 hsr+NEdRNoN56953eZjRWoELh10+iZCH6ARDsAOLV1qRBgAEMe+ayiVdr5k6+12C
 pmVoBq/54NpDQ7M6FHR1KcgShxQ3mhwWbjmfPbJ36xuCZISRKXVDmt6GYjx0X4W6
 /frJqbv9sy/Ap09JQ6YPdUtmGz+Eh09QyfzpoyMq5vZbu4Y0YIzRS18R4YKdXD6g
 lmQ5tv01Fn3C0IQ1SHMaWiRqi0a2gtmXUEE0s4Pu5Oi9MNP2mFtcWuEivrMbysrL
 vLWGubKFTRIjmMQ7mtqx
 =88ho
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound update from Takashi Iwai:
 "This is the second updates for 3.5-rc1.  It's mainly for OMAP4 HDMI
  updates and the device tree updates for OMAP, in addition to a couple
  of PCM accuray improvement and Realtek ALC269VD codec support."

* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (21 commits)
  ALSA: hda/realtek - Add new codec support for ALC269VD
  ALSA: core: group read of pointer, tstamp and jiffies
  ASoC: OMAP: HDMI: Rename sound card source file
  ASoC: OMAP: HDMI: Make sound card naming more generic
  ASoC: OMAP: HDMI: Make build config options more generic
  ASoC: OMAP: HDMI: Expand capabilities of the HDMI DAI
  ASoC: OMAP: HDMI: Improve how the display state is verified
  ASoC: OMAP: HDMI: Expand configuration of hw_params
  ASoC: OMAP: HDMI: Use the DSS audio interface
  ASoC: OMAP: HDMI: Create a structure for private data of the CPU DAI
  ASoC: OMAP: HDMI: Change error values in HDMI CPU DAI
  ASoC: OMAP: HDMI: Update the platform device names
  ASoC: omap-abe-twl6040: Introduce driver data for runtime parameters
  ASoC: omap-abe-twl6040: Move Digital Mic widget into dapm table
  ASoC: omap-abe-twl6040: Keep only one snd_soc_dai_link structure
  ASoC: omap-dmic: Add device tree bindings
  ASoC: omap-mcpdm: Add device tree bindings
  ASoC: omap-mcbsp: buffer size constraint only applies to playback stream
  ASoC: omap-mcbsp: Use the common interrupt line if supported by the SoC
  ASoC: omap-mcbsp: Remove unused FRAME dma_op_mode
  ...
2012-05-25 08:45:25 -07:00
Linus Torvalds 58823de9d2 Add the support of VGA-switcheroo audio client for HD-audio
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJPvzw3AAoJEGwxgFQ9KSmksMoP/i2gSvr4mCqFlFN1RbHLB7cg
 SZ1bccn3SoX72n2zGFUoBiqvup8lwK1Bp9NMOiC2X1rhdPrEvmXP2f/6SoK/aGOM
 K/dQ04KmwCNsYmuJMYTexEKOdWL2ufHRfNDfuIppUxHkl4IDSex0ggzDpnzYq4ba
 Ufod7K1Cgjt/64ofo/1asLiE6nB0B9p7xafd2GDRipU9bbgO7KGsLMSn8guA711h
 Ez1sAjHVOVgzI/D1G/zjqfNTeMrrDQIe5lbbv+1UlECIv9A5E/7CMoO8ofHGFy2K
 BePS6rrMsN5xaADR4LyNjoSqGomnvI+fWvrraWU6sJGl0qzdUgBr8BG7aF5U6Qg1
 9EokC9M3S+UKSEHhhqFNGIPEdBeDiK8LlcxtDNP3zyU6nEcouKt+1C/dUmNnJK2b
 ZYV6JWEs/PhJB9z4LHp0lgDL51H3pNSKkRtZCPnulEGa64wNnqWUWkHQw4rDvbSZ
 fscwNMHNXoXg2QfqCQaUBgxjpKqm9jMPOZbx5P4NoEOBYGXjOEDmQsknyh8zbilN
 B4nOZyfexMgTaPSwRhMs4ttn2xDaJ//oUjQl6wCHT4S8C/mmFGYtWFzTMTtn0NGh
 dFk1g0nv649gjtyitaWAXgDxee6Lgxu0YtvnrHecJcJyS1PYt4sh9vaOrURPlm+A
 sj66LuFKtLOj8qkOY273
 =to5n
 -----END PGP SIGNATURE-----

Merge tag 'hda-switcheroo' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull VGA-switcheroo audio client support for HD-audio from Takashi Iwai.

This depended on the recent drm pull.

* tag 'hda-switcheroo' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - unlock on error in azx_interrupt()
  ALSA: hda - Support VGA-switcheroo
  ALSA: hda - Export snd_hda_lock_devices()
  ALSA: hda - Check the dead HDMI audio controller by vga-switcheroo
2012-05-25 08:38:26 -07:00
Kailang Yang adcc70b249 ALSA: hda/realtek - Add new codec support for ALC269VD
Also fix some settings applied only for ALC269VB.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-25 08:08:38 +02:00
Linus Torvalds 2e341ca686 Sound updates for 3.5-rc1
This is the first big chunk for 3.5 merges of sound stuff.
 There are a few big changes in different areas.  First off, the
 streaming logic of USB-audio endpoints has been largely rewritten
 for the better support of "implicit feedback".  If anything about USB
 got broken, this change has to be checked.
 
 For HD-audio, the resume procedure was changed; instead of delaying
 the resume of the hardware until the first use, now waking up immediately
 at resume.  This is for buggy BIOS.
 
 For ASoC, dynamic PCM support and the improved support for digital links
 between off-SoC devices are major framework changes.
 
 Some highlights are below:
 
 * HD-audio
 - Avoid the accesses of invalid pin-control bits that may stall the codec
 - V-ref setup cleanups
 - Fix the races in power-saving code
 - Fix the races in codec cache hashes and connection lists
 - Split some common codes for BIOS auto-parser to hda_auto_parser.c
 - Changed the PM resume code to wake up immediately for buggy BIOS
 - Creative SoundCore3D support
 - Add Conexant CX20751/2/3/4 codec support
 
 * ASoC
 - Dynamic PCM support, allowing support for SoCs with internal routing
   through components with tight sequencing and formatting constraints
   within their internal paths or where there are multiple components
   connected with CPU managed DMA controllers inside the SoC.
 - Greatly improved support for direct digital links between off-SoC
   devices, providing a much simpler way of connecting things like digital
   basebands to CODECs.
 - Much more fine grained and robust locking, cleaning up some of the
   confusion that crept in with multi-component.
 - CPU support for nVidia Tegra 30 I2S and audio hub controllers and
   ST-Ericsson MSP I2S controolers
 - New CODEC drivers for Cirrus CS42L52, LAPIS Semiconductor ML26124, Texas
   Instruments LM49453.
 - Some regmap changes needed by the Tegra I2S driver.
 - mc13783 audio support.
 
 * Misc
 - Rewrite with module_pci_driver()
 - Xonar DGX support for snd-oxygen
 - Improvement of packet handling in snd-firewire driver
 - New USB-endpoint streaming logic
 - Enhanced M-audio FTU quirks and relevant cleanups
 - Increment the support of OSS devices to 256
 - snd-aloop accuracy improvement
 
 There are a few more pending changes for 3.5, but they will be
 sent slightly later as partly depending on the changes of DRM.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJPvD/9AAoJEGwxgFQ9KSmkPsIP/AuBGpAZy7b7FiEEIy1Hhdws
 US8WVuPzyDslMVdzZ8OFqyPXanIcL9gscoOGMZOEy7UFtMBiR4GuYiPRPubEMxuP
 /gopUqK4SqIsIwT238qqYszSJSxE7gNEZ/2jhSGtkX4EkaSZ4bAskn0iOKX5uw2f
 kTUQknA1rNLIGba2z6rJbgIW7hdxGfpFy05ruv3ct81nO+5JlgyLuP/v5R6jL+do
 cum0N4dJFRd9YSEi2BG612gdz8LJyzOgPqBKmxMEva6BfqLkR8EdP80FtE3eEOiP
 Et1q2LhZwOlBt0BEjsjjOVxMsgxVax6ps9cuNRTk5ECEOldU5dbDatC45L/e9mSD
 OQVUjYAX1mQAtYva4U4PPn6WU6ma2L5yjy4peCObtyCMkEchXk1bfs4CEfVqCXUP
 yFYN8C+y6osZOyWE3+Enn9ifZdWyLeSVq6CT33Yt+fyKlswp6gRkhKYiEPqTA5aU
 p71X59Pp7q1y3tQwiMJNpf2QdkxuxfKURHswdc4BS9ct0mdZhQX0GyDS7OffkTd4
 Lq5UkVMHA1rLlF9oRPd2C9P4BuMEuvLjf662YCKiw+mWFYdBC036DHLLjm1Hcwuj
 UkpQ2PSrrdHG1u0c3ooZ9dQj1BNX4LoABLqvaMtce6sESD/hJ5gcprYJWvtituwM
 ZzZiJavIWsoJ+SWQWBHe
 =+JSm
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "This is the first big chunk for 3.5 merges of sound stuff.

  There are a few big changes in different areas.  First off, the
  streaming logic of USB-audio endpoints has been largely rewritten for
  the better support of "implicit feedback".  If anything about USB got
  broken, this change has to be checked.

  For HD-audio, the resume procedure was changed; instead of delaying
  the resume of the hardware until the first use, now waking up
  immediately at resume.  This is for buggy BIOS.

  For ASoC, dynamic PCM support and the improved support for digital
  links between off-SoC devices are major framework changes.

  Some highlights are below:

  * HD-audio
   - Avoid accesses of invalid pin-control bits that may stall the codec
   - V-ref setup cleanups
   - Fix the races in power-saving code
   - Fix the races in codec cache hashes and connection lists
   - Split some common codes for BIOS auto-parser to hda_auto_parser.c
   - Changed the PM resume code to wake up immediately for buggy BIOS
   - Creative SoundCore3D support
   - Add Conexant CX20751/2/3/4 codec support

  * ASoC
   - Dynamic PCM support, allowing support for SoCs with internal
     routing through components with tight sequencing and formatting
     constraints within their internal paths or where there are multiple
     components connected with CPU managed DMA controllers inside the
     SoC.
   - Greatly improved support for direct digital links between off-SoC
     devices, providing a much simpler way of connecting things like
     digital basebands to CODECs.
   - Much more fine grained and robust locking, cleaning up some of the
     confusion that crept in with multi-component.
   - CPU support for nVidia Tegra 30 I2S and audio hub controllers and
     ST-Ericsson MSP I2S controolers
   - New CODEC drivers for Cirrus CS42L52, LAPIS Semiconductor ML26124,
     Texas Instruments LM49453.
   - Some regmap changes needed by the Tegra I2S driver.
   - mc13783 audio support.

  * Misc
   - Rewrite with module_pci_driver()
   - Xonar DGX support for snd-oxygen
   - Improvement of packet handling in snd-firewire driver
   - New USB-endpoint streaming logic
   - Enhanced M-audio FTU quirks and relevant cleanups
   - Increment the support of OSS devices to 256
   - snd-aloop accuracy improvement

  There are a few more pending changes for 3.5, but they will be sent
  slightly later as partly depending on the changes of DRM."

Fix up conflicts in regmap (due to duplicate patches, with some further
updates then having already come in from the regmap tree).  Also some
fairly trivial context conflicts in the imx and mcx soc drivers.

* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (280 commits)
  ALSA: snd-usb: fix stream info output in /proc
  ALSA: pcm - Add proper state checks to snd_pcm_drain()
  ALSA: sh: Fix up namespace collision in sh_dac_audio.
  ALSA: hda/realtek - Fix unused variable compile warning
  ASoC: sh: fsi: enable chip specific data transfer mode
  ASoC: sh: fsi: call fsi_hw_startup/shutdown from fsi_dai_trigger()
  ASoC: sh: fsi: use same format for IN/OUT
  ASoC: sh: fsi: add fsi_version() and removed meaningless version check
  ASoC: sh: fsi: use register field macro name on IN/OUT_DMAC
  ASoC: tegra: Add machine driver for WM8753 codec
  ALSA: hda - Fix possible races of accesses to connection list array
  ASoC: OMAP: HDMI: Introduce codec
  ARM: mx31_3ds: Add sound support
  ASoC: imx-mc13783 cleanup
  mx31moboard: Add sound support
  ASoC: mc13783 codec cleanups
  ASoC: add imx-mc13783 sound support
  ASoC: Add mc13783 codec
  mfd: mc13xxx: add codec platform data
  ASoC: don't flip master of DT-instantiated DAI links
  ...
2012-05-23 13:05:43 -07:00
Linus Torvalds e8650a0823 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial updates from Jiri Kosina:
 "As usual, it's mostly typo fixes, redundant code elimination and some
  documentation updates."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (57 commits)
  edac, mips: don't change code that has been removed in edac/mips tree
  xtensa: Change mail addresses of Hannes Weiner and Oskar Schirmer
  lib: Change mail address of Oskar Schirmer
  net: Change mail address of Oskar Schirmer
  arm/m68k: Change mail address of Sebastian Hess
  i2c: Change mail address of Oskar Schirmer
  net: Fix tcp_build_and_update_options comment in struct tcp_sock
  atomic64_32.h: fix parameter naming mismatch
  Kconfig: replace "--- help ---" with "---help---"
  c2port: fix bogus Kconfig "default no"
  edac: Fix spelling errors.
  qla1280: Remove redundant NULL check before release_firmware() call
  remoteproc: remove redundant NULL check before release_firmware()
  qla2xxx: Remove redundant NULL check before release_firmware() call.
  aic94xx: Get rid of redundant NULL check before release_firmware() call
  tehuti: delete redundant NULL check before release_firmware()
  qlogic: get rid of a redundant test for NULL before call to release_firmware()
  bna: remove redundant NULL test before release_firmware()
  tg3: remove redundant NULL test before release_firmware() call
  typhoon: get rid of redundant conditional before all to release_firmware()
  ...
2012-05-22 19:22:50 -07:00
Takashi Iwai 382e6a859e Merge branch 'topic/misc' into for-linus 2012-05-21 12:51:35 +02:00
Takashi Iwai 8a39057628 ALSA: hda/realtek - Fix unused variable compile warning
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-21 03:07:42 +02:00
Takashi Iwai 09cf03b80c ALSA: hda - Fix possible races of accesses to connection list array
Like the previous fixes for cache hash accesses, a protection over
accesses to the widget connection list array must be provided.
Together with this action, remove snd_hda_get_conn_list() which can be
always race, and replace it with either snd_hda_get_num_conns() or
snd_hda_get_connections() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-19 17:25:23 +02:00
Dan Carpenter 6091106297 ALSA: hda - unlock on error in azx_interrupt()
There is an spin_unlock() missing on this error path.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-18 15:44:10 +02:00
Takashi Iwai c882246d84 ALSA: hda/idt - Cache the power-map bits
For avoiding unnecessary codec read/write verbs at each jack detection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15 09:12:12 +02:00
Takashi Iwai bfc89dec97 ALSA: hda/idt - Clean up power-map check code
Turn off the power-map for unused ports and check the jack-detection
capability in the first place.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15 09:02:26 +02:00
Takashi Iwai f153c6af87 Merge branch 'fix/hda' into topic/hda 2012-05-15 08:58:49 +02:00
Takashi Iwai 7560931fbd ALSA: hda - Evaluate gpio_led hints at the right moment
The hints regarding the mute-LED must be evaluated during the codec
parsing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15 08:58:38 +02:00
Jaroslav Kysela f3af90517d ALSA: hda - add probe_mask=0x101 automatically for WinFast VP200 H
This patch just sets the codec probe_mask=0x101 value for the WinFast VP200 H
PCoIP card based on Teradici hardware matching the PCI subsystem vendor/device
IDs 3a21:040d. The user reported no codec detection issues without this
explicit codec configuration.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15 08:34:48 +02:00
Takashi Iwai b0791dda81 ALSA: hda/idt - Fix power-map for speaker-pins with some HP laptops
BIOS on some HP laptops don't set the speaker-pins as fixed but expose
as jacks, and this confuses the driver as if these pins are
jack-detectable.  As a result, the machine doesn't get sounds from
speakers because the driver prepares the power-map update via jack
unsol events which never come up in reality.  The bug was introduced
in some time in 3.2 for enabling the power-mapping feature.

This patch fixes the problem by replacing the check of the persistent
power-map bits with a proper is_jack_detectable() call.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43240

Cc: <stable@vger.kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15 08:14:36 +02:00
Takashi Iwai a82d51ed24 ALSA: hda - Support VGA-switcheroo
Add the support for VGA-switcheroo in the HD-audio controller side.
When the graphics controller is disabled, the HD-audio driver also delays
the initialization until it's activated by VGA-switcheroo.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43155

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-14 14:55:18 +02:00
Takashi Iwai d3d020bd11 ALSA: hda - Export snd_hda_lock_devices()
It's a preliminary work for the vga-switcher support.
Export the function to do pseudo-lock for the sound card to be used
in other places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-14 14:54:56 +02:00
Takashi Iwai 9121947d69 ALSA: hda - Check the dead HDMI audio controller by vga-switcheroo
When a discrete-GPU is disabled by the VGA switcheroo, the
corresponding HD-audio controller for HDMI output is also disabled.
Such a dead controller still appears in the PCI device list, but you
can't access properly any longer (even calling pci_read_config_*()
triggers Oops!) which leads the stall of the whole communication of
the driver.

This patch adds a check of graphics controller at the probe time to
see whether it's disabled by vga-switcheroo.  If disabled, skip the
whole initialization of this controller.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43155

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-14 14:49:17 +02:00
Takashi Iwai 8c7dd89076 ALSA: hda - Disable FLOAT format support
It turned out that the FLOAT format on CS4206 results in simple
noises, which implies that this is no right format as is.
Since CS4206 is the only codec supporting the float, let's disable it
until we find the correct format.

Reported-and-tested-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-12 09:38:05 +02:00
Takashi Iwai 2d825fd82e ALSA: hda/conexant - Correct vendor IDs for new codecs
Never trust datasheet...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-12 09:36:44 +02:00
Takashi Iwai c3b6bcc292 ALSA: hda - Fix concurrent hash accesses
The amp and caps hashes aren't protected properly for concurrent
accesses.  Protect them via a new mutex now.

But it can't be so simple as originally thought: since the update of a
hash table entry itself might trigger the power-up sequence which
again accesses the hash table, we can't cover the whole function
simply via mutex.  Thus the update part has to be split from the mutex
and revalidated.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-10 16:12:13 +02:00
Takashi Iwai e3245cddcf ALSA: hda - Protect SPDIF-related stuff via spdif_mutex
Add the missing mutex protection or move into the protected part for
SPDIF access codes for codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-10 14:56:15 +02:00
Takashi Iwai 61d648fb47 ALSA: hda - Add Conexant CX20751/2/3/4 codec support
These are almost compatible with the older Conexant codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-10 08:55:05 +02:00
Takashi Iwai 5ae763b1bc ALSA: hda - Add the support for Creative SoundCore3D
The controller is compatible with HD-audio 1.0a with some specific
restrictions.
- The BDLE entries can't be over 4k boundary
- No position-buffer and no MSI

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-10 08:53:34 +02:00
Takashi Iwai a2d96e778d ALSA: hda - More robustify the power-up/down sequence
Check the power_transition up/down state instead of boolean bit, so
that the power-up sequence can cancel the pending power-down work
properly.  Also, by moving cancel_delayed_work_sync() before the
actual power-up sequence, make sure that the delayed power-down is
completed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-09 12:36:22 +02:00
Takashi Iwai 607d4f7f05 ALSA: hda - Remove pre_resume and post_suspend ops
Since the recent commit, the resume procedure is always performed at
the resume time.  This makes the pre_resume hack for VREF mute LED on
some HP laptops superfluous.  As this is the only user of pre_resume
(and there is no user of post_suspend) ops, let's kill them again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-09 10:32:35 +02:00
David Henningsson 32cf4023e6 ALSA: HDA: Lessen CPU usage when waiting for chip to respond
When an IRQ for some reason gets lost, we wait up to a second using
udelay, which is CPU intensive. This patch improves the situation by
waiting about 30 ms in the CPU intensive mode, then stepping down to
using msleep(2) instead. In essence, we trade some granularity in
exchange for less CPU consumption when the waiting time is a bit longer.

As a result, PulseAudio should no longer be killed by the kernel
for taking up to much RT-prio CPU time. At least not for *this* reason.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Tested-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-09 10:22:06 +02:00
Takashi Iwai 128bc4ba8c ALSA: hda - Move BIOS pin-parser code to hda_auto_parser.c
Just code shuffles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08 18:01:33 +02:00
Takashi Iwai 23d30f2827 ALSA: hda - Move up the fixup helper functions to the library module
Move the fixup helper functions in patch_realtek.c to hda_auto_parser.c
so that they can be used in other codec drivers like patch_conexant.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08 18:01:33 +02:00
Takashi Iwai 5536c6d693 ALSA: hda - Protect the power-saving count with spinlock
To avoid some races.  Still not perfect, but now a bit safer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08 18:01:30 +02:00
Takashi Iwai 339876d70a ALSA: hda - Clear the power-saving states properly at reset
Some power-saving states have been left unchanged in
snd_hda_codec_reset(), and this is a potential danger because the
function may be called in various situations including the continuous
operation after that call.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08 18:01:01 +02:00
Takashi Iwai 7f30830b7b ALSA: hda - Always resume the codec immediately
This is a fix for the problem in commit 785f857d1c, the pop noise
issue on some machines with ALC269.  The problem was the uninitialized
state after the resume due to the delayed resume of the codec chips.
In that commit, we tried to fix by forcibly putting the codec to D3 at
suspend.  But, this still also leaves the uninitialized state after
resume, and it _might_ be still problematic with some BIOS.  Since the
commit turned out to regress another issues, we reverted it in the
end.

Now, in this fix, try to fix by turning on the codec immediately at
the resume path.  We need to take care of the power-saving in this
case.  When the device is woken up at the power-saved state, it should
go power-saving again after the resume.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08 18:00:47 +02:00
Takashi Iwai c382a9f009 ALSA: hda - Fix possible access to uninitialized work struct
The work struct must be initialized before the possible call in the
destructor.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08 16:39:57 +02:00
Takashi Iwai 3de9517356 ALSA: hda/realtek - Call a common helper for alc_spec initialization
Just a clean up by calling the same helper function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08 16:38:14 +02:00
Takashi Iwai ffd344444f Merge branch 'fix/hda' into topic/hda 2012-05-08 16:38:02 +02:00
Takashi Iwai 619a341b78 Revert "ALSA: hda - Set codec to D3 forcibly even if not used"
This reverts commit 785f857d1c.

The commit causes a problem with the wrong D3 state after suspend
because the call of hda_set_power_state() involves with the power-up
sequence, which changes the power_count, and this confuses the resume
sequence that checks the power_count as well.

Originally, this go-to-D3 sequence should be a simple task without the
power-up sequence.  But, it'd need some proper sanity checks in the
case of power-saved state, so it's not too easy to write now in the
3.4-rc cycle.

In short, the safest option now is to revert this affecting commit.

Of course, we need to clean up and robustify the power-saving code
better for 3.5 kernel.

Reported-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08 16:35:42 +02:00
Takashi Iwai af741c150f ALSA: hda/realtek - Call alc_auto_parse_customize_define() always after fixup
The call for alc_auto_parse_customize_define() must be done after the
fixup pre-probe initialization.  Otherwise SKU_IGNORE fixup won't work
properly (e.g. HP RP5800 with ALC662 codec).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08 14:10:31 +02:00
Takashi Iwai bca4013855 ALSA: hda/realtek - Add missing CD-input pin for MSI-7350 mobo
Reported-by: Philipp Matthias Hahn <pmhahn@pmhahn.de>
Cc: <stable@kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-07 11:14:53 +02:00
Takashi Iwai f5c53d898c ALSA: hda/realtek - Add a fixup for Acer Aspire 5739G
Acer Aspire 5739G requires the same fix-up for 4930G to support the
surround / bass speakers.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43180

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-07 10:07:33 +02:00
Takashi Iwai e9f66d9b9c ALSA: pci: clean up using module_pci_driver()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-24 12:25:00 +02:00
Takashi Iwai 6942c103fb ALSA: hda - Skip pin capability sanity check for bogus values
Some old codecs like ALC880 seem to give a bogus pin capability value 0
occasionally.  This breaks the new sanity check in snd_hda_set_pin_ctl().
Skip the sanity checks in such a case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20 13:08:40 +02:00
Takashi Iwai 4740860b53 ALSA: hda - Add snd_hda_get_default_vref() helper function
Add a new helper function to guess the default VREF pin control bits
for mic in.  This can be used to set the pin control value safely
matching with the actual pin capabilities.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20 13:06:53 +02:00
Takashi Iwai cdd03cedc5 ALSA: hda - Introduce snd_hda_set_pin_ctl*() helper functions
For setting the pin-control values more safely to match with the
actual pin capability bits, a copule of new helper functions,
snd_hda_set_pin_ctl() and snd_hda_set_pin_ctl_cache(), are
introduced.  These are simple replacement of the codec verb write with
AC_VERB_SET_PIN_WIDGET but do more sanity checks and filter out
superfluous pin-control bits if they don't fit with the corresponding
pin capabilities.

Some codecs are screwed up or ignore the command when such a wrong bit
is set.  These helpers will avoid such secret errors.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20 12:38:48 +02:00
David Henningsson 5ac57550f2 ALSA: HDA: Add external mic quirk for Asus Zenbook UX31E
According to the reporter, external mic starts to work if the
laptop-dmic model is used. According to BIOS pin config, all
pins are consistent with the alc269vb_laptop_dmic fixup, except
for the external mic, which is not present.

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/950490
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20 10:08:08 +02:00
Takashi Iwai d398011057 Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_conexant.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-19 17:20:13 +02:00
Takashi Iwai c817eebec5 Merge branch 'fix/cxt-stable' into fix/hda
Merge fixes for Thinkpad docking-station regressions for 3.3 kernels
back to 3.4.  These were committed in that branch to make the stable
merging easier.

Conflicts:
	sound/pci/hda/patch_conexant.c
2012-04-19 17:13:03 +02:00
Takashi Iwai d70f363222 ALSA: hda/conexant - Set up the missing docking-station pins
ThinkPad 410,420,510,520 and X201 with cx50585 & co chips have the
docking-station ports, but BIOS doesn't initialize for these pins.
Thus, like the former X200, we need to set up the pins manually in the
driver.

The odd part is that the same PCI SSID is used for X200 and T400, thus
we need to prepare individual fixup tables for cx5051 and others.

Bugzilla entries:
	https://bugzilla.redhat.com/show_bug.cgi?id=808559
	https://bugzilla.redhat.com/show_bug.cgi?id=806217
	https://bugzilla.redhat.com/show_bug.cgi?id=810697

Reported-by: Josh Boyer <jwboyer@redhat.com>
Reported-by: Jens Taprogge <jens.taprogge@taprogge.org>
Tested-by: Jens Taprogge <jens.taprogge@taprogge.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-19 17:10:34 +02:00
Takashi Iwai ca3649de02 ALSA: hda/conexant - Don't set HP pin-control bit unconditionally
Some output pins on Conexant chips have no HP control bit, but the
auto-parser initializes these pins unconditionally with PIN_HP.

Check the pin-capability and avoid the HP bit if not supported.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-19 15:15:25 +02:00
Takashi Iwai 3e843196c6 ALSA: hda/sigmatel - Fix inverted mute LED
While refactoring the mute-LED handling for HP laptops, I messed up
the polarity check in a wrong way.  The red (or the mute-LED if any)
should appear in the muted state, corresponding to GPIO on.

Reported-by: Mikko Vinni <mmvinni@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-19 12:04:03 +02:00
Takashi Iwai 118cb4a408 ALSA: hda/realtek - Fix regression on Quanta/Gericom KN1
Through the transition to the auto-parser, the support for
Quanta/Gericom KN1 got broken.  There are two problems behind it:

- This machine doesn't like the default COEF setup for ALC260 we take
  now as default

- BIOS doesn't set the pins correctly at all; especially the machine
  uses only the pin 0x0f for both headphone and speaker

This patch adds the fixup as a workaround for these issues.

Reported-and-tested-by: Uros Vampl <mobile.leecher@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-19 07:33:27 +02:00
Jesper Juhl 7d7eb9ea31 ALSA: hda/realtek - Fix mem leak (and rid us of trailing whitespace).
In sound/pci/hda/patch_realtek.c::alc_auto_fill_dac_nids(), in the
'for (;;)' loop, if the 'badness' value returned from
fill_and_eval_dacs() is negative, then we'll return from the function
without freeing the memory we allocated for 'best_cfg', thus leaking.
Fix the leak by kfree()'ing the memory when badness is negative.

While I was there I also noticed some trailing whitespace in the
function that I removed (along with all other trailing whitespace in
the file) - it didn't seem worth-while to do that as two patches, so I
hope it's OK that I just did it all as one patch.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-13 07:35:57 +02:00
Josh Boyer 29ebe40284 ALSA: hda/realtek - Add quirk for Mac Pro 5,1 machines
A user reported that setting model=imac24 used to allow sound to work on their
Mac Pro 5,1 machine.  Commit 5671087ffa "Move ALC885 macpro and imac24 models
to auto-parser" removed this model option.  All Mac machines are now explicitly
handled with a quirk and the auto-parser.  This adds a quirk for the device
found on the Mac Pro 5,1 machines.

This (partially) fixes https://bugzilla.redhat.com/show_bug.cgi?id=808559

[sorted the new entry in the ID number order by tiwai]

Reported-by: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-12 20:00:48 +02:00
Takashi Iwai fe97da1f70 ALSA: hda/realtek - Add a fixup entry for Acer Aspire 8940G
It's compatible with 8930G.
Using the same fixup gives the proper 5.1 sound back.

Reported-and-tested-by: Dany Martineau <dany.luc.martineau@gmail.com>
Cc: <stable@kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-12 19:57:18 +02:00
Takashi Iwai 038d4fef37 ALSA: hda/realtek - Fix GPIO1 setup for Acer Aspire 4930 & co
Add GPIO1 setup explicitly for Acer Aspire 493x & co.
This could be set by alc_auto_init_amp(), but it's safer to set it
more explicitly in the fixup table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-12 07:58:19 +02:00
Takashi Iwai 912093bc7c ALSA: hda/realtek - Add a few ALC882 model strings back
Since there are still many Acer models that might not be covered by
the current fixup table, let's add back a few typical model names so
that user can test the fixup without recompiling.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-11 14:10:57 +02:00
David Henningsson 83b0c6ba99 ALSA: hda - Fix oops caused by recent commit "Fix internal mic for Lenovo Ideapad U300s"
Make sure we don't dereference the "quirk" pointer when it is null.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-10 14:55:01 +02:00
Fengguang Wu fae3d88a5c ALSA: hda - hide HDMI/ELD printks unless snd.debug=2
Also remove two warnings when CONFIG_SND_DEBUG is not set:

sound/pci/hda/patch_hdmi.c: In function ‘hdmi_intrinsic_event’:
sound/pci/hda/patch_hdmi.c:761:6: warning: unused variable ‘eldv’ [-Wunused-variable]
sound/pci/hda/patch_hdmi.c:760:6: warning: unused variable ‘pd’ [-Wunused-variable]

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-10 14:53:55 +02:00
Jiri Kosina e75d660672 Merge branch 'master' into for-next
Merge with latest Linus' tree, as I have incoming patches
that fix code that is newer than current HEAD of for-next.

Conflicts:
	drivers/net/ethernet/realtek/r8169.c
2012-04-08 21:48:52 +02:00
Takashi Iwai c38f62b08d ASoC: fixes for 3.4
A bunch of driver-specific fixes and one generic fix for the new support
 for platform DAPM contexts - we were picking the wrong default for the
 idle_bias_off setting which was meaning we weren't actually achieving
 any useful runtime PM on platform devices.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPftQoAAoJEBus8iNuMP3du4IQAIxcJs4Q6wckpnu8bcFr4+Gr
 UstCaoS7R3BROe1rtZJr6WPzkVGkriYJdRvH66q/PDJ9f97CFMR4b0IwKnHXUbbL
 CVR8dod1I4+0PGF7D08UfHln5uUYO17HaKB5aYPzzcBegA4DZwUtSvnvaBVpg7kK
 JQM5S6G6nb68mroyfSF6XsmCM3ehwgykiqlo1TH9WQQ0Z6KbNatV86mi2W8jxvwB
 xh7EafL1v9MmpDkqEVEseaI6Mr7N/DiaNHzozqW7Na2nVgddRTXzh2dXA8gsr4VW
 vsAoIrACc0zCgmwyYgRN0Dg8k2hqcbERbd/prmgHCYDUQc6n6mUf/AwE+ZZMo0FK
 iCOMMZbESxxWqPNnSz9+H5pgoDLITB8kTOjp1TwGu9xYc0wEkHo+DiG5ZG3pZsCv
 OKfF/FiBL30OlsefT+kKFzn+3Ve9ryJ4NZ7SYg6zWGqLmBidWle3c2yZqAldSavx
 kHjw4I1YAO552fGK7v5Dij/ClUps5dYdiczxqzdIgH0GE0sTfsYQrtfl8nXy5+mf
 cKAljqwM9ONAZ7CbAO6To6MPy9qhCmVLGPFGT7BdXJDyK2YGLGGWQiRITdnULSZd
 AhG8EitOgtgOprMFLEgkcKb6cnHE4/Ry1V8jhYg0+1D+YIuTWhsYeO+mci+zto/r
 0ZnX6E5R/aA8Z56+7xgU
 =EiwZ
 -----END PGP SIGNATURE-----

Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: fixes for 3.4

A bunch of driver-specific fixes and one generic fix for the new support
for platform DAPM contexts - we were picking the wrong default for the
idle_bias_off setting which was meaning we weren't actually achieving
any useful runtime PM on platform devices.
2012-04-07 12:28:00 +02:00
Takashi Iwai 5ff5c3a4ab Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_conexant.c
2012-04-07 12:26:55 +02:00
Michael Karcher 250f32747e ALSA: hda - clean up CX20549 test mixer setup
name pins consistently (MIC1/LINE1/HP-OUT/CD) on all controls
affecting those pins.

remove duplicate SET_AMP_GAIN_MUTE to 0x17/index 0 and 0x17/index 1

really select MIC1, not Mixer out for recording

"Mixer out" for recording is not a "pin", adjust comment

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-07 12:25:56 +02:00
Michael Karcher 51969d62c3 ALSA: hda - CX20549 doesn't need pin_amp_workaround.
CX20549 (ctx5045) doesn't accept data on index 1 for output pins,
as shown in the following hda-var transaction:

  $ hda-verb /dev/snd/hwC0D0 0x10 set_amp_gain 0xb126
  nid = 0x10, verb = 0x300, param = 0xb126
  value = 0x0
  $ hda-verb /dev/snd/hwC0D0 0x10 get_amp_gain 0x8001
  nid = 0x10, verb = 0xb00, param = 0x8001
  value = 0x0

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-07 12:25:47 +02:00
Michael Karcher e6e03daecd ALSA: hda - Remove CD control from model=benq for CX20549
The ID used for detection of the BenQ R55E actually identifies the
Quanta TW3 ODM design, which is also used for the Gigabyte W551 laptop
series. Schematics on the internet clearly indicate that the "Port C"
(analog input connected to record source #4 and mixer input #4) is
unconnected.

Playing an audio CD through analog playback (using cdplay from cdtools)
produces no sound, even with the mixer input labelled "CD" enabled, and
the volume control in the CD drive set to maximum. This indicates the
connection is really not present.

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-07 12:25:40 +02:00
Michael Karcher cbf2d28e83 ALSA: hda - fix record volume controls of CX20459 ("Venice")
The "input converter" widget of the CX20459 has only one input amplifier,
expose that one as "Capture Volume/Capture Switch". The actual record
source selection is already exposed through the separately installed
input mux.

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-07 12:25:34 +02:00
Michael Karcher 3edbbb9ec5 ALSA: hda - Rename capture sources of CX20549 to match common conventions
This includes renaming "Line In" to line, also in the mixer settings.

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-07 12:25:25 +02:00
Michael Karcher 4f32456e5e ALSA: hda - Fix proc output for ADC amp values of CX20549
The CX20549 has only one single input amp on it's input converter
widget. Fix printing of values in the codec file in /proc/asound.

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-07 12:25:02 +02:00
David Henningsson 18dcd3044e ALSA: hda - Fix internal mic for Lenovo Ideapad U300s
The internal mic input is phase inverted on one channel.
To avoid people in userspace summing the channels together
and get zero result, use a separate mixer control for the
inverted channel.

BugLink: https://bugs.launchpad.net/bugs/903853
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-05 17:54:22 +02:00
Linus Torvalds 48a46752a9 sound fixes for 3.4-rc1
A collection of small fixes for 3.4-rc1, including
 - mic-recording regression fix for Realtek codec
 - clean-up of dmaengine parameter mess
 - WM8894 calibration tweak
 - minor fixes for asihpi and some bool module parms
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJPdX6XAAoJEGwxgFQ9KSmkFMcP+wTpqgoQgfcb6IMCY9KVGstd
 Uy2LgocxKSwcIv7a+OTN4WTfCJBjf045jY+coKHRhO0ybMqLIyqqeLzyCShksKdB
 PQ8+T+deIgezkhWuNdr+e+h+v39lRHQOPLiDDzEbToKryGxmx2YVbGh9b/4/oJfK
 U7oXYbMZu1RBm4btUR5jfyfC8dKMPwB0/gRG6662hw/WqkNalQyXnPvJPhl+Ky+J
 fbC2sggPlSwz6IzUdX023B7zuzUexiY3CVqZrFFskMiAEwB4xDIJ+aroQYhRSO+f
 C93EB4f3gQ0zr65n07QFIHICUogLDKdbx9GLUdfrFwoWMeKamd0YZBZNTIUEzrtc
 OkrLU5IDKxB+smjGul0SvJV/EkwYYCIx4dASoCUBORHAtAmEYrbUnHR/ga5c+i0X
 YIB5mvurSCYNZesmSzLeET6F7zS1VHbaK9qopHDrivK/ZMe90Y06D/gWuhNySHOm
 lwo4vepDG5rlDQBxVhHQGI7J1JXHBC8KI/drSROBJKb3XLIt76Qf0nmyTfRyLAqa
 xF3axkB53uiAyK9YXY2hWcOPH2klNCat9y45fQ9Z4o2wU0t74lO2VuQJzsePGWKc
 MP6cGAQ75G86jPPbsOY650AS4Lu4t4ZRDal/5q/Y+c5gLqM6ZoHI7RMmpSVa8uUS
 LTrgwwBT/V87snKMwAKW
 =cW/4
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A collection of small fixes for 3.4-rc1, including
   - mic-recording regression fix for Realtek codec
   - clean-up of dmaengine parameter mess
   - WM8894 calibration tweak
   - minor fixes for asihpi and some bool module parms"

* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: fix isa/opti9xx module param type
  sound: fix oss/msnd_pinnacle module param type
  ALSA: asihpi - fix return type of hpios_locked_mem_alloc()
  ASoC: dmaengine_pcm: use dmaengine cyclic wrapper
  ASoC: Add extra parameter to device_prep_dma_cyclic
  ALSA: hda/realtek - Fix ADC assignment with a shared HP/Mic pin
  ASoC: wm8994: Update WM8994 DCS calibration
2012-03-30 10:59:52 -07:00
Jonathan Woithe 409a3e9813 Email/web address change
This patch updates Jonathan Woithe's contact details across the kernel tree.

Signed-off-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-03-28 10:35:15 +02:00
Linus Torvalds b2094ef840 Updates of sound stuff for 3.4-rc1
Here is the first big update chunk of sound stuff for 3.4-rc1.
 
 In the common sound infrastructure, there are a few changes for
 dynamic PCM support (used in ASoC) and a few clean-ups.  Majority of
 changes are found, as usual, in HD-audio and ASoC.
 
 Some highlights of HD-audio changes:
 - All the long-standing static quirk codes for Realtek codec were
 finally removed by fixing and extending the Realtek auto-parser.
 
 - The mute-LED control is standardized over all HD-audio codec
   drivers using the extended vmaster hook.
 
 - The vmaster slave mixer elements are initialized to 0dB as default
   so that the user won't be annoyed by the silent output after
   updates, e.g. due to the additions of new elements.
 
 - Other many fix-ups for the misc HD-audio devices.
 
 In the ASoC side, this is a very active release, including a quite a
 few framework enhancements.  Some highlights:
 
 - Support for widgets not associated with a CODEC, an important part
   of the dynamic PCM framework.
 
 - A library factoring out the common code shared by dmaengine based
   DMA drivers contributed by Lars-Peter Clausen.  This will save a lot
   of code and make it much easier to deploy enhancements to
   dmaengine.
 
 - Support for binary controls, used for providing runtime
   configuration of algorithm coefficients.
 
 - A new DAPM widget type for regulator supplies allowing drivers for
   devices that can power down unused supplies while active to do
   without any per-driver code.
 
 - DAPM widgets for DAIs, initially giving a speed boost for playback
   startup and shutdown and also the basis for CODEC<->CODEC DAI link
   support.
 
 - Support for specifying the number of significant bits on audio
   interfaces, useful for allowing applications to know how much effort
   to put into generating data for a larger sample format.
 
 - Conversion of the FSI driver used on some SH processors to
   DMAEngine.
 
 - Conversion of EP93xx drivers to DMAEngine.
 
 - New CODEC drivers for Maxim MAX9768 and Wolfson Microelectronics
   WM2200.
 
 - Move audmux driver from arc/arm to sound/soc
 
 - McBSP move from arch/ to sound/ and updates
 
 Also, a few small updates and fixes for other drivers like au88x0,
 ymfpci, USB 6fire, USB usx2yaudio are included.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJPawmuAAoJEGwxgFQ9KSmkdR0QALDDI/eUo4il40C33Gt/OSDz
 Wkz+FOwp2ddbIqHc0n41sV7+FV1MuyzQ37uSw8zhK724Vd4tCqX6O5K1uvS1iSbh
 jxHsy5XtfvCs2cjb61H6N+rfWcqC69gGhpc1mLoelj/PYl7S2iV5xOgTr4trVk2Y
 UN7Y13b4hzZvubRUozoTldaIgdhrj8D8KO7qQNYehyG19b4bJ00Rk4K5JdjsFwbE
 dTGl/ZUv50Fnx6PAWwqzh1a3cPabHA1TZDiKQM2nuE91e/Ecs4c7t1CRvW8m8mlr
 u4D4N8PJcCN4SPDd2YuVBgan4SQ0kxKTaup11bHSvAWai2zPX5xMB1yoJNxgjSMt
 5NHrGdR4+lQEVlBVXe2sWb4/3vE2kr2dtcGGR/FBFJTuLWDFFtRcnxeQJI8qRNUw
 UdwDuGXdActoc1cZz2dsKvXMOs0TKT6OCdQH+dHBglW/W8wMkVocZclUgbQM66/X
 gwvk0jfZ9p3UcKnYt3RkxiXQvAJsr8v0HhYcKvQCFhJArZufdeRHB7LCVRTm692Y
 /BKZgK4QHxtGw3Yc7emYidKeRSP1ml5QlvC4zMIoGqiahqa8LI8Qcb5knvIEmU8q
 kY5k0fVP+paf0dceAVXyFZsRB9AyX2eUdufDPifXtydQZgj4o9A7Sy/teWl77EgF
 Mafq4QUzo1U4i8JpAM4d
 =5FJq
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull updates of sound stuff from Takashi Iwai:
 "Here is the first big update chunk of sound stuff for 3.4-rc1.

  In the common sound infrastructure, there are a few changes for
  dynamic PCM support (used in ASoC) and a few clean-ups.  Majority of
  changes are found, as usual, in HD-audio and ASoC.

  Some highlights of HD-audio changes:

   - All the long-standing static quirk codes for Realtek codec were
     finally removed by fixing and extending the Realtek auto-parser.

   - The mute-LED control is standardized over all HD-audio codec
     drivers using the extended vmaster hook.

   - The vmaster slave mixer elements are initialized to 0dB as default
     so that the user won't be annoyed by the silent output after
     updates, e.g.  due to the additions of new elements.

   - Other many fix-ups for the misc HD-audio devices.

  In the ASoC side, this is a very active release, including a quite a
  few framework enhancements.  Some highlights:

   - Support for widgets not associated with a CODEC, an important part
     of the dynamic PCM framework.

   - A library factoring out the common code shared by dmaengine based
     DMA drivers contributed by Lars-Peter Clausen.  This will save a
     lot of code and make it much easier to deploy enhancements to
     dmaengine.

   - Support for binary controls, used for providing runtime
     configuration of algorithm coefficients.

   - A new DAPM widget type for regulator supplies allowing drivers for
     devices that can power down unused supplies while active to do
     without any per-driver code.

   - DAPM widgets for DAIs, initially giving a speed boost for playback
     startup and shutdown and also the basis for CODEC<->CODEC DAI link
     support.

   - Support for specifying the number of significant bits on audio
     interfaces, useful for allowing applications to know how much
     effort to put into generating data for a larger sample format.

   - Conversion of the FSI driver used on some SH processors to
     DMAEngine.

   - Conversion of EP93xx drivers to DMAEngine.

   - New CODEC drivers for Maxim MAX9768 and Wolfson Microelectronics
     WM2200.

   - Move audmux driver from arc/arm to sound/soc

   - McBSP move from arch/ to sound/ and updates

  Also, a few small updates and fixes for other drivers like au88x0,
  ymfpci, USB 6fire, USB usx2yaudio are included."

* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (446 commits)
  ASoC: wm8994: Provide VMID mode control and fix default sequence
  ASoC: wm8994: Add missing break in resume
  ASoC: wm_hubs: Don't actively manage LINEOUT_VMID_BUF
  ASoC: pxa-ssp: atomically set stream active masks
  ASoC: fsl: p1022ds: tell the WM8776 codec driver that it's the master
  ASoC: Samsung: Added to support mono recording
  ALSA: hda - Fix build with CONFIG_PM=n
  ALSA: au88x0 - Avoid possible Oops at unbinding
  ALSA: usb-audio - Fix build error by consitification of rate list
  ASoC: core: Fix obscure leak of runtime array
  ALSA: pcm - Avoid GFP_ATOMIC in snd_pcm_link()
  ALSA: pcm: Constify the list in snd_pcm_hw_constraint_list
  ASoC: wm8996: Add 44.1kHz support
  ALSA: hda - Fix build of patch_sigmatel.c without CONFIG_SND_HDA_POWER_SAVE
  ASoC: mx27vis-aic32x4: Convert it to platform driver
  ALSA: hda - fix printing of high HDMI sample rates
  ALSA: ymfpci - Fix legacy registers on S3/S4 resume
  ALSA: control - Fixe a trailing white space error
  ALSA: hda - Add expose_enum_ctl flag to snd_hda_add_vmaster_hook()
  ALSA: hda - Add "Mute-LED Mode" enum control
  ...
2012-03-22 13:00:13 -07:00
Takashi Iwai 26acaf0855 ALSA: hda/realtek - Fix ADC assignment with a shared HP/Mic pin
The recent Realtek driver tries to assign an extra input via the
headphone plug when only a single input source is found.  The code
worked on Samsung Q1, but it broke ASUS 1015 where the mic is a
digital-mic and only a specific ADC works.

This patch fixes the assignment of ADC in the shared mic/hp case.
Instead of assuming the single ADC at first, reduce the ADCs after
trying to assign both mic and HP pins.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42973

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-22 15:15:51 +01:00
Linus Torvalds 69a7aebcf0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree from Jiri Kosina:
 "It's indeed trivial -- mostly documentation updates and a bunch of
  typo fixes from Masanari.

  There are also several linux/version.h include removals from Jesper."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits)
  kcore: fix spelling in read_kcore() comment
  constify struct pci_dev * in obvious cases
  Revert "char: Fix typo in viotape.c"
  init: fix wording error in mm_init comment
  usb: gadget: Kconfig: fix typo for 'different'
  Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c"
  writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header
  writeback: fix typo in the writeback_control comment
  Documentation: Fix multiple typo in Documentation
  tpm_tis: fix tis_lock with respect to RCU
  Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c"
  Doc: Update numastat.txt
  qla4xxx: Add missing spaces to error messages
  compiler.h: Fix typo
  security: struct security_operations kerneldoc fix
  Documentation: broken URL in libata.tmpl
  Documentation: broken URL in filesystems.tmpl
  mtd: simplify return logic in do_map_probe()
  mm: fix comment typo of truncate_inode_pages_range
  power: bq27x00: Fix typos in comment
  ...
2012-03-20 21:12:50 -07:00
Takashi Iwai dbf117cbb9 Merge branch 'topic/hda' into for-linus 2012-03-18 18:22:30 +01:00
Takashi Iwai 350eba43fc ALSA: hda - Fix build with CONFIG_PM=n
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-16 16:15:33 +01:00
Takashi Iwai 7907ae3e50 ALSA: hda - Fix build of patch_sigmatel.c without CONFIG_SND_HDA_POWER_SAVE
Now the mute-LED is controlled without powersave hack, and the ifdefs must
be removed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-14 08:20:20 +01:00
Anssi Hannula 25dc16f698 ALSA: hda - fix printing of high HDMI sample rates
A previous commit af65cbf296 (ALSA: hdmi: fix printout of SAD sampling
rates) fixed the sample rates shown in /proc/asound/cardX/eldY and
kernel log to not be entirely wrong. However, a missing rate from the
array added in the patch causes HDMI rates 88.2 kHz, 96 kHz, 176.4 kHz,
and 192 kHz to be shown as 96 kHz, 176.4 kHz, 192 kHz, and 384 kHz,
respectively.

Fix the reporting by adding the ALSA rate 64 kHz into the conversion
array between 48 kHz and 88.2 kHz.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-13 18:27:09 +01:00
Takashi Iwai f29735cbef ALSA: hda - Add expose_enum_ctl flag to snd_hda_add_vmaster_hook()
Since it's not always safe to assume that the vmaster hook is purely the
mute-LED control, add the flag indicating whether to expose the mute-LED
enum control or not.  Currently, conexant codec sets this off for non-HP
laptops where EAPD may be used really as EAPD.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-13 07:55:10 +01:00
Takashi Iwai d2f344b5e0 ALSA: hda - Add "Mute-LED Mode" enum control
Create snd_hda_add_vmaster_hook() and snd_hda_sync_vmaster_hook()
helper functions to handle the mute-LED in vmaster hook more
commonly.  In the former function, a new enum control "Mute-LED Mode"
is added.  This provides user to choose whether the mute-LED should be
turned on/off explicitly or to follow the master-mute status.

Reviewed-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-13 07:46:50 +01:00
Takashi Iwai 527c73bada ALSA: hda - Add EAPD control to Conexnat auto-parser
Added the vmaster hook for controlling EAPD dynamically to Conexant
auto-parser.  When the Master is muted, EAPDs are turned off as well.
This will fix the missing mute-LED control on some machines in
addition to the more power-saving in the auto-parser mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-12 14:52:43 +01:00
Takashi Iwai 420b0febe5 ALSA: hda - Rewrite the mute-LED control with vmaster hook for ALC269
We've had ugly static handling of the mute-LED with a powersave hook
for ALC269 HP laptops just like done in patch_sigmatel.c.  This is now
rewritten with the new vmaster hook and a fixup code.

For that, the new fixup action, ALC_FIXUP_ACT_BUILD, is introduced.
It's called after build_controls is called.  The reason of this new
action is that vmaster hook must be added at this stage (not in init
or probe).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-12 14:52:43 +01:00
Takashi Iwai 2faa3bf15b ALSA: hda - Rewrite the mute-LED hook with vmaster hook in patch_sigmatel.c
The mute-LED is controlled in patch_sigmatel.c by (ab-)using the
powersave hook.  This can be now rewritten with the vmaster hook
instead, which is much simpler and can work even without
CONFIG_SND_HDA_POWER_SAVE kconfig.

A drawback is that the mute-LED corresponds _only_ to the Master mixer
switch instead of checking the whole DACs.  But usually this shouldn't
be a big problem as PA enables the mixer elements accordingly.

Also, this patch changes the code to create vmaster always even on
STAC9200 and STAC925x.  The former "Master" on these chips are renamed
as "PCM" now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-12 14:52:42 +01:00
Takashi Iwai 29e5853d61 ALSA: hda - Return the created kcontrol in __snd_hda_add_vmaster()
It'll be used for adding hooks in later patches.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-12 14:52:28 +01:00
Takashi Iwai 18478e8b62 ALSA: hda - Initialize vmaster slave volumes
When the driver is changed to use vmaster or a new slave element is
added by the improvement of the parser code, user may face often the
silent output because of the muted slave mixer although Master volume
is properly set.  And they complain.  And I get upset.

Although such a mixer element should be initialized via "alsactl init",
it'd be more user-friendly if the known output slaves are unmuted and
set to 0dB so that user can control the volume only with Master as
default.  Since Master is still set muted as default even with this
change, no risk of the speaker blow up, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-09 17:55:30 +01:00
Takashi Iwai 785f857d1c ALSA: hda - Set codec to D3 forcibly even if not used
We've seen a problem with a pop-noise at suspend/resume on a HP
machine with ALC269, and it turned out to be an issue that the
controller going to D3 while the codec is unused.

When the device is once suspended and resumed and kept unused, the
driver doesn't initialize the codecs.  Instead, the codec chips are
set up dynamically at the first usage.  Now, suppose the device going
to suspend again before the codec is set up.  The controller is turned
off to D3 while the codec chips are untouched.  This caused a pop
noise because the codec chip might have been turned on implicitly by
the hardware.

As a workaround, the codec chip needs to be set to D3 when going to
suspend no matter whether it was used or not.  Also, for making it
happening, the controller has to be always set up in the resume path.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-07 11:52:50 +01:00
Takashi Iwai 546bb67852 ALSA: hda/realtek - Reuse init_hook for ALC269VB coef setup
Move the currently unused spec->init_hook at the beginning of the init
sequence so that the recently added ALC269VB coef setup can be put
there.  The alc_init() is again clean without an ugly check.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-07 09:07:04 +01:00
Takashi Iwai fc7a1627c1 Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_realtek.c
2012-03-07 09:05:15 +01:00
Kailang Yang 526af6eb4d ALSA: hda/realtek - Apply the coef-setup only to ALC269VB
The coef setup in alc269_fill_coef() was designed only for ALC269VB
model, and this has some bad effects for other ALC269 variants, such
as turning off the external mic input.  Apply it only to ALC269VB.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-07 09:03:29 +01:00
Takashi Iwai 78f8baf138 ALSA: hda - Add Gigabyte GA-MA790X to the beep whitelist
Its BIOS suppresses the PC beep although it's implemented.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-06 14:02:32 +01:00
Marton Balint 8f23921423 ALSA: hda - add quirk to detect CD input on Gigabyte EP45-DS3
My CD input got lost in commit 68ef0561ef.
Raymond helped me to add the necessary pin fixup to make it appear again. In
fact, this is basically his patch. It fixes alsa bug #5541.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-06 10:44:01 +01:00
David Henningsson e21af48583 ALSA: hda - fix broken automute/autoswitch for Realtek
The recent addition of volume-knob widget in the auto-parser broke
automute/autoswitch for some Realtek devices.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-05 15:15:40 +01:00
Takashi Iwai 7c589750a7 Merge branch 'fix/hda' into topic/hda
Speaker-Out renames are merged.

Conflicts:
	sound/pci/hda/patch_realtek.c
2012-03-02 09:00:33 +01:00
Takashi Iwai e49a3434f1 ALSA: hda - Kill hyphenated names
Kill hyphens from "Line-Out" name strings, as suggested by Mark Brown.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-02 08:59:23 +01:00
Takashi Iwai 07cafff288 ALSA: hda/conexant - Clear unsol events on unused pins
It seems that Lenovo machines (or codec chip itself?) leave the unsol
event tags and the enablement-flag from other pins bogusly even on the
unused pins.  Although this shouldn't be too critical, it's better to
clear them up sanely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-29 17:38:51 +01:00
Takashi Iwai 3868137ea4 ALSA: hda - Add a fake mute feature
Some codecs don't supply the mute amp-capabilities although the lowest
volume gives the mute.  It'd be handy if the parser provides the mute
mixers in such a case.

This patch adds an extension amp-cap bit (which is used only in the
driver) to represent the min volume = mute state.  Also modified the
amp cache code to support the fake mute feature when this bit is set
but the real mute bit is unset.

In addition, conexant cx5051 parser uses this new feature to implement
the missing mute controls.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42825

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-29 17:32:38 +01:00
Takashi Iwai 7bff172a35 ALSA: hda - Always set HP pin in unsol handler for STAC/IDT codecs
A bug report with an old Sony laptop showed that we can't rely on BIOS
setting the pins of headphones but the driver should set always by
itself.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-29 09:41:39 +01:00
Takashi Iwai 3e93f5efaf ALSA: hda - Enable docking-station SPDIF for Thinkpad
The docking-station of Thinkpad X200 & co supports also an SPDIF output,
and the corresponding pin 0x1c has to be enabled for using it.

Reported-and-tested-by: Sebastian Glita <sebastian.glita@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-28 21:49:55 +01:00
Takashi Iwai a6f2fd557f ALSA: hda - Add position_fix=4 (COMBO) option
This patch adds a new position_fix option value, 4, as a combo mode
to use LPIB for playbacks and POSBUF for captures.  It's the way
recommended by Intel hardware guys.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-28 12:18:15 +01:00
Vitaliy Kulikov 5556e14708 ALSA: hda - Fix audio playback support on HP Zephyr system
Enables port E of IDT 92HD91 codec as output and sets correct output
phase between ports E and D and high pass filter.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-28 07:29:40 +01:00
Takashi Iwai 068b939431 ALSA: hda/realtek - Fix resume of multiple input sources
When there are multiple input sources, the driver wrongly overwrites with
the value of the last input source on other slots at resume.  Thus the
primary input source may be shown wrongly.

Reported-and-tested-by: Julian Sikorski <belegdol@gmail.com>
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-25 11:13:16 +01:00
Wu Fengguang 6edc59e602 ALSA: hda - add id for Atom Cedar Trail HDMI codec
[the order sorted by tiwai]

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-23 09:50:10 +01:00
Takashi Iwai 77e314f722 ALSA: hda/via - Add a few sanity checks
Added sanity checks in a few places not to assume the pins having the
certain amp caps or the input-source being always assigned to a mux.

No actual bugs have been triggered by these, but surely better to be a
bit more robust.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-22 12:36:06 +01:00
Takashi Iwai 8d8bbc6f17 ALSA: hda/via - Don't create duplicated boost controls
The driver may create duplicated mic boost controls when there are
multiple mics with the very same type / location, and this leads to
the error at actual kcontrol creation.  It needs to check the validity
of the created control and add a proper index if it's duplicated.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-22 12:28:44 +01:00
Takashi Iwai 070cff4cfd ALSA: hda/realtek - Small code cleanups
A few clean-ups for post-static-quirk time:
- Call alc_auto_init_std() statically in alc_init() instead of setting
  spec->init_hook in each caller.  spec->init_hook field is left
  unused for any future use.

- Move the call of set_capture_mixer() to to alc_parse_auto_config()
  instead of each caller.

- Get rid of the ADC-filling and imux check in each parser function.
  This is no longer needed since the auto-parser always check ADCs and
  imux.  It was only for the static quirks.

- Kill unused defines

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21 13:48:35 +01:00
Takashi Iwai f568291ef5 ALSA: hda/realtek - Fix the wrong offset for two-speaker systems
When the machine has two speakers but wants to put more multi-io
jacks, the parser shouldn't consider about the shared DAC but try to
assign the individual DACs.  Otherwise the channel mapping would be
fairly confused and lead to the wrong DACs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21 12:37:00 +01:00
Takashi Iwai 689cabf6d0 ALSA: hda/realtek - Fix the possible conflicts of Bass Speaker name
When the multi-io is added to the two speaker output configuration,
the parser would try to add yet another "Bass Speaker" control since
it checks only cfg->line_outs.  Add a workaround for it by simply
passing the channel name in the case of multi-io outputs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21 12:36:37 +01:00
Takashi Iwai c96f0bf4ad ALSA: hda/realtek - Create individual mute switches for shared DAC
Even if the outputs are using shared DACs, we can still create individual
mute siwtches since they are assigned per pin.  This allows to create,
e.g. Speaker and Bass Speaker mute switches while the single volume is
used for these outputs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21 12:12:57 +01:00
Takashi Iwai 5803a32646 ALSA: hda/realtek - Fix possible Oops with NULL input_mux
When BIOS is damn crazy and gives no pin-config at all, the driver might
lead to a NULL dereference.  Let's add a NULL check for such a case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21 11:59:45 +01:00
Justin P. Mattock a80581d0d1 Typos: change aditional to additional.
The below patch fixes some typos "aditional" to "additional", and also fixes
a comment with another word mispelled.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-02-21 11:40:36 +01:00
Takashi Iwai 164f73ee93 ALSA: hda/realtek - Parse aa-loopback items dynamically
Similarly in patch_via.c, parse the active analog-loopback connections
and create a list dynamically rather than static arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21 11:28:51 +01:00
Takashi Iwai 1a97b7f227 ALSA: hda/realtek - Remove the last static quirks for ALC882
Resitance is futile.  The remaining static model quirks for Apple
machines with ALC882-compatible codecs are converted to the auto-parser
now.  We can remove all alc*_quirks.c finally.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-21 11:11:48 +01:00
Takashi Iwai 9155f82a6a ALSA: hda/realtek - Add model=fixup not to apply fix-ups
If anyone wants to debug the driver and avoid the existing fix-ups,
pass model=nofixup option.  Then the driver will skip to pick up the
fixup list.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20 18:42:04 +01:00
Takashi Iwai 67b6ec3196 ALSA: hda/realtek - Drop all ALC880 static quirks
Finally the all static quirks for ALC880 are converted to the
auto-parser.  Since we are never sure whether the BIOS on so many old
machines are really correct, the quirk table entries are copied as
they are, but just providing the proper pin-config values
accordingly.

Since alc880_quirks.c is removed, alc882_quirks.c has to be adjusted
slightly to be built again.  There might be some compile warnings due
to the remaining alc882 quirks, but these shall be killed sooner or
later, I don't care it much at this point.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20 18:20:42 +01:00
Takashi Iwai 29e3fdcc84 ALSA: hda/realtek - Drop model=asus* from ALC880
It turned out that BIOS on most of ASUS mobo's set the pin-config tables
reasonably well for the auto-parser.  We'd need GPIO setups, but should
work as is other than that.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20 17:56:57 +01:00
Takashi Iwai 411225a01e ALSA: hda/realtek - Rewrite ALC880 model=asus-w1v with auto-parser
ASUS W1V has a sane pin-config table set by BIOS.  The only missing piece
is the setup of GPIO1.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20 17:48:19 +01:00
Takashi Iwai 96e225f692 ALSA: hda/realtek - Rewrite ALC880 model=z71v with auto-parser
ASUS Z71V has a totally broken BIOS setup (at least the info I got),
thus we need to override the whole pin-config table to make the
auto-parser working correctly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20 17:43:00 +01:00
Takashi Iwai 967b88c477 ALSA: hda/realtek - Rewrite ALC880 model=uniwill-dig with auto-parser
ALC880 model=uniwill-dig requires the fix-up of bogus BIOS pin default
configurations.  Other than that, it's pretty normal.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20 17:31:02 +01:00
Takashi Iwai 817de92f1b ALSA: hda/realtek - Rewrite ALC880 model=uniwill with auto-parser
The model=uniwill would work almost as is, but a couple of adjustments
are needed to make the mutli-io working correctly.  The headphone and
speaker pins have to be marked properly in pin configs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20 17:30:49 +01:00
Takashi Iwai 7833c7e8b4 ALSA: hda/realtek - Rewrite ALC880 model=uniwill-p53 with auto-parser
Uniwill p53 has a sane BIOS setup but just needs the volume-knob handling
like Fujitsu laptops with ALC880.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20 17:11:38 +01:00
Takashi Iwai ba5338185d ALSA: hda/realtek - Rewrite ALC880 model=F1734 with auto-parser
Similar as the previous patch for model=fujitsu, we can now move the
static quirk for F1734 to the auto-parser.  The only difference is the
default pin configurations: F1734 has less pins than Amilo's.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20 17:06:04 +01:00
Takashi Iwai cf5a22793c ALSA: hda/realtek - Rewrite ALC880 model=futjisu with auto-parser
Now adding the support for the volume-knob widget, we can move the static
quirk for ALC880 model=fujitsu to the auto-parser completely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20 16:31:07 +01:00
Takashi Iwai 589876e243 ALSA: hda/realtek - Apply probe-fixup really after probing
Move the call of alc_apply_fixup() with ALC_FIXUP_ACT_PROBE after the
whole setups of patch_ops & co, so that the fix-up function may override
the default setup.  This will be needed for installing the own unsol
event handler (e.g. for volume-knob controls).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20 15:50:20 +01:00
Takashi Iwai b9368f5c10 ALSA: hda/realtek - Replace ALC880 model=tcl with auto-parser
It needs a few extra setups for EAPD, but others look fairly
straightforward.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17 17:59:22 +01:00
Takashi Iwai 27e917f82b ALSA: hda/realtek - Drop ALC880 model=clevo
Clevo machines with ALC880 are all well with proper BIOS setup.
It seems still requiring the additional COEF setup for the EAPD.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17 17:59:16 +01:00
Takashi Iwai dc31b58dbc ALSA: hda/realtek - Refactor the DAC filler function
Refactor the DAC filling function to be used for both the primary
line outputs and extra outputs using the individual badness tables.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17 17:59:10 +01:00
Takashi Iwai f02aab5d7f ALSA: hda/realtek - Rewrite ALC880 model=w810 with auto-parser
The Medion W810 with ALC880 has a typical BIOS bug, copying the
pin-defaults without disabling the unused pins.  At least, the pin
0x17 must be disabled.  Also, it requires GPIO-2 setup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17 17:59:00 +01:00
Takashi Iwai dc6af52dea ALSA: hda/realtek - Rewrite ALC880 model=lg with the auto-parser
ALC880 model=lg could work fine with the auto-parser due to the recent
rewrite, but it still needs the manual adjustment; namely, the BIOS leaves
unused pins as some real active jacks.  This confuses the parser.
Thus we just cover these pins and override the pin-configs as a fix-up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17 16:18:59 +01:00
Takashi Iwai 276dd70bae ALSA: hda/realtek - Adjust badness calculation for multi-ios
Try harder to fit the multi-io pins also by checking the hard-wired
connections for multi-ios.  Also, the badness values are adjusted to
prioritize the multi-ios as more valuable.  These changes will enable
the multi-io on some machines without losing the current capability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17 16:17:03 +01:00
Takashi Iwai 6f45304091 ALSA: hda/realtek - Show multi-io pins in debug prints
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17 14:09:20 +01:00
Takashi Iwai ef8d60fb79 ALSA: hda/realtek - Fix surround output regression on Acer Aspire 5935
The previous fix for the speaker on Acer Aspire 59135 introduced
another problem for surround outputs.  It changed the connections on
the line-in/mic pins for limiting the routes, but it left the modified
connections.  Thus wrong connection indices were written when set to
4ch or 6ch mode.

This patch fixes it by restoring the right connections just after
parsing the tree but before the initialization.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42740

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17 10:28:06 +01:00
Takashi Iwai 185d99f192 ALSA: hda/realtek - Try harder to fit the single-connections
So far, the Realtek driver tires to assign the single-connected routes
for all pins only once at the beginning.  However, since some DACs have
been already mapped, the rest pins might have also single conections.

In this patch, the driver does the single-connection assignment in a
loop until all possbile single-connections are checked.  This will
improve the DAC assignment, e.g. for ASUS G72.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16 18:39:45 +01:00
Takashi Iwai 1c4a54b451 ALSA: hda/realtek - Finer tuning of auto-parser with badness evaluation
This patch improves the Realtek auto-parser for assigning the DACs and
mixers in more suitable ways by evaluating the assignment with "badness"
calculations.

When assigning a DAC hinders the assignment of individual DACs for
other pins, some badness point is given.  Similarly, when it blocks the
assignment of unique mixer controls, another badness point is added.
Also, if no DAC, even shared DAC, can be assigned, more badness is
pointed.  Finally, comparing the accumulated badness, the best route is
chosen among several trials.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16 18:08:39 +01:00
Takashi Iwai 140547ef4e ALSA: hda/realtek - Improve the signel-connection check
When the connections from the pin selector contain only two
widgets, a route to DAC and the aa-mixer, it's certainly a
single connection.  In such a case, get_dac_if_single() should
return the connected DAC, too.

This will improve the detection of the individual DAC
assignment for each pin.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16 17:29:24 +01:00
Takashi Iwai 00bc0ce913 Merge branch 'fix/hda' into topic/hda
The fix for bitmap-overflow in Realtek codec driver is needed for the
further development of the auto-parser with badness evaluation.
2012-02-16 16:43:09 +01:00
Takashi Iwai c14c95f62e ALSA: hda/realtek - Fix overflow of vol/sw check bitmap
The bitmap introduced in the commit [527e4d73: ALSA: hda/realtek - Fix
missing volume controls with ALC260] is too narrow for some codecs,
which may have more NIDs than 0x20, thus it may overflow the bitmap
array on them.

Just double the number to cover all and also add a sanity-check code
to be safer.

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16 16:39:14 +01:00
Takashi Iwai a7f3eedc88 ALSA: hda/realtek - Disable static fixups for ASUS with ALC269
We've enabled the static fixups for ASUS machines with ALC269 codec,
just for making things compatible during the transition to the auto-
parser.  However, it seems that the static configurations do more harmful
than good, as some of entries don't match with the actual hardware setups.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16 13:05:22 +01:00
Takashi Iwai c3c2c9e7ff ALSA: hda/realtek - Remove leftover static quirks for ALC260
Now we can clean up all static quirks for ALC260.
Also many codes in alc_quirks.c can be ripped off since they have been
used only by ALC260 static quirks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16 12:59:55 +01:00
Takashi Iwai c29b3f6dd7 ALSA: hda/realtek - Drop model=fujitsu from ALC260 static quirks
The model works with the auto-parser as is, thus now good to drop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16 12:47:36 +01:00
Takashi Iwai b1f58085a9 ALSA: hda/realtek - Drop model=favorit100 for ALC260
It's working with the auto-parser just with the standard GPIO 1 setup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16 12:45:03 +01:00
Takashi Iwai 0a1c4fa208 ALSA: hda/realtek - Add the support for HP Presario B1900
HP Presario B1900 needs a similar hack like Replacer, toggling GPIO1
per the jack state, in addition to the COEF setup used for other Acer
laptops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16 12:42:30 +01:00
Takashi Iwai 20f7d928fa ALSA: hda/realtek - Replace ALC260 model=replacer with the auto-parser
The support for Replacer 627V in the auto-parser needs the unique unsol
event handling: although the machine has a single output pin 0x0f, it's
used for both the headphone and the speaker, and the driver needs to
toggle the output route via GPIO 1.

In addition, it needs a special COEF setup with 0x3050.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16 12:39:35 +01:00
Takashi Iwai 15317ab216 ALSA: hda/realtek - Replace ALC260 model=acer with the auto-parser
The ALC260 model=acer needs GPIO1 setup.  It could be selected well
if the codec SSID is set properly by BIOS, but to make sure, enable it
forcibly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16 12:20:02 +01:00
Takashi Iwai ca8f04247e ALSA: hda/realtek - Add the fixup codes for ALC260 model=will
The model=will for ALC260 requires the pin 0x0f to be a headphone and
some special verbs for the COEF to turn on the amp.  Now added these as
fixup entries and removed the static model quirk.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-16 11:51:19 +01:00
Takashi Iwai a68f20ef80 Merge branch 'fix/acer-alc889-fix' into fix/hda
Conflicts:
	sound/pci/hda/patch_realtek.c

Merged back the fix for Acer Aspire 6935 with ALC889 codec.
The fix commit was based on 3.2 kernel so that it can be applied to
stable kernel cleanly.
2012-02-13 15:34:31 +01:00
Takashi Iwai 02a237b24d ALSA: hda - Fix silent speaker output on Acer Aspire 6935
Since 3.2 kernel, the driver starts trying to assign the multi-io DACs
before the speaker, thus it assigns DAC2/3 for multi-io and DAC4 for
the speaker for a standard laptop setup like a HP, a speaker, a mic-in
and a line-in.  However, on Acer Aspire 6935, it seems that the
speaker pin 0x14 must be connected with either DAC1 or 2; otherwise it
results in silence by some reason, although the codec itself allows
the routing to DAC3/4.

As a workaround, the connection list of each pin is reduced to be
mapped to either only DAC1/2 or DAC3/4, so that the compatible
assignment as in kernel 3.1 is achieved.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42740

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13 15:26:41 +01:00
Takashi Iwai fc1156c0b0 ALSA: hda - Fix initialization of secondary capture source on VT1705
VT1705 codec has two ADCs where the secondary ADC has no MUX but only
a fixed connection to the mic pin.  This confused the driver and it
tries always overriding the input-source selection by assumption of
the existing MUX for the secondary ADC, resulted in resetting the
input-source at each time PM (including power-saving) occurs.

The fix is simply to check the existence of MUX for secondary ADCs in
the initialization code.

Tested-by: Anisse Astier <anisse@astier.eu>
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13 15:04:06 +01:00
Takashi Iwai 1565cc3585 ALSA: hda - Add another jack-detection suppression for ASUS ALC892
Add the jack-detect suppression for an ASUS machine with ALC892 codec.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42655

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13 12:07:59 +01:00
Takashi Iwai e652f4c861 ALSA: hda - Suppress auto-mute feature on some machines with ALC861
A few machines with ALC861 & co are reported not to work properly with
the auto-mute feature in software.  The auto-mute feature is implemented
in the hardware level, and the jack-detection never works with them.

Also, rename the fixup index as ALC861_FIXUP_* to follow the standard.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13 12:07:40 +01:00
Takashi Iwai 71b1e9e43d ALSA: hda - Add codec->no_jack_detect flag
Add a new flag to indicate that the codec has no jack-detection cap.
This flag should be set for hardwares that have no jack-detect
implementation although the codec chip itself supports it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13 12:06:09 +01:00
Takashi Iwai a9c74173f4 ALSA: hda - Make is_jack_detectable() as non-inlined
It's a bit too big and used too often as an inline function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13 12:06:03 +01:00
Takashi Iwai 374a69e76e Merge branch 'fix/hda' into topic/hda
Necessary for working on the jack-detection suppression feature.
2012-02-13 12:05:30 +01:00
Takashi Iwai a1e0c3cf7f ALSA: hda - Fix mute-LED VREF value for new HP laptops
The new HP laptops turns off the mute LED with VREF50 or VREF80, but
not in HIZ unlike the previous models.  Since VREF50 (also 80) works
with the previous models, let's use VREF50 for all.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-09 09:33:46 +01:00
Seth Heasley 8bc039a1e1 ALSA: hda - Add Lynx Point HD Audio Controller DeviceIDs
This patch adds the HD Audio DeviceIDs for the Intel Lynx Point PCH.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-08 09:29:10 +01:00
Jaroslav Kysela 416846d2b3 ALSA: hda - add support for Uniwill ECS M31EI notebook
This hardware requires same fixup for the node 0x0f like Asus A6Rp.
More information: https://bugzilla.redhat.com/show_bug.cgi?id=785417

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-07 15:43:15 +01:00
Takashi Iwai b97f6bfdd1 ALSA: hda - Fix error handling in patch_ca0132.c
In patch_ca0132.c, the error returned from chipio_write() isn't checked
always.  Also, the power-up/down sequence isn't tracked properly in some
error paths.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-07 11:05:07 +01:00
Takashi Iwai fc9e5c6f42 ALSA: hda - Remove a debug print in vmaster code
Wrongly slipped in from the commit 9322ca54.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-06 14:46:01 +01:00
Takashi Iwai eedec3d385 ALSA: hda/realtek - Fix a wrong condition
sparse complains that "spec->multiout.dac_nids" is a pointer.

sound/pci/hda/patch_realtek.c:2321:37: error: incompatible types for operation (>)
sound/pci/hda/patch_realtek.c:2321:37:    left side has type unsigned short const [usertype] *dac_nids
sound/pci/hda/patch_realtek.c:2321:37:    right side has type int

It was meant to be num_dacs instead of dac_nids.
Although the current code still works as expected (when num_dacs is zero,
dac_nids should be NULL, too), better to fix now, of course.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-06 10:27:06 +01:00
Takashi Iwai 9322ca5497 ALSA: hda - Add suffix argument to snd_hda_add_vmaster()
In most cases, the slave strings for vmaster are identical between
volumes and switches except for "xxx Volume" and "xxx Switch" suffix.
Now snd_hda_add_vmaster() takes the optional suffix argument so that
each string can be composed with the given suffix, and we can share the
slave name strings in both volume and switch calls nicely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-03 14:28:01 +01:00
Takashi Iwai 1299d33020 Merge branch 'fix/hda' into topic/hda
The changes for slave controls in patch_realtek.c must be merged for the
further works.
2012-02-03 14:06:36 +01:00
Takashi Iwai b544d1e0e2 ALSA: hda/realtek - Add missing Bass and CLFE as vmaster slaves
The recent changes in Realtek auto-parser added the new "Bass Speaker"
and "CLFE" mixer elements which should be tracked as vmaster slaves,
too.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42720

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-03 14:04:11 +01:00
Takashi Iwai 356268bde2 ALSA: hda - Remove fallback to model=ideapad for Lenovo with cx5066
The Lenovo laptops with cx5066 chips seem to work better with
model=auto.  Let's get rid of the fallback to the wrong model.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-03 10:18:48 +01:00
Takashi Iwai b5bcc18940 ALSA: hda - Disable dynamic-power control for VIA as default
Since the dynamic pin power-control and the analog low-current mode
may lead to pop-noise, it's safer to set it off as default.

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

Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-02 10:34:06 +01:00
Takashi Iwai 4f2864a49b ALSA: hda - Enable sync_write and reset for Conexant codecs
This is an attempt to fix S3-resume problems reported for a few
laptops with different Conexant codecs.  They show the communication
stalls at some time in S3, and the driver falls back into the
single-cmd mode.  This leads to the silent output or the lack of
auto-mute feature.

As a workaround, here enables the sync_write and the bus-reset flags
to make the communication more stable.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-02 10:19:33 +01:00
Takashi Iwai e9d010c2e8 ALSA: hda - Allow analog low-current mode when dynamic power-control is on
VIA codecs have several different power-saving features, and one of
them is the analog low-current mode.  But it turned out that the ALC
mode causes pop-noises at each on/off time on some machines.  As a
quick workaround, disable the ALC when another power-saving feature,
the dynamic pin power-control, is turned off, too, since the dynamic
power-control is already exposed as a mixer enum element so that user
can turn it on/off freely.

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

Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-02 10:18:09 +01:00
Takashi Iwai 924339239f ALSA: hda - Fix the logic to detect VIA analog low-current mode
The analog low-current mode must be enabled when the no stream is
running but the current detection checks it in a wrong way.

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

Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-02 10:16:32 +01:00
Takashi Iwai 054d867e03 ALSA: hda - Check power-state before changing in patch_via.c
Instead of always writing AC_VERB_SET_POWER_STATE, check the current
power-state and don't write again if the value is already set.
This may reduce the click noise upon the dynamic power-state change
(e.g. in analog-input mixer).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-02 10:15:16 +01:00
David Henningsson 54c2a89f60 ALSA: HDA: Fix duplicated output to more than one codec
This typo caused the wrong codec's nid to be checked for wcaps type.
As a result, sometimes speakers would duplicate the output sent to
HDMI output.

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/924320
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-01 12:13:16 +01:00
Dylan Reid f70eecde3b ALSA: hda - Fix calling cs_automic twice for Cirrus codecs.
If cs_automic is called twice (like it is during init) while the mic
is present, it will over-write the last_input with the new one,
causing it to switch back to the automic input when the mic is
unplugged. This leaves the driver in a state (cur_input, last_input,
and automix_idx the same) where the internal mic can not be selected
until it is rebooted without the mic attached.

Check that the mic hasn't already been switched to before setting
last_input.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-01 09:43:46 +01:00
David Henningsson 3422a47041 ALSA: HDA: Remove quirk for Toshiba Qosmio G50
The user reports that model=auto works better than current handling
on a 3.2 based kernel (with jack detection patches backported).
Since model=auto is what we prefer these days anyway, the quirk
should be removed.

Alsa-info for the relevant machine:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/923316/+attachment/2702812/+files/alsa-info.txt.Pbfno2x7bp

BugLink: https://bugs.launchpad.net/bugs/923316
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-31 15:12:08 +01:00
David Henningsson 05c3b36e53 ALSA: HDA: Fix jack creation for codecs with front and rear Line In
If a codec has both a front and a rear Line In, two controls both
named "Line Jack" will be created, which causes parsing to fail.
While a long term solution might be to name the jacks differently,
this extra check is consistent with what is already being done in many
auto-parsers, and will also protect against other cases when two
inputs have the same label.

BugLink: https://bugs.launchpad.net/bugs/923409
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-31 15:11:21 +01:00
Takashi Iwai 31150f2327 ALSA: hda - Apply 0x0f-VREF fix to all ASUS laptops with ALC861/660
It turned out that other ASUS laptops require the similar fix to
enable the VREF on the pin 0x0f for the secret output amp, not only
ASUS A6Rp.  Moreover, it's required even when the pin is being used
as the output.  Thus, writing a fixed value doesn't work always.

This patch applies the VREF-fix for all ASUS laptops with ALC861/660
in a fixup function that checks the current value and turns on only
the VREF value no matter whether input or output direction is set.

The automute function is modified as well to keep the pin VREF upon
muting/unmuting via pin-control; otherwise the pin VREF is reset at
plugging/unplugging a jack.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42588

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-30 16:26:07 +01:00
David Henningsson a389d67cf9 ALSA: HDA: Remove quirk for Asus N53Jq
The user reports that he needs to add model=auto for audio to
work properly. In fact, since node 0x15 is not even a pin node,
the existing fixup is definitely wrong. Relevant information can
be found in the buglink below.

Cc: stable@kernel.org (3.2+)
BugLink: https://bugs.launchpad.net/bugs/918254
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-27 15:06:46 +01:00
Takashi Iwai b3a81520bd ALSA: hda - Fix silent output on Haier W18 laptop
The very same problem is seen on Haier W18 laptop with ALC861 as seen
on ASUS A6Rp, which was fixed by the commit 3b25eb69.
Now we just need to add a new SSID entry pointing to the same fixup.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42656

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-26 15:59:25 +01:00
Gustavo Maciel Dias Vieira a6a600d10a ALSA: hda: set mute led polarity for laptops with buggy BIOS based on SSID
HP laptop models with buggy BIOS are apparently frequent, including
machines with different codecs. Set the polarity of the mute led based
on the SSID and include an entry for the HP Mini 110-3100.

Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
Tested-by: Predrag Ivanovic <predivan@open.telekom.rs>
Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-25 10:00:12 +01:00
Takashi Iwai 3b25eb690e ALSA: hda - Fix silent output on ASUS A6Rp
The refactoring of Realtek codec driver in 3.2 kernel caused a
regression for ASUS A6Rp laptop; it doesn't give any output.
The reason was that this machine has a secret master mute (or EAPD)
control via NID 0x0f VREF.  Setting VREF50 on this node makes the
sound working again.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42588

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-25 09:59:57 +01:00
Takashi Iwai b4ead019af ALSA: hda - Fix silent outputs from docking-station jacks of Dell laptops
The recent change of the power-widget handling for IDT codecs caused
the silent output from the docking-station line-out jack.  This was
partially fixed by the commit f2cbba7602
"ALSA: hda - Fix the lost power-setup of seconary pins after PM resume".
But the line-out on the docking-station is still silent when booted
with the jack plugged even by this fix.

The remainig bug is that the power-widget is set off in stac92xx_init()
because the pins in cfg->line_out_pins[] aren't checked there properly
but only hp_pins[] are checked in is_nid_hp_pin().

This patch fixes the problem by checking both HP and line-out pins
and leaving the power-map correctly.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42637

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-23 18:23:36 +01:00
Takashi Iwai 7bfe059e38 ALSA: hda - explicitly set buffer-align flag for Nvidia controllers
It turned out that Nvidial (HDMI) controllers require the buffer
alignment.  Thus it's better to mark it requiring the alignment, so that
we can switch to non-aligned behavior as default in future.

Also, change the module paramter to be bint, in order to let user
overriding the default value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-23 17:53:39 +01:00
Takashi Iwai 633544a8e2 Merge branch 'fix/hda' into topic/hda
The fix for buffer-alignment is required for further works.
2012-01-23 17:48:39 +01:00
David Henningsson 29c5fbbcfe ALSA: HDA: Use model=auto for Thinkpad T510
The user reports that model=auto works fine for him. Using
model=auto bring in new features such as jack detection notification
to userspace.

Alsa info is available at http://paste.ubuntu.com/805351/

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-23 17:20:58 +01:00
Takashi Iwai 52409aa6a0 ALSA: hda - Fix buffer-alignment regression with Nvidia HDMI
The commit 2ae66c2655
    ALSA: hda: option to enable arbitrary buffer/period sizes
introduced a regression on machines with Intel controller and Nvidia
HDMI.  The reason is that the driver modifies the global variable
align_buffer_size when an Intel controller is found, and the Nvidia
HDMI controller is probed after Intel although Nvidia chips require
the aligned buffers.

This patch fixes the problem by moving the flag into the local struct
so that it's not affected by other controllers.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42567

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-23 17:15:03 +01:00
Takashi Iwai cb0cdebbf8 ALSA: hda - Fix a unused variable warning
Just overlooked.

sound/pci/hda/patch_realtek.c: In function ‘alc_sku_unsol_event’:
sound/pci/hda/patch_realtek.c:643:19: warning: unused variable ‘spec’ [-Wunused-variable]

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-20 12:14:12 +01:00
Takashi Iwai eefad7fd53 Merge branch 'topic/convert-bint' into topic/hda
Merge the conversions to bint module option type.
2012-01-20 12:10:09 +01:00