GitHub/moto-9609/android_kernel_motorola_exynos9610.git
15 years agoALSA: hda - Add quirks for some HP laptops
Takashi Iwai [Thu, 6 Aug 2009 06:44:43 +0000 (08:44 +0200)]
ALSA: hda - Add quirks for some HP laptops

The new HP laptops have PCI SSID 103c:701x and requires model=hp-dv5.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix line-out jack handling with STAC/IDT codec
Takashi Iwai [Tue, 4 Aug 2009 11:40:54 +0000 (13:40 +0200)]
ALSA: hda - Fix line-out jack handling with STAC/IDT codec

When the line-out jack is plugged/unplugged, the driver needs to check
the headphone plug, not only the line-out jack itself.  Otherwise the
headphone or the speaker may be wrongly muted/unmuted.

As a result, both STAC_HP_EVENT and STAC_LO_EVENT need to call the
same function, stac92xx_hp_detect().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix line-out jack detection
Takashi Iwai [Mon, 3 Aug 2009 12:23:33 +0000 (14:23 +0200)]
ALSA: hda - Fix line-out jack detection

The commit fefd67f31ee7f5259344e36a237d59b47e8715cf
    ALSA: hda - Add line-out jack detection on IDT/STAC codecs
enabled wrong pins for jack detections.  Fixed to the correct ones.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Mon, 3 Aug 2009 06:37:17 +0000 (08:37 +0200)]
Merge branch 'fix/hda' into topic/hda

15 years agoALSA: hda: add IbexPeak/Clarkdale HDMI model with static cvt/pin number
Wu Fengguang [Sun, 2 Aug 2009 08:48:55 +0000 (16:48 +0800)]
ALSA: hda: add IbexPeak/Clarkdale HDMI model with static cvt/pin number

The new IbexPeak HDMI codec has 3 pin nodes and 2 converter nodes.
Here we assume only the first ones will be used.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Read buffer overflow
Roel Kluin [Sun, 2 Aug 2009 11:30:45 +0000 (13:30 +0200)]
ALSA: hda - Read buffer overflow

Check whether index is within bounds before testing the element.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda: Correct EAPD for Dell Inspiron 1525
Chengu Wang [Thu, 30 Jul 2009 11:43:55 +0000 (19:43 +0800)]
ALSA: hda: Correct EAPD for Dell Inspiron 1525

The commit 24918b61b55c21e09a3e07cd82e1b3a8154782dc statically changes
the model from dell-bios to dell-3stack to solve the sound decreasing
regression (http://lkml.org/lkml/2008/9/12/203), however it leads to another
problem that the 2nd headphone jack doesn't work
(https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3987). So I think
the commit 249**2dc is just a workaround. I would like to give a true solution
here.

The datasheet for STAC9228 says, GPIO2 is the same pin as VOL DOWN, and
the EAPD pin is GPIO0. This is why the sound decreases if we set EAPD as
GPIO2. This patch changes EAPD to GPIO0 to solve the problem.

Signed-off-by: Chengu Wang <wangchengu@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda: warn on spurious response
Wu Fengguang [Sat, 1 Aug 2009 11:18:45 +0000 (19:18 +0800)]
ALSA: hda: warn on spurious response

To help disclose hardware bugs.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda: remember last command for each codec
Wu Fengguang [Sat, 1 Aug 2009 11:17:14 +0000 (19:17 +0800)]
ALSA: hda: remember last command for each codec

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda: read CORBWP inside reg_lock
Wu Fengguang [Sat, 1 Aug 2009 10:48:12 +0000 (18:48 +0800)]
ALSA: hda: read CORBWP inside reg_lock

This converts the last CORBWP access outside of reg_lock.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda: take reg_lock in azx_init_cmd_io/azx_free_cmd_io
Wu Fengguang [Sat, 1 Aug 2009 10:47:41 +0000 (18:47 +0800)]
ALSA: hda: take reg_lock in azx_init_cmd_io/azx_free_cmd_io

Just for safety.  azx_init_cmd_io() and azx_free_cmd_io() may be
called when switching to single command mode.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda: take cmd_mutex in probe_codec()
Wu Fengguang [Sat, 1 Aug 2009 10:46:46 +0000 (18:46 +0800)]
ALSA: hda: take cmd_mutex in probe_codec()

Now that each codec will have its own module, it is possible
for the user to load one codec while another one is running.

So cmd_mutex would be a safe addition to probe_codec().

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda: track CIRB/CORB command/response states for each codec
Wu Fengguang [Sat, 1 Aug 2009 10:45:16 +0000 (18:45 +0800)]
ALSA: hda: track CIRB/CORB command/response states for each codec

Recently we hit a bug in our dev board, whose HDMI codec#3 may emit
redundant/spurious responses, which were then taken as responses to
command for another onboard Realtek codec#2, and mess up both codecs.

Extend the azx_rb.cmds and azx_rb.res to array and track each codec's
commands/responses separately. This helps keep good codec safe from
broken ones.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix quirk for Toshiba Satellite A135-S4527
Takashi Iwai [Mon, 3 Aug 2009 06:23:52 +0000 (08:23 +0200)]
ALSA: hda - Fix quirk for Toshiba Satellite A135-S4527

Use model=lenovo instead of model=dallas for Toshiba Satellite A135-S4527
with ALC861-VD codec.

Reference: Novell bnc#526325
https://bugzilla.novell.com/show_bug.cgi?id=526325

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Increase PCM stream name buf in patch_realtek.c
Takashi Iwai [Fri, 31 Jul 2009 08:05:11 +0000 (10:05 +0200)]
ALSA: hda - Increase PCM stream name buf in patch_realtek.c

The name buf with size 16 is too short for some codec names, e.g.
truncated like "ALC861-VD Analo".  Now the size is doubled.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'topic/hda-cirrus' into topic/hda
Takashi Iwai [Thu, 30 Jul 2009 16:09:04 +0000 (18:09 +0200)]
Merge branch 'topic/hda-cirrus' into topic/hda

15 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Thu, 30 Jul 2009 16:08:54 +0000 (18:08 +0200)]
Merge branch 'fix/hda' into topic/hda

