Commit Graph

569 Commits (8fc229a51b0e10f4ceb794e8b99fa0a427a7ba41)

Author SHA1 Message Date
Charles Chin ad5d875511 ALSA: hda - Add support for 92HD65 / 92HD66 family of codecs
These codecs have SPDIF-in, which is new to the 92HD83xxx compatible
families, so a bit of logic is added to support them.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-02 07:56:58 +01:00
Charles Chin 35c11777b9 ALSA: hda - Disable power-widget control for IDT 92HD83/93 as default
The power-widget control in patch_stac92hd83xxx() never worked properly,
thus it's safer to turn it off as default for now.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-02 07:53:30 +01:00
Paul Gortmaker da155d5b40 sound: Add module.h to the previously silent sound users
Lots of sound drivers were getting module.h via the implicit presence
of it in <linux/device.h> but we are going to clean that up.  So
fix up those users now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:21 -04:00
Charles Chin 6c5c04e509 ALSA: hda - Remove bad code for IDT 92HD83 family patch
The purpose of this patch is to remove a section of "bad" code that
assigns the last DAC to ports E or F in order to support notebooks
with docking in earlier days, around ALSA 1.0.19 - 21.  This is not
necessary now and actually breaks some configurations that use these
ports as other devices.  This have been tested on several different
configurations to make sure that it is working for different combinations.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-13 08:05:30 +02:00
David Henningsson 48718eab5a ALSA: HDA: Fix DAC assignment for secondary headphone on Sigmatel/IDT
If we run out of DACs when trying to assign a DAC to a secondary
headphone, prefer the DAC of the first headphone to the primary
(usually line out) DAC.

BugLink: http://bugs.launchpad.net/bugs/845275
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-05 12:56:40 +02:00
David Henningsson eb335a40ca ALSA: HDA: Fix naming of input jacks for IDT parser
The Sigmatel/IDT parser should have the same naming convention
for input jacks as the other codecs have.

BugLink: http://bugs.launchpad.net/bugs/859704
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-03 17:25:38 +02:00
David Henningsson 6656b15d67 ALSA: HDA: No power nids on 92HD93
This patch is necessary to make internal speakers work on this chip.

Cc: stable@kernel.org
BugLink: http://bugs.launchpad.net/bugs/854468
Tested-by: Alex Wolfson <alex.wolfson@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-24 09:56:59 +02:00
David Henningsson 46724c2e02 ALSA: HDA: Add support for IDT 92HD93
Cc: stable@kernel.org
BugLink: http://bugs.launchpad.net/bugs/854468
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-20 09:13:18 +02:00
Wang Shaoyan 96b6359779 ALSA: hda - Add CONFIG_SND_HDA_POWER_SAVE to stac_vrefout_set()
In commit 45eebda7, it add new function stac_vrefout_set, but it
is only used in code between CONFIG_SND_HDA_POWER_SAVE macro, so
add the macro to avoid such warning:

  sound/pci/hda/patch_sigmatel.c:676:12: warning: 'stac_vrefout_set' defined but not used

