Commit graph

2954 commits

Author SHA1 Message Date
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
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
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
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
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