15 years agoALSA: hda - Add line-out jack detection on IDT/STAC codecs
Takashi Iwai [Thu, 30 Jul 2009 16:03:05 +0000 (18:03 +0200)]
ALSA: hda - Add line-out jack detection on IDT/STAC codecs

Add the automatic mute of speakers via line-out jack plugging on
STAC/IDT codecs.  The feature is enabled when the HP detect is present.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Enable HP output with Macbook Pro 5, 5
Stelian Pop [Thu, 30 Jul 2009 12:44:27 +0000 (14:44 +0200)]
ALSA: hda - Enable HP output with Macbook Pro 5, 5

The patch below, to be applied on the latest sound-unstable-2.6.git,
enables headphones output on my MacBookPro 5,5, together with the
automuting feature.

Here is the exact soundcard id:
Vendor Id: 0x10134206
Subsystem Id: 0x106b4d00
Revision Id: 0x100301

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix typos of Capture controls.
Takashi Iwai [Thu, 30 Jul 2009 07:24:29 +0000 (09:24 +0200)]
ALSA: hda - Fix typos of Capture controls.

The commit 6479c63188290beae83ade3243b9d6eb47d394b6
    ALSA: hda - Create Capture controls dynamically
introduced typos of "Capture".  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda: add HP automute support to Intel ALC889/ALC889A models
Wu Fengguang [Thu, 30 Jul 2009 07:19:14 +0000 (09:19 +0200)]
ALSA: hda: add HP automute support to Intel ALC889/ALC889A models

It auto mutes all 8-channel outputs at rear panel when
the front panel headphone is connected.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda: add 2-channel mode to Intel ALC889/ALC889A models
Wu Fengguang [Thu, 30 Jul 2009 06:36:35 +0000 (14:36 +0800)]
ALSA: hda: add 2-channel mode to Intel ALC889/ALC889A models

This 2-channel mode is useful in that it will broadcast
a 2-channel audio stream to all front/side/... ports.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - No analog mix input source as default for IDT92HD71bxx
Takashi Iwai [Wed, 29 Jul 2009 16:41:29 +0000 (18:41 +0200)]
ALSA: hda - No analog mix input source as default for IDT92HD71bxx

The analog mix is disabled now as default (unless "analog_mixer" hint
is given), so it shoudn't appear in the digital input source as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add missing DMUX initialization for auto-mic with STAC/IDT
Takashi Iwai [Wed, 29 Jul 2009 14:32:55 +0000 (16:32 +0200)]
ALSA: hda - Add missing DMUX initialization for auto-mic with STAC/IDT

Added the missing initialization of DMUX connection (to analog input)
for auto-mic mode with STAC/IDT codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Remove static connection in IDT 92HD71bxx
Takashi Iwai [Wed, 29 Jul 2009 14:28:09 +0000 (16:28 +0200)]
ALSA: hda - Remove static connection in IDT 92HD71bxx

We don't need any more static connection to the port F (which is often
used for docking stations) since its connection is done dynamically via
DAC assignment now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda: fix out-of-bound hdmi_eld.sad[] write
Roel Kluin [Wed, 29 Jul 2009 12:35:20 +0000 (14:35 +0200)]
ALSA: hda: fix out-of-bound hdmi_eld.sad[] write