Signed-off-by: Wang Shaoyan <wangshaoyan.pt@taobao.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-10 11:22:08 +02:00
Vitaliy Kulikov 45eebda7b4 ALSA: hda - Add support for vref-out based mute LED control on IDT codecs
This patch also registers all necessary callbacks to support mute LED
only when such control is enabled. And it keeps codec AFG in D0 or D1
state all the time when aggressive power managemnt is enabled for vref-out
control (and mute LED) work correctly.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-27 08:51:10 +02:00
Takashi Iwai 2a43952a99 ALSA: hda - Make CONFIG_SND_HDA_POWER_SAVE depending on CONFIG_PM
It makes little sense to enable power-saving without PM.
This removes SND_HDA_NEEDS_RESUME define so that we can use CONFIG_PM
in all places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-26 17:21:18 +02:00
Vitaliy Kulikov 7df1ce1a81 ALSA: hda - Make sure mute led reflects master mute state
This patch adds checking of mute state on all outputs besides just
speakers to calculate the master mute state for mute led support.
It also renames and splits the function that does it for better code
clarity.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-26 09:39:31 +02:00
Vitaliy Kulikov d02667e620 ALSA: hda - Fix invalid mute led state on resume of IDT codecs
Codec state is not restored immediately on resume but on the first
access when power-save is enabled.  That leads to an invalid mute led
state after resume until either sound is played or some control is
changed.  This patch adds a possibility for a vendor specific patch to
restore codec state immediately after resume if required.  And it adds
code to restore IDT codecs state immediately on resume on HP systems
with mute led support.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-26 09:38:36 +02:00
Vitaliy Kulikov 0c27c18052 ALSA: hda - Add support of the 4 internal speakers on certain HP laptops
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-24 13:36:24 +02:00
Takashi Iwai 8d087c7600 ALSA: hda - Create snd_hda_get_conn_index() helper function
Create snd_hda_get_conn_index() helper function for obtaining the
connection index of the widget.  Replaced the similar codes used in
several codec-drivers with this common helper.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-29 08:01:46 +02:00
Stephen Warren 74b654c957 ALSA: hda: Virtualize SPDIF out controls
The SPDIF output controls apply to converter widgets. A future change
will create a PCM device per pin widget, and hence a set of SPDIF output
controls per pin widget, for certain HDMI codecs. To support this, we
need the ability to virtualize the SPDIF output controls. Specifically:

* Controls can be "unassigned" from real hardware when a converter is
  not used for the PCM the control was created for.
* Control puts only write to hardware when they are assigned.
* Controls can be "assigned" to real hardware when a converter is picked
  to support output for a particular PCM.
* When a converter is assigned, the hardware is updated to the cached
  configuration.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-06 12:51:59 +02:00
Takashi Iwai 1f83ac5ac9 ALSA: hda - Handle dock line-in as auto-detectable for IDT codecs
When a docking-station has a line-in jack, we can handle it also as
a detectable jack just like mic-in.  This will improve the usability
of HP laptops with a docking-station.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:35:03 +02:00
Takashi Iwai e35d9d6a15 ALSA: hda - Check unsol-cap in is_jack_detectalbe()
Also replace more open-codes with this function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-17 12:33:27 +02:00
David Henningsson e033ebfb39 ALSA: HDA: Use one dmic only for Dell Studio 1558
There are no signs of a dmic at node 0x0b, so the user is left with
an additional internal mic which does not exist. This commit removes
that non-existing mic.

Cc: stable@kernel.org (2.6.32+)
BugLink: http://bugs.launchpad.net/bugs/731706
Reported-by: James Page <james.page@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-16 14:23:56 +02:00
Takashi Iwai 2b63536f0c ALSA: hda - Constify fixup and other array data in patch_sigmatel.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:33:43 +02:00
Takashi Iwai dda144103c ALSA: hda - Constify some API function arguments
Also fixed the assignment of multiout.dac_nids to satisfy const.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-02 12:07:48 +02:00
Takashi Iwai a3ea8e8f24 Merge branch 'fix/hda' into topic/hda 2011-05-02 10:41:40 +02:00
Takashi Iwai d507cd668a ALSA: hda - Enable sync_write workaround for AMD generically
The workaround for AMD chipset via sync_write flag seems needed for
machines with Realtek codecs.  So, it's better to activate it
generically in hda_intel.c from the beginning.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-26 15:33:43 +02:00
Takashi Iwai 31d44b57c5 Merge branch 'fix/hda' into topic/hda 2011-04-26 15:05:39 +02:00
Takashi Iwai 885f42e1f4 ALSA: hda - Enable sync_write for AMD chipset with IDT 92HD8x codecs
The AMD chipset seems unstable in the normal operation mode, and it
seems requring more sensible access for each verb.  Enabling sync_write
mode and allowing bus-reset is a sort of workaround for these chipset
stability issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-21 15:27:58 +02:00
Linus Torvalds 4263a2f1da Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Don't query connections for widgets have no connections
  ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E)
  ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums
  ALSA: usb-audio: define another USB ID for a buggy USB MIDI cable
  ALSA: HDA: Fix dock mic for Lenovo X220-tablet
  ASoC: format_register_str: Don't clip register values
  ASoC: PXA: Fix oops in __pxa2xx_pcm_prepare
  ASoC: zylonite: set .codec_dai_name in initializer