e->sad[] is declared with size ELD_MAX_SAD=16, but the guard
allows range 0-31.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Support auto-mic switching with IDT/STAC codec
Takashi Iwai [Wed, 29 Jul 2009 12:32:56 +0000 (14:32 +0200)]
ALSA: hda - Support auto-mic switching with IDT/STAC codec

Support the automatic mic-switching with some devices with IDT/STAC
codecs.  The condition is that the device has only two inputs, one
for an external mic and one for an internal mic.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Avoid overwrite of jack events with STAC/IDT
Takashi Iwai [Wed, 29 Jul 2009 12:23:09 +0000 (14:23 +0200)]
ALSA: hda - Avoid overwrite of jack events with STAC/IDT

Since only one event can be associated to a (pin) widget, it's safer
to avoid the multiple mapping.  This patch fixes the behavior of the
STAC/IDT codec driver.

Now stac_get_event() doesn't take the type argument but simply returns
the first hit element.  Then enable_pin_detect() checks the validity
of the type, and returns non-zero only if a valid entry.  The caller
can call stac_issue_unsol_event() after checking the return value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Don't create analog mixer for IDT92HD71bxx
Takashi Iwai [Tue, 28 Jul 2009 16:25:29 +0000 (18:25 +0200)]
ALSA: hda - Don't create analog mixer for IDT92HD71bxx

The analog mixer unit on IDT 92HD71Bxx codecs is almost useless
since we use only the direct connections from DAC to pin.

Remove the controls to avoid unneeded confusion as default now.
This can be still back via "analog_mixer = 1" hint.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Create Capture controls dynamically
Takashi Iwai [Tue, 28 Jul 2009 16:20:25 +0000 (18:20 +0200)]
ALSA: hda - Create Capture controls dynamically

Instead of static snd_kcontrol_new arrays, create "Capture Volume"
and "Capture Switch" controls dynamically based on the mixer attr
values (made via HDA_COMPOSE_AMP_VAL()).
This reduces the code size and gives more flexibility to change
the number of controls later.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Don't create unneeded digital input source for IDT 92HD71x
Takashi Iwai [Tue, 28 Jul 2009 15:03:49 +0000 (17:03 +0200)]
ALSA: hda - Don't create unneeded digital input source for IDT 92HD71x

The current driver creates always the digital input source mixer
elements for IDT 92HD71x codecs no matter whether digital mics are
present.  This patch adds the proper check to avoid the creation of
these controls if unnecessary.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Reword information messages for BIOS auto-probing mode
Takashi Iwai [Tue, 28 Jul 2009 14:01:20 +0000 (16:01 +0200)]
ALSA: hda - Reword information messages for BIOS auto-probing mode

The sentense "Unknown model for xxx, ..." makes people too nervous
and drives them to a direction to a wrong "fix" by giving any
mismatching model option.

Let's rephrase the messages to be more nice and easy (at least that
won't make people suspect conspiracies).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add quirk for Dell Studio 1555
Takashi Iwai [Mon, 27 Jul 2009 22:54:39 +0000 (00:54 +0200)]
ALSA: hda - Add quirk for Dell Studio 1555

Added a quirk entry for Dell Studio 1555.

Reference: Novell bnc#525244
https://bugzilla.novell.com/show_bug.cgi?id=525244

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add exception for volume-knob in snd_hda_get_connections()
Takashi Iwai [Mon, 27 Jul 2009 10:56:26 +0000 (12:56 +0200)]
ALSA: hda - Add exception for volume-knob in snd_hda_get_connections()

Volume-knob widgets may have connections even if they have no CONN_LIST
cap bit.  Allow the query exceptionally in snd_hda_get_connections().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Introduce get_wcaps_type() macro
Takashi Iwai [Mon, 27 Jul 2009 10:54:26 +0000 (12:54 +0200)]
ALSA: hda - Introduce get_wcaps_type() macro

Add a helper macro to retrieve the widget type from wiget cap bits.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Fri, 24 Jul 2009 14:54:59 +0000 (16:54 +0200)]
Merge branch 'fix/hda' into topic/hda

15 years agoALSA: hda - Fix mute control with some ALC262 models
Takashi Iwai [Fri, 24 Jul 2009 14:51:47 +0000 (16:51 +0200)]
ALSA: hda - Fix mute control with some ALC262 models

The master mute switch is wrongly implemented as checking the pointer
instead of its value, thus it can be never muted.  This patch fixes
the issue.

Reference: Novell bnc#404873
https://bugzilla.novell.com/show_bug.cgi?id=404873

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
15 years agoALSA: hda - Add description of new models for ALC889/889A
Takashi Iwai [Thu, 23 Jul 2009 10:25:40 +0000 (12:25 +0200)]
ALSA: hda - Add description of new models for ALC889/889A

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add better Intel IbexPeak platform support
Jaroslav Kysela [Thu, 23 Jul 2009 08:58:29 +0000 (10:58 +0200)]
ALSA: hda - Add better Intel IbexPeak platform support

Here are the new sound enabling patches for IbexPeak.

Summary of tested features:

  - playback
    - Front Headphone: OK
    - 8 channel audio: Front/Rear/CLFE/Side all OK

  - recording
    - Front Mic/Rear Mic: both OK
      (front/rear/line mics are selectable in the "Input source" alsamixer control)
    - Line In: not working
      (in 6ch mode, its amp/mute, direction and route all looks fine,
       so I'm a little puzzled)
      (hopefully no one will care this feature)

  - digital SPDIF input/output: not tested (no equipment)

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Restore GPIO1 properly at resume with AD1984A
Takashi Iwai [Wed, 22 Jul 2009 16:15:10 +0000 (18:15 +0200)]
ALSA: hda - Restore GPIO1 properly at resume with AD1984A

The commit 099db17e66294b02814dee01c81d9abbbeece93e introduced a
regression at suspend/resume where the GPIO1 bit isn't properly
restored, thus the speaker output gets muted initially after resume.

The fix is simple, use the cached write for storing GPIO data.

Reference: Novell bnc#522764
https://bugzilla.novell.com/show_bug.cgi?id=522764

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda-intel: Cleanups for widget connection list handling
Jaroslav Kysela [Wed, 22 Jul 2009 14:20:40 +0000 (16:20 +0200)]
ALSA: hda-intel: Cleanups for widget connection list handling

This patch adds a check to snd_hda_get_connections() routine for
presence of AC_WCAP_CONN_LIST. Also, make sure that negative error
codes from noted route are handled on all places as errors.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Use snprintf() to be safer
Takashi Iwai [Wed, 22 Jul 2009 14:02:46 +0000 (16:02 +0200)]
ALSA: hda - Use snprintf() to be safer

Use snprint() for creating the jack name string instead of sprintf()
in patch_sigmatel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda_generic: use AC_WCAP_CONN_LIST check for widget connections
Jaroslav Kysela [Wed, 22 Jul 2009 13:31:03 +0000 (15:31 +0200)]
ALSA: hda_generic: use AC_WCAP_CONN_LIST check for widget connections

Previous patch used widget type, but the presence flag of the connection
list is in the widget capabilities.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda_generic: do not read connections for widged with an unknown type
Jaroslav Kysela [Wed, 22 Jul 2009 12:38:58 +0000 (14:38 +0200)]
ALSA: hda_generic: do not read connections for widged with an unknown type

Reading node connections for an unknown widget can confuse HDA codec bus.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix ALC861 auto-mode parser
Takashi Iwai [Wed, 22 Jul 2009 13:17:45 +0000 (15:17 +0200)]
ALSA: hda - Fix ALC861 auto-mode parser

Fix the logic of ALC861 auto-mode parser for the outputs.
Instead of assuming the fixed DAC list, parse the conection and assign
the DAC dynamically.

Also, unmute the unused output connections to avoid noises on inputs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Reduce click noise at power-saving
Takashi Iwai [Wed, 22 Jul 2009 10:39:24 +0000 (12:39 +0200)]
ALSA: hda - Reduce click noise at power-saving

Add some tricks to reduce the click noise at powering down to D3
in the power saving mode on STAC/IDT codecs.
The key seems to be to reset PINs before the power-down, and some
delay before entering D3.  The needed delay is significantly long,
but I don't know why.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix pin-setup for Sony VAIO with STAC9872 codecs
Takashi Iwai [Mon, 20 Jul 2009 06:01:36 +0000 (08:01 +0200)]
ALSA: hda - Fix pin-setup for Sony VAIO with STAC9872 codecs

The recent rewrite of the codec parser for STAC9872 caused a regression
for some Sony VAIO models that don't give proper pin default configs
by BIOS.  Even using model=vaio doesn't work because the pin definitions
are set after the pin overrides.

This patch fixes the pin definitions in patch_stac9872() to be put
in the right place before the pin overrides.  Also the patch adds the
new quirk entry for VAIO F/S to have the correct pin default configs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
15 years agoALSA: hda - Add quirk for Gateway T6834c laptop
Hao Song [Mon, 20 Jul 2009 07:01:16 +0000 (15:01 +0800)]
ALSA: hda - Add quirk for Gateway T6834c laptop

Gateway T6834c laptops need EAPD always on while the default behavior
for the STAC9205 reference board is to turn it off upon every HP plug.
By using the special "eapd" model, which is first introduced for Gateway
T1616 laptops for this same reason, this peculiarity can be properly
handled.

Signed-off-by: Hao Song <baritono.tux@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Sun, 19 Jul 2009 11:52:31 +0000 (13:52 +0200)]
Merge branch 'fix/hda' into topic/hda