2011-04-10 09:56:10 -07:00
Takashi Iwai cd9abc7a22 ALSA: hda - Don't query connections for widgets have no connections
Fixes the kernel warnings with IDT codecs like
    hda_codec: connection list not available for 0x1e

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 14:55:57 +02:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Vitaliy Kulikov 699d899560 ALSA: hda - pin-adc-mux-dmic auto-configuration of 92HD8X codecs
This patch replaces use of the harcoded arrays of pins, muxes, digital
mics and adcs with the auto-generated ones using codec parsing and
auto-discovers all actually connected digital mic pins on 92HD8X-like
codecs

This patch also adds the support for d-mic on pin 0x20.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 15:38:57 +01:00
Vitaliy Kulikov 094a42452a ALSA: hda - fix digital mic selection in mixer on 92HD8X codecs
When the mux for digital mic is different from the mux for other mics,
the current auto-parser doesn't handle them in a right way but provides
only one mic.  This patch fixes the issue.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 15:21:17 +01:00
Takashi Iwai cd372fb3be ALSA: hda - Make common input-jack helper functions
Since multiple codec drivers already use the input-jack stuff, let's
make common helper functions to reduce the duplicated codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-03 14:40:14 +01:00
Vitaliy Kulikov 4dfb8a45d5 ALSA: hda - Add support for new IDT 92HD98 and 92HD99 codecs
Also fix number of 92HD87 pins to exclude invalid pins.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-24 18:04:56 +01:00
Vitaliy Kulikov cbbf50b22f ALSA: hda - Fix initialization for HP 2011 notebooks
Fixes for HP 2011 notebooks: enable dock ports and disable BTL
initialization in the driver.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18 07:43:48 +01:00
Takashi Iwai ea73496324 ALSA: hda - consitify string arrays
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18 07:43:17 +01:00
Takashi Iwai 80c678526d ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection
When only one mic is available and it's an analog mic, the current
IDT/STAC parser may give an Oops.

Reference: bko#25692
	https://bugzilla.kernel.org/show_bug.cgi?id=25692

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2011-01-13 08:29:12 +01:00
David Henningsson bdfe6f452f ALSA: HDA: Add internal mic for IDT 92HD88B
BugLink: http://bugs.launchpad.net/bugs/696493

According to datasheet (and real-world testing), IDT 92HD88B can
have internal mics at NID 0x11 and 0x20, so enable them accordingly.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 10:49:26 +01:00
Takashi Iwai 70c673a480 Merge branch 'fix/hda' into topic/hda 2011-01-10 10:49:13 +01:00
Takashi Iwai 2d7ec12b90 ALSA: hda - Fix conflict of d-mic capture volume controls
When the d-mics are assigned to the same purpose of another analog mic
pins, the driver doesn't compute the index properly, resulting in an
error with "existing control".  This patch fixes it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-23 10:16:05 +01:00
Takashi Iwai 1db7ccdb2e ALSA: hda - Fix beep-tone on IDT 92HD87/88 codecs
It sounds like a non-linear beep tone on my test machines...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-03 15:42:28 +01:00
Takashi Iwai 1e1675e9c1 ALSA: hda - Enable beep for IDT92HD87 / 88 codecs
These codecs have the digital beep widget in NID 0x21.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-03 14:58:37 +01:00
Daniel T Chen 0defe09ca7 ALSA: hda: Use "alienware" model quirk for another SSID
BugLink: https://launchpad.net/bugs/683695

The original reporter states that headphone jacks do not appear to
work.  Upon inspecting his codec dump, and upon further testing, it is
confirmed that the "alienware" model quirk is correct.