15 years agoALSA: hda_codec: Check for invalid zero connections
Jaroslav Kysela [Sat, 18 Jul 2009 09:48:19 +0000 (11:48 +0200)]
ALSA: hda_codec: Check for invalid zero connections

To prevent "Too many connections" message and the error path for some HDMI
codecs (which makes onboard audio unusable), check for invalid zero
connections for CONNECT_LIST verb.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix ALC268 parser for mono speaker
Takashi Iwai [Fri, 17 Jul 2009 12:36:59 +0000 (14:36 +0200)]
ALSA: hda - Fix ALC268 parser for mono speaker

- Parse the mono output pin 0x16 correctly even as the primary output
- Create "Speaker" volume control if the primary output is a speaker
- Fix the wrong direction of (optional) "Mono" switch

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix the previous sanity check in make_codec_cmd()
Takashi Iwai [Fri, 17 Jul 2009 10:47:34 +0000 (12:47 +0200)]
ALSA: hda - Fix the previous sanity check in make_codec_cmd()

The newly added sanity-check for a codec verb can be better written
with logical ORs.  Also, the parameter can be more than 8bit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - add bounds checking for the codec command fields
Wu Fengguang [Fri, 17 Jul 2009 08:49:19 +0000 (16:49 +0800)]
ALSA: hda - add bounds checking for the codec command fields

A recent bug involves passing auto detected >0x7f NID to codec command,
creating an invalid codec addr field, and finally lead to cmd timeout
and fall back into single command mode. Jaroslav fixed that bug in
alc880_parse_auto_config().

It would be safer to further check the bounds of all cmd fields.

Cc: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add support for new AMD HD audio devices
Andiry Brienza [Fri, 17 Jul 2009 03:32:32 +0000 (11:32 +0800)]
ALSA: hda - Add support for new AMD HD audio devices

Add support for new AMD HD audio devices. Use generic driver to detect HD audio
devices with Vendor ID AMD.

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add CX20582 and OLPC XO-1.5 support
Daniel Drake [Thu, 16 Jul 2009 13:46:57 +0000 (14:46 +0100)]
ALSA: hda - Add CX20582 and OLPC XO-1.5 support

This adds support for the Conexant CX20582 codec, based on code from
http://www.linuxant.com/alsa-driver/alsa-driver-linuxant-1.0.19ppch12-1.noarch.rpm.zip

This is the codec to be shipped in the OLPC XO-1.5, so this patch also
includes an XO-specific profile. Resultant configuration:
http://dev.laptop.org/~dsd/20090713/codec0.txt
http://dev.laptop.org/~dsd/20090713/codec0.svg

As the Linuxant code is structured differently to the other codecs,
I was unable to cleanly reimplement everything in the generic and Dell
profiles as more info is needed (e.g. codec graphs). I simplified those
profiles so that hopefully it will not break anyone's audio. If it does,
it may be worth returning -ENODEV from patch_cx5066 on non-OLPC systems,
and then fixing snd_hda_codec_configure() to fall back on the generic
parser, at least until support for other systems is figured out.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Check codec errors in snd_hda_get_connections()
Takashi Iwai [Fri, 10 Jul 2009 10:52:27 +0000 (12:52 +0200)]
ALSA: hda - Check codec errors in snd_hda_get_connections()

The codec read errors in snd_hda_get_connections() are ignored so far,
and it causes a problem like the bug in the commit
    9d30937accf2c01e8b0bd59787409a7348cbbcb7
    ALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checking

Better to check errors in the function and returns a proper error code
rather than passing bogus NID values.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checking
Jaroslav Kysela [Fri, 10 Jul 2009 10:27:31 +0000 (12:27 +0200)]
ALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checking

On some IbexPeak systems with ALC889A errors like "azx_get_response
timeout, switching to polling mode: last cmd=0xaf9f000b" are produced,
because non-existent codec #10 is wrongly accessed.

The problem is that snd_hda_get_connections() returns out-of-range result
for NID 0x1c (something like 0xf8f9 or 0xffff).

This patch adds a check to alc880_parse_auto_config() to avoid using
of this out-of-range NIDs. A better fix maybe to improve
snd_hda_get_connections() routine to check for valid NID ranges if
NIDs are expected as result.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix the merge error
Takashi Iwai [Fri, 10 Jul 2009 10:33:48 +0000 (12:33 +0200)]
ALSA: hda - Fix the merge error

Fix the merge error at the commit 305355aad89f1b7eb27cb210fad2f9d3c67b2572,
an addition of the missing alc880_gpio3_init_verbs to ALC882_TARGA model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Thu, 9 Jul 2009 16:48:38 +0000 (18:48 +0200)]
Merge branch 'fix/hda' into topic/hda

Conflicts:
sound/pci/hda/patch_realtek.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - targa and targa-2ch fix
David Heidelberger [Thu, 9 Jul 2009 16:45:46 +0000 (18:45 +0200)]
ALSA: hda - targa and targa-2ch fix

Simplify ALC882_TARGA and return gpio3 to ALC883_TARGA_DIG and
ALC883_TARGA_2ch_DIG, which I accidentally removed in commit id
64a8be74357477558183b43156c5536b642de134

Signed-off-by: David Heidelberger <d.okias@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - don't build digital output controls if not exist
Takashi Iwai [Thu, 9 Jul 2009 09:45:59 +0000 (11:45 +0200)]
ALSA: hda - don't build digital output controls if not exist

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - fix beep tone calculation for IDT/STAC codecs
Paul Vojta [Thu, 9 Jul 2009 06:57:46 +0000 (23:57 -0700)]
ALSA: hda - fix beep tone calculation for IDT/STAC codecs

In the beep tone calculation for IDT/STAC codecs, lower numbers correspond
to higher frequencies and vice versa.  The current code has this backwards,
resulting in beep frequencies which are way too high (and sound bad on
tinny laptop speakers, resulting in complaints).

[Also added hz <= 0 check by tiwai]

Signed-off-by: Paul Vojta <vojta@math.berkeley.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Missing volume controls for Intel HDA (ALC269/EeePC)
Darren Salt [Wed, 8 Jul 2009 14:29:49 +0000 (15:29 +0100)]
ALSA: hda - Missing volume controls for Intel HDA (ALC269/EeePC)

There is a regression, introduced in aa202455eec51699e44f658530728162cefa1307
(in alsa-kernel) which I noticed when trying to use the headphone socket on
my EeeCPC 901: the output was *very* quiet, practically silent.

This patch corrects the control types to that which was obviously intended in
the referenced commit.

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add quirks for RTL888 & RV630/M76 based MSI GX710
William Weston [Wed, 8 Jul 2009 08:10:05 +0000 (01:10 -0700)]
ALSA: hda - Add quirks for RTL888 & RV630/M76 based MSI GX710

Signed-off-by: William Weston <weston@sysex.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix compile warnings in patch_cirrus.c
Takashi Iwai [Wed, 8 Jul 2009 10:42:08 +0000 (12:42 +0200)]
ALSA: hda - Fix compile warnings in patch_cirrus.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Disable AMD SB600 64bit address support only
Andiry Brienza [Wed, 8 Jul 2009 05:55:31 +0000 (13:55 +0800)]
ALSA: hda - Disable AMD SB600 64bit address support only

HDA driver disabled HD audio 64bit address support for all AMD
SB600/SB700/SB800 platforms with commit
09240cf429505891d6123ce14a29f58f2a60121e due to one SB600 issue
reported by community, but we do not see the similar issue on
SB700/SB800 platforms.
This patch is to refine the workaround for SB600 only.

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Check widget types while parsing capture source in patch_via.c
Takashi Iwai [Wed, 8 Jul 2009 05:45:46 +0000 (07:45 +0200)]
ALSA: hda - Check widget types while parsing capture source in patch_via.c

Check the widget type and don't take invalid widgets while parsing
the capture source in patch_via.c.

Also, fixed some compile warnings introduced in the previous commit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix capture source selection in patch_via.c
Takashi Iwai [Tue, 7 Jul 2009 16:18:59 +0000 (18:18 +0200)]
ALSA: hda - Fix capture source selection in patch_via.c

The fixed widget NIDs in patch_via.c seem wrong for some codecs,
and it resulted in the invalid capture source selection.

This patch adds the code to parse the topology instead of using
fixed numbers in order to get the right MUX widget id corresponding
to the ADCs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add missing EAPD initialization for VIA codecs
Takashi Iwai [Tue, 7 Jul 2009 11:43:35 +0000 (13:43 +0200)]
ALSA: hda - Add missing EAPD initialization for VIA codecs

If the output pin is used and EAPD capability is present, turn on
the EAPD bit.  This fixes the silent output problem on ASUS laptops
with VT1708S codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Clean up VT170x dig-in initialization code
Takashi Iwai [Tue, 7 Jul 2009 11:39:03 +0000 (13:39 +0200)]
ALSA: hda - Clean up VT170x dig-in initialization code

Minor clean up for initializing the digital-in pin.
No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix the speaker volume control name
Takashi Iwai [Tue, 7 Jul 2009 07:05:07 +0000 (09:05 +0200)]
ALSA: hda - Fix the speaker volume control name