Reported-and-tested-by: Cody Thierauf
Cc: <stable@kernel.org> [2.6.32+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-02 08:06:00 +01:00
Takashi Iwai d090f5976d ALSA: Revert "ALSA: hda - Fix switching between dmic and mic using the same mux on IDT/STAC"
This reverts commit f41cc2a85d.

The patch broke the digital mic pin handling wrongly.
Reference: bko#23162
	https://bugzilla.kernel.org/show_bug.cgi?id=23162

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-23 07:39:58 +01:00
David Henningsson 89feca1a16 ALSA: HDA: Enable digital mic on IDT 92HD87B
BugLink: http://launchpad.net/bugs/673075

According to the datasheet of 92HD87B, there is a digital mic
at nid 0x11, so enable it in order to be able to use the mic.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-11 02:01:07 +01:00
Vitaliy Kulikov 335e3b8687 ALSA: hda - Change BTL amp level on some HP notebooks
Some HP laptops have lower amplifier levels for speakers in comparison
with headphone outputs.  This patch changes the BTL amp level for these
machines to balance both the speaker and headphone output levels.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-25 20:08:36 +02:00
Takashi Iwai 506ecbca71 Merge branch 'topic/hda' into for-linus 2010-10-25 10:40:05 +02:00
Clemens Ladisch a74ccea51d ALSA: hda - Fix wrong TLV mute bit for STAC/IDT codecs
The bit value set for TLV mute was wrong in commit
de8c85f784, which resulted in bogus
dB ranges that screw up PulseAudio.  Corrected with the right constant.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-22 15:59:29 +02:00
Charles 1cc9e8f4c4 ALSA: hda - Fix codec muted after rebooting from Windows
Windows may leave pin power-down registers set after reboot, and
this resulted in muted output on Linux.  Reset these registers
at initialization properly.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-19 11:14:44 +02:00
Clemens Ladisch de8c85f784 ALSA: HDA: Sigmatel: work around incorrect master muting
The HDA specification does not allow for a codec to mute itself just
because the volume is reduced, so _of course_ somebody had to go and do
it.  This wouldn'\''t hurt too much when the volume is adjusted by hand,
but programs like PA that try to set the volume automatically could
inadvertently mute the output.

To work around this, change the TLV dB information for the Master volume
on all Sigmatel HDA codecs to indicate the the minimal volume setting
actually mutes.

Reported-by: Colin Guthrie <gmane@colin.guthr.ie>
Reported-by: "Alexander E. Patrakov" <patrakov@gmail.com>
Tested-by: Colin Guthrie <cguthrie@mandriva.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-17 10:45:30 +02:00
Luke Yelavich 9b2167d59f ALSA: hda - Add another HP DV6 quirk
BugLink: https://bugs.launchpad.net/bugs/653420

Add another HP DV6 notebook (103c:363e) to use STAC_HP_DV5.

Signed-off-by: Luke Yelavich <luke.yelavich@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-11 13:49:04 +02:00
Vitaliy Kulikov f41cc2a85d ALSA: hda - Fix switching between dmic and mic using the same mux on IDT/STAC
Fix bug in switching between dmic and mic when both use the same mux.

Signed-off-by: Vitaliy Kulikov  <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-25 09:11:26 +02:00
Takashi Iwai 9e5341b92d ALSA: hda - Introduce hda_call_check_power_status() helper
Replace the explicit ifdef check and call of check_power_status ops with
a new helper function, hda_call_check_power_status().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-21 10:00:03 +02:00
Takashi Iwai 99ae28bea9 ALSA: hda - Make snd_hda_get_input_pin_attr() helper
Make the helper function to give the input-pin attribute for jack
connectivity and location.  This simplifies checks of input-pin jacks
a bit in some places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-17 14:42:34 +02:00
Charles Chin 9907790aa0 ALSA: hda - Fix automatic MIC switching and include dock MIC for IDT codecs
Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-17 10:22:32 +02:00
Takashi Iwai 10a20af7c9 ALSA: hda - Improve the input source name labels
This patch improves the input-source label strings to be generated from
the pin information instead of fixed strings per AUTO_PIN_* type.
This gives more suitable labels, especially for mic and line-in pins.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 16:46:03 +02:00
Takashi Iwai 86e2959a10 ALSA: hda - Remove AUTO_PIN_FRONT_{MIC|LINE}
We can assign multiple pins to a single role now, let's reduce the
redundant FRONT_MIC and FRONT_LINE.  Also, autocfg->input_pins[] is
no longer used, so this is removed as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 16:46:01 +02:00
Takashi Iwai b5786e85cb ALSA: hda - Keep char arrays in input_mux items
Keep char array in the input_mux item itself instead of pointing to
an external string.  This is a preliminary work for improving the
input-mux name based on the pin role.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 16:45:58 +02:00
Vitaliy Kulikov 263d0328c4 ALSA: hda - Improve input control names for IDT/STAC codecs
Changing the way the input controls are named using port connection
type and jack location info.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 09:01:28 +02:00
Vitaliy Kulikov ab5a6ebee3 ALSA: hda - Adding support for new IDT 92HD90BXX and 92HD91BXX codecs
Adding support for digital MIC in 92HD83/90/91XXX codecs family.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 09:00:17 +02:00
Takashi Iwai eea7dc932b ALSA: hda - Use new inputs[] field to parse input-pins for STAC/IDT codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:06:15 +02:00
Charles Chin 4d8ec5f3b6 ALSA: hda - Add support for IDT 92HD89XX codecs
Just added new codec ids.  These are almost compatible with existing ones.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-19 08:10:04 +02:00
Charles Chin 8a345a042a ALSA: hda - Adding support for new IDT 92HD87XX codecs
Added the entries for 92HD87B1/3 and 92HD87B2/4 codecs.
These are compatible with existing 83xxx codecs.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-10 11:43:25 +02:00
Steven Eastland 4831559018 ALSA: hda - New snd-hda-intel model/pin config for hp dv7-4000
This provides a new model and pin config for the snd-hda-intel
92HD83XXX codec for hp laptop model dv7-4000, enabling the subwoofer.

Signed-off-by: Steven Eastland <seastland at gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-09 08:41:02 +02:00
Daniel J Blueman 1b0e372d7b ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecs
Fix HDA beep frequency on IDT 92HD73xx and 92HD71Bxx codecs.
These codecs use the standard beep frequency calculation although the
datasheet says it's linear frequency.

Other IDT/STAC codecs might have the same problem.  They should be
fixed individually later.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 12:58:01 +02:00
Daniel T Chen 66668b6fb6 ALSA: hda: Fix model quirk for Dell M1730
BugLink: https://launchpad.net/bugs/576160

Symptom: Currently (2.6.32.12) the Dell M1730 uses the 3stack model
quirk. Unfortunately this means that capture is not functional out-
of-the-box despite ensuring that capture settings are unmuted and
raised fully.

Test case: boot from Ubuntu 10.04 LTS live cd; capture does not
work.

Resolution: Correct the model quirk for Dell M1730 to rely on the
BIOS configuration.

This patch also trivially sorts the quirk into the correct section
based on the comments.

Reported-and-Tested-By: <picdragon99@msn.com>
Tested-By: Daren Hayward
Tested-By: Tobias Krais
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-25 08:46:01 +02:00
Takashi Iwai 2a6ce6e5fd ALSA: hda - Add hp-dv4 model for IDT 92HD71bx
It turned out that HP dv series have inconsistent the mute-LED GPIO
mapping among various models.  dv4/7 seem to use GPIO 0 while dv 5/6
seem to use GPIO 3.  The previous commit
  26ebe0a289
  ALSA: hda - Fix mute-LED GPIO pin for HP dv series
breaks dv5/6.

This patch adds the new quirk model, hp-dv4, to handle HP dv4/7
separately from HP dv5/6.

Tested-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com> (for dv6-1110ax)
Acked-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-12 10:20:42 +02:00
Takashi Iwai 26ebe0a289 ALSA: hda - Fix mute-LED GPIO pin for HP dv series
Old HP dv series seem to use the GPIO pin 0 for controlling the mute LED
although the pin is a large package, where the newer models use GPIO 3
in such a case.  For fixing the regression from the previous kernels,
set spec->gpio_led statically for these model quirks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-11 08:36:29 +02:00
Wu Fengguang 4d26f44657 ALSA: hda - fix DG45ID SPDIF output
This reverts part of commit 52dc438606, in order to fix a regression:
broken SPDIF output on Intel DG45FC motherboard (IDT 92HD73E1X5 codec).

	--- DG45FC-IDT-codec-2.6.32  (SPDIF OK)
	+++ DG45FC-IDT-codec-2.6.33  (SPDIF broken)

	 Node 0x22 [Pin Complex] wcaps 0x400301: Stereo Digital
	   Pincap 0x00000010: OUT
	-  Pin Default 0x40f000f0: [N/A] Other at Ext N/A
	-    Conn = Unknown, Color = Unknown
	-    DefAssociation = 0xf, Sequence = 0x0
	-  Pin-ctls: 0x00:
	+  Pin Default 0x014510a0: [Jack] SPDIF Out at Ext Rear
	+    Conn = Optical, Color = Black
	+    DefAssociation = 0xa, Sequence = 0x0
	+  Pin-ctls: 0x40: OUT
	   Connection: 3
	      0x25* 0x20 0x21
	 Node 0x23 [Pin Complex] wcaps 0x400301: Stereo Digital
	   Pincap 0x00000010: OUT
	-  Pin Default 0x01451140: [Jack] SPDIF Out at Ext Rear
	+  Pin Default 0x074510b0: [Jack] SPDIF Out at Ext Rear Panel
	     Conn = Optical, Color = Black
	-    DefAssociation = 0x4, Sequence = 0x0
	-    Misc = NO_PRESENCE
	-  Pin-ctls: 0x40: OUT
	+    DefAssociation = 0xb, Sequence = 0x0
	+  Pin-ctls: 0x00:
	   Connection: 3
	      0x26* 0x20 0x21

Cc: <stable@kernel.org>
Cc: Alexey Fisher <bug-track@fisher-privat.net>
Tested-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-07 10:24:53 +02:00
Daniel T Chen 5c1bccf645 ALSA: hda: Use STAC_DELL_M6_BOTH quirk for Dell Studio 1558
BugLink: https://launchpad.net/bugs/568600

The OR has verified that the dell-m6 model quirk is necessary for audio
to be audible by default on the Dell Studio XPS 1645.

This change is necessary for 2.6.32.11 and 2.6.33.2 alike.

Reported-by: Andy Ross <andy@plausible.org>
Tested-by: Andy Ross <andy@plausible.org>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-23 08:01:42 +02:00
Daniel T Chen aac78daf8f ALSA: hda: Use STAC_DELL_M6_BOTH quirk for Dell Studio XPS 1645
BugLink: https://launchpad.net/bugs/553002

The OR has verified that the dell-m6 model quirk is necessary for audio
to be audible by default on the Dell Studio XPS 1645.

This change is necessary for 2.6.32.11 and 2.6.33.2 alike.

Reported-by: Robert Chambers
Tested-by: Robert Chambers
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-22 09:14:32 +02:00
Kunal Gangakhedkar e3d2530a6c ALSA: hda - Add PCI quirk for HP dv6-1110ax.
Adding this PCI quirk fixes the board config detection.
This also fixes jack sensing by using "hp_detect=1" via properly detected
board config.

Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-21 09:33:11 +01:00
Takashi Iwai dce17d4ff3 ALSA: hda - Fix default polarity of mute-LED GPIO on 92HD83x/88x codecs
The previous commit caused a regression on HP laptops with 92HD83x/88x
codecs.  The default polarity of mute-LED GPIO is inverted on these
devices.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-09 09:25:26 +01:00
Takashi Iwai b99a776d0b ALSA: hda - Remove static gpio_led setup via model
We have now a better mute-LED GPIO detection, and no need to assign the
values statically per model option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-08 15:21:09 +01:00
Takashi Iwai c21bd02543 ALSA: hda - Merge HP mute-LED status callback on both IDT 92HD7x and 8x codecs
Merge the mute-LED status callback function for both IDT 92HD7x and 8x
codecs to one function.  Also it's changed to check all DACs, and called
in the initialization to sync with the current status.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-08 15:19:51 +01:00
Takashi Iwai 07f804495c ALSA: hda - Detect HP mute-LED GPIO setup from GPIO counts
The GPIO pin number for the mute LED control on HP laptops can be
determined more easily by checking the number of available GPIO pins
of the codec chip.  On a small package with up to 3 GPIOs, GPIO 0 is
used while GPIO 3 is used for others.

This fixes the missing mute GPIO for some HP laptops with new codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-08 15:06:13 +01:00
Charles Chin 04b5efe5fa ALSA: hda - Fix docking output for IDT 92HD8xx codecs
This patch fixes docking output support for IDT 92HD81/83/88 family codecs.
Typically one of ports 0xE or 0xF is used for docking output, while only
port 0xF is common on all the three codec families.  We don't want the
pin to select the analog mixer here.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-04 10:28:02 +01:00
Vitaliy Kulikov a9694faa28 ALSA: hda - Adding support for another IDT 92HD83XXX codec
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-04 08:58:23 +01:00
Charles Chin 36706005d9 ALSA: hda - Add support for IDT 92HD88 family codecs
Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-29 12:05:51 +01:00
Vitaliy Kulikov e108c7b79e ALSA: hda - Add mute LED check for HP laptops with IDT 92HD83xxx codec
This patch adds HP mute LED support for IDT 92HD81/3 family of the codecs.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 19:21:07 +01:00
Takashi Iwai 9e4c84967e Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_realtek.c
2010-01-19 15:53:43 +01:00
Kunal Gangakhedkar d38cce7046 ALSA: hda - Fix mute led GPIO on HP dv-series notebooks
On my laptop (HP dv6-1110ax), there are no OEM strings in SMBIOS of type
"HP_Mute_LED*". Hence, the GPIO for the mute button LED doesn't get set
properly. I didn't find the strings in my cousin's laptop (HP dv9500t CTO)
either.

As per the documentation of find_mute_led_gpio(), these strings occur
in HP B-series systems - so, before scanning the SMBIOS strings, we need to
check if we're dealing with a B-series system.
Need to get confirmation from HP if this logic takes care of all the
systems. I'm trying to poke a friend there.

Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-15 18:15:42 +01:00
Takashi Iwai 014c41fce1 ALSA: hda - Use strict_strtoul()
Rewrite the codes to use strict_strtoul() instead of simple_strtoul().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:53:24 +01:00
Takashi Iwai 92ee6162c4 ALSA: hda - Add snd_hda_shutup_pins() helper function
Add a common helper function for clearing pin controls before suspend.
Use the pincfg array instead of looking through all widget tree.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:39:14 +01:00
Takashi Iwai 043958e602 ALSA: hda - Add more hints for GPIO setup of IDT/STAC codecs
gpio_led, gpio_led_polarity and gpio_mute are added now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-26 10:36:12 +01:00
Takashi Iwai a252c81a69 ALSA: hda - use snd_hda_jack_detect() again in patch_sigmatel.c
Use snd_hda_jack_detect() again for jack-sensing.
The triggering problem can be worked around with codec->no_trigger_sense
flag now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25 22:56:20 +01:00
Takashi Iwai 15e7f8b92a Merge branch 'fix/hda' into topic/hda 2009-12-25 14:17:48 +01:00
Anisse Astier 95e70e8753 ALSA: hda - Add STAC9205 PCI_QUIRK for Dell Vostro 1700
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23 18:49:22 +01:00
Takashi Iwai 524027916e Merge branch 'fix/hda' into topic/hda 2009-12-23 08:38:23 +01:00
Takashi Iwai 75d1aeb9d6 ALSA: hda - Add Bass Speaker switch for HP dv7
The bass speaker is controlled via GPIO5.

Tested-by: Wael Nasreddine <mla@nasreddine.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 11:56:32 +01:00
Takashi Iwai d8d881dd2c ALSA: hda - Fix NULL dereference with enable_beep=0 option
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 07:52:49 +01:00
Jaroslav Kysela 5e26dfd061 ALSA: hda - simplify usage of HDA_SUBDEV_AMP_FLAG
The HDA_SUBDEV_NID_FLAG is duplicate for amplifier control elements. Move
get_amp_nid_() call to the snd_hda_ctl_add() function.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-15 09:33:32 +01:00
Jaroslav Kysela 9e3fd8719f ALSA: hda - introduce HDA_SUBDEV_AMP_FLAG (ControlAmp in proc)
The purpose of this changeset is to show information about amplifier
setting in the codec proc file. Something like:

  Control: name="Front Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Front Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=2, ofs=0

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-15 09:33:17 +01:00
Alexey Fisher 52dc438606 ALSA: hda - Overwrite pin config on intel DG45ID board.
The pin config provided by BIOS have some problems:
0x0221401f: [Jack] HP Out at Ext Front  <-- other association and sequence
0x02a19020: [Jack] Mic at Ext Front     <-- other association
0x01113014: [Jack] Speaker at Ext Rear  <-- line out (not speaker)
0x01114010: [Jack] Speaker at Ext Rear  <-- line out
0x01a19030: [Jack] Mic at Ext Rear      <-- other association
0x01111012: [Jack] Speaker at Ext Rear  <-- line out
0x01116011: [Jack] Speaker at Ext Rear  <-- line out
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x01451140: [Jack] SPDIF Out at Ext Rear
0x40f000f0: [N/A] Other at Ext N/A

just overwrite it.

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-12 10:41:50 +01:00
Vitaliy Kulikov c357aab02e ALSA: hda - Fix LED GPIO setup for HP laptops with IDT codecs
This patch fixes an error in processing of the HP BIOS configuration to enable
GPIO based mute LED indicator control. That error causes driver to enable
such control on all HP systems with the 92HD75 IDT codecs and results in
unnecessary toggling of the GPIO on mute control manipulation.

It also adds support of the future HP BIOS configuration extension for the
named control. New configuration string has a format HP_Mute_LED_P_G
where P can be 0 or 1 and defines mute LED GPIO control state (low/high)
that corresponds to the NOT muted state of the master volume
and G is the index of the GPIO to use (0..9)

Lastly, it adds more systems to the support of the audio implementation
as found on HP B-series systems

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11 07:51:54 +01:00
Takashi Iwai bfc9902599 ALSA: hda - Don't trigger pin-sense for STAC/IDT codecs
STAC/IDT codecs seem to behave weird when SET_PIN_SENSE verb is issued
before reading the jack-detection although the TRIG_REQ pin capability
is given by the hardware.

Since snd_hda_jack_detect() issues the SET_PIN_SENSE verb simply judging
from the pincap, we have to revert the change in the commit
  d56757abc1
    ALSA: hda - Replace the rest of jack-detections with snd_hda_jack_detect()
to plain GET_PIN_SENSE verb without triggering.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-27 12:22:44 +01:00
Takashi Iwai b4e818768d ALSA: hda - Fix mute-LED sync on HP laptops with IDT92HD83xxx codecs
The mute-LED isn't synchronized with the actual mute state on some
HP laptops with IDT 92HD83xxx codecs.  A similar hack using
check_power_status callback is added for this codec, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 17:22:07 +01:00
Takashi Iwai 8af3aeb498 ALSA: hda - Fix detection of dual headphones
The dual-headphone mode with STAC/IDT codecs is useful only for machines
that have two (or more) built-in headphones.

But, some HP laptops give multiple headphone pin configs, one for the
built-in and another for the separate (likely a docking station) one.
This results in a missing speaker volume control.

This patch adds more check for the dual-headphone mode to avoid this
problem.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 14:23:37 +01:00
Takashi Iwai d56757abc1 ALSA: hda - Replace the rest of jack-detections with snd_hda_jack_detect()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18 08:00:14 +01:00
Takashi Iwai 9c96fa599f ALSA: hda - Get rid of magic digits for subdev hack
Define a proper const for a magic 31bit flag for subdev / NID setup
with a brief comment.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:23 +01:00
Jaroslav Kysela 4d02d1b638 ALSA: hda - proc - add support for dynamic controls to mixer<->NID mapping
This patch adds support for dynamically created controls to proc codec file
(Control: lines).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:19 +01:00
Jaroslav Kysela 3911a4c19e ALSA: hda - proc - introduce Control: lines to show mixer<->NID assignment
This is an initial patch to show universal control<->NID assigment in
proc codec file. The change helps to debug codec related problems.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:14 +01:00