Increase the name string buffer size so that "Surround Speaker Playback
Volume" won't be truncated.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add GPIO setup for MacBook pro 5,5 with CS420x
Takashi Iwai [Tue, 7 Jul 2009 07:04:26 +0000 (09:04 +0200)]
ALSA: hda - Add GPIO setup for MacBook pro 5,5 with CS420x

GPIO3 seems corresponding to EAPD that is required for the speaker
output.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add quirk for MacBook Pro 5,5 with CS4206
Takashi Iwai [Mon, 6 Jul 2009 13:15:22 +0000 (15:15 +0200)]
ALSA: hda - Add quirk for MacBook Pro 5,5 with CS4206

Add the default pin configs for MBP55.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix double creation of SPDIF input controls
Takashi Iwai [Mon, 6 Jul 2009 13:01:09 +0000 (15:01 +0200)]
ALSA: hda - Fix double creation of SPDIF input controls

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add CS420x-specific coef setup
Takashi Iwai [Mon, 6 Jul 2009 11:00:57 +0000 (13:00 +0200)]
ALSA: hda - Add CS420x-specific coef setup

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Force to initialize input mixer setup for CS420x
Takashi Iwai [Mon, 6 Jul 2009 10:58:59 +0000 (12:58 +0200)]
ALSA: hda - Force to initialize input mixer setup for CS420x

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix cirrus codec parsing
Takashi Iwai [Mon, 6 Jul 2009 10:55:46 +0000 (12:55 +0200)]
ALSA: hda - Fix cirrus codec parsing

The parser wasn't called in the proper order.
Split now the parser to be called in patch_cirrus(), and the rest
are just for building PCMs and controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix error path in the sanity check in azx_pcm_open()
Takashi Iwai [Sun, 5 Jul 2009 09:44:46 +0000 (11:44 +0200)]
ALSA: hda - Fix error path in the sanity check in azx_pcm_open()

Release resources cleanly after errors in the sanity check in
azx_pcm_open().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Sat, 4 Jul 2009 10:20:25 +0000 (12:20 +0200)]
Merge branch 'fix/hda' into topic/hda

15 years agoALSA: hda - move 8086:fb30 quirk (stac9205) to the proper section
Herton Ronaldo Krzesinski [Sat, 4 Jul 2009 04:44:59 +0000 (01:44 -0300)]
ALSA: hda - move 8086:fb30 quirk (stac9205) to the proper section

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Don't override maxbps for FLOAT sharing with linear formats
Takashi Iwai [Fri, 3 Jul 2009 21:25:37 +0000 (23:25 +0200)]
ALSA: hda - Don't override maxbps for FLOAT sharing with linear formats

When FLOAT PCM format is available but together with other linear
PCM formats, don't override maxbps value.  For FLOAT format, it's always
32, thus it can be better checked in snd_hda_calc_stream_format().
Otherwise the maxbps 32 might be used wrongly even if the linear PCM
doesn't support it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add sanity check in PCM open callback
Takashi Iwai [Fri, 3 Jul 2009 21:10:23 +0000 (23:10 +0200)]
ALSA: hda - Add sanity check in PCM open callback

Add some sanity checks of struct snd_pcm_hardware fields in the PCM
open callback of hda driver.  This makes a bit easier to debug any PCM
setup errors in the codec side.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Call snd_pcm_lib_hw_rates() again after codec open callback
Takashi Iwai [Fri, 3 Jul 2009 21:06:45 +0000 (23:06 +0200)]
ALSA: hda - Call snd_pcm_lib_hw_rates() again after codec open callback

The PCM rates bit field may have been changed by the codec open callback.
In that case, we need to reset rate_min and rate_max.  So, simply call
snd_pcm_lib_hw_rates() again after the codec open callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Avoid invalid formats and rates with shared SPDIF
Takashi Iwai [Fri, 3 Jul 2009 21:03:30 +0000 (23:03 +0200)]
ALSA: hda - Avoid invalid formats and rates with shared SPDIF

Check whether formats and rates don't result in zero due to the
restriction of SPDIF sharing.  If any of them can be zero, disable
the SPDIF sharing mode instead.  Otherwise it will lead to a PCM
configuration error.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Fri, 3 Jul 2009 13:03:35 +0000 (15:03 +0200)]
Merge branch 'fix/hda' into topic/hda

15 years agoALSA: hda - Improve ASUS eeePC 1000 mixer
Takashi Iwai [Fri, 3 Jul 2009 13:00:54 +0000 (15:00 +0200)]
ALSA: hda - Improve ASUS eeePC 1000 mixer

The mixer elements created for ASUS eeePC 1000 with ALC269 aren't
standard but strange words like "LineOut".  Rename the element names
to follow the standard one like "Headphone" and "Speaker".
Also, split the volumes to each so that the virtual master can control
them.

The alc269_fujitsu_mixer is removed because it's now identical with
the new eeepc mixer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add GPIO1 control at muting with HP laptops
Takashi Iwai [Thu, 2 Jul 2009 14:10:23 +0000 (16:10 +0200)]
ALSA: hda - Add GPIO1 control at muting with HP laptops

HP laptops with AD1984A codecs (at least mobile models) need to set
GPIO1 appropriately to indicate the mute state.  The BIOS checks this
bit to judge whether the mute on or off is sent via F8 key.
Without changing this bit, the BIOS can be confused and may toggle
the mute wrongly.

Reference: Novell bnc#515266
https://bugzilla.novell.com/show_bug.cgi?id=515266

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Manually expand alc882_init_verbs
Takashi Iwai [Fri, 3 Jul 2009 08:58:12 +0000 (10:58 +0200)]
ALSA: hda - Manually expand alc882_init_verbs

Instead of expanding alc882_init_verbs to two elements via a macro,
manually expand to each entry.  This makes clear that some have already
the full slot for init_verbs array (currently 5).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add missing mixer amp initialization for ALC882
Takashi Iwai [Fri, 3 Jul 2009 08:56:10 +0000 (10:56 +0200)]
ALSA: hda - Add missing mixer amp initialization for ALC882

After merting patch_alc882() and patch_alc883(), the initialization of
mixer amp 0x0b was missing in alc882_base_init_verbs[].
This is usually no critical problem, but it can disable the power-saving
as the default state, so better to put to mute these channels.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add Cirrus Logic CS420x support
Takashi Iwai [Wed, 1 Jul 2009 16:11:44 +0000 (18:11 +0200)]
ALSA: hda - Add Cirrus Logic CS420x support

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Wed, 1 Jul 2009 16:09:15 +0000 (18:09 +0200)]
Merge branch 'fix/hda' into topic/hda

15 years agoALSA: hda - Add quirk for HP 6930p
Takashi Iwai [Wed, 1 Jul 2009 16:08:01 +0000 (18:08 +0200)]
ALSA: hda - Add quirk for HP 6930p

Added a quirk model=laptop for HP 6930p (103c:30dc) with AD1984A codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Allow FLOAT PCM format
Takashi Iwai [Wed, 1 Jul 2009 16:05:27 +0000 (18:05 +0200)]
ALSA: hda - Allow FLOAT PCM format

So far, the FLOAT PCM format is used only exclusivley set.  But
this can be a combination with other formats.

This patch changes the parser to allow the FLOAT format in addition
to other PCM formats.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add missing static to patch_ca0110()
Takashi Iwai [Wed, 1 Jul 2009 06:34:32 +0000 (08:34 +0200)]
ALSA: hda - Add missing static to patch_ca0110()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix input pinctl for ALC882 auto mode
Takashi Iwai [Tue, 30 Jun 2009 14:11:11 +0000 (16:11 +0200)]
ALSA: hda - Fix input pinctl for ALC882 auto mode

alc882_auto_init_analog_input() sets the input pins to VREF-80 regardless
of the input pin types although it shouldn't be for line-in pins.

This patch fixes the behavior to follow other codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Merge patch_alc882() and patch_alc883()
Takashi Iwai [Tue, 30 Jun 2009 13:28:30 +0000 (15:28 +0200)]
ALSA: hda - Merge patch_alc882() and patch_alc883()

Merge patch_alc882() and patch_alc883() to the former one since both
codecs have fairly similar connections but just a slight difference.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'topic/hda-patch' into topic/hda
Takashi Iwai [Tue, 30 Jun 2009 13:29:38 +0000 (15:29 +0200)]
Merge branch 'topic/hda-patch' into topic/hda

15 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Tue, 30 Jun 2009 13:12:11 +0000 (15:12 +0200)]
Merge branch 'fix/hda' into topic/hda

15 years agoALSA: hda - Add missing initializations for ALC268 and ALC269
Takashi Iwai [Mon, 29 Jun 2009 09:33:53 +0000 (11:33 +0200)]
ALSA: hda - Add missing initializations for ALC268 and ALC269

During the changes to clean up / fix the realtek codec initialization
routines in commit 4a79ba34cada6a5a4ee86ed53aa8a73ba1e6fc51,
I forgot to add the check for ALC268 and ALC269.
This resulted in the missing EAPD and COEF setup for these codecs.

This patch adds the missing checks for these codecs.

Reference: bko#13633
http://bugzilla.kernel.org/show_bug.cgi?id=13633

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'fix/hda-samsung-p50' into topic/hda
Takashi Iwai [Mon, 29 Jun 2009 06:51:09 +0000 (08:51 +0200)]
Merge branch 'fix/hda-samsung-p50' into topic/hda