dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

4106 Commits

Author SHA1 Message Date
Clemens Ladisch 8443d2eb81 ALSA: oxygen: add X-Meridian 2G support
Add support for the AuzenTech X-Meridian 7.1 2G sound card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:42 +01:00
Clemens Ladisch 8c50b75979 ALSA: oxygen: add more PCI IDs
Add PCI IDs for some unknown models.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:38 +01:00
Clemens Ladisch ce2c492090 ALSA: virtuoso: reduce MCLK in double rate modes
For the CSxxxx and AKxxxx DAC/ADC chips, the MCLK factor in double rate
modes (64-96 kHz) can be reduced to 128x without reducing sound quality.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:35 +01:00
Clemens Ladisch 5b8bf2a54f ALSA: oxygen: simplify model-specific MCLK handling
Replace the get_i2s_mclk callback with tables of MCLK values.  This
simplifies the MCLK-handling code in both the framework and the model-
specific drivers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:31 +01:00
Clemens Ladisch bc29e262c3 ALSA: virtuoso: use headphone gain setting only on front DAC
Do not apply the headphone gain offset to any but the front DAC.  These
DACs would not be used in headphone mode, so this saves a few register
writes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:28 +01:00
Clemens Ladisch c97e2dc484 ALSA: virtuoso: handle DAC oversampling automatically
Remove the DAC Oversampling mixer control because this setting does not
make much sense.

For cards with the H6 daughterboard, 128x oversampling was disabled
anyway because these high MCLK frequency would not be compatible with
the connector cable.

For cards without the H6 daughterboard, 128x gives a slightly higher
output quality; there is no reason to reduce it to 64x except for saving
power, but then these cards have not been designed to be power efficient
anyway (the D2's blinkenlights cannot be disabled).

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:24 +01:00
Clemens Ladisch 00b8dd7dd7 ALSA: virtuoso: use lower master clock with H6 daughterboard
Because of the unshielded connector cable, it is important to use as low
a master clock frequency as possible with the H6.

For double rate modes (64-96 kHz), the MCLK rate is unconditionally
lowered from 512x to 256x because the higher rate would not improve
anything.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:21 +01:00
Clemens Ladisch d353eaa9a8 ALSA: virtuoso: configure correct master clock frequency on the CS2000
The clock output of the CS2000, which is used as master clock for the
DACs, was using half the actual master clock frequency for some reason.
Using the theoretically correct frequency seems also to work in practice.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:17 +01:00
Clemens Ladisch dd203fa97b ALSA: virtuoso: remove non-working controls on Essence ST Deluxe
On the Xonar Essence ST Deluxe, remove all mixer controls that would
require I2C communication with the third DAC, which does not work
because of an addressing conflict with the CS2000 chip.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:14 +01:00
Clemens Ladisch 03ff959dd4 ALSA: virtuoso: change PCM1796 format to I2S
Change the PCM format used for the PCM1796 from left-justified to I2S to
ensure that the correct format is used even for the Essence ST Deluxe's
center/LFE DAC, where I2C does not work because of an address conflict
with the CS2000 chip.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:10 +01:00
Clemens Ladisch 79815e004c ALSA: virtuoso: wait for PCM1796 clock to become stable
The PCM1796 needs the master clock for I2C communication to work, so
add delays after clock changes to ensure that the clock is stable when
we try to write the DACs' registers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:07 +01:00
Clemens Ladisch 4106055ced ALSA: virtuoso: do not use fast I2C speed
To make the I2C communication reliable when using the H6 daughterboard,
reduce the I2C clock frequency.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:03 +01:00
Clemens Ladisch 5ea310ff8d ALSA: oxygen: fix SPI clocks slower than 6.25 MHz
Fix wrong register bits for SPI clock cycle times longer than 160 ns,
and adjust the polling loop timeout for these speeds.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:00 +01:00
Clemens Ladisch d2119c05e9 ALSA: oxygen: remove oxygen_model::private_data field
The number of DACs can now be deduced from the dac_channels_mixer field,
so the private_data field is no longer needed.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:45:56 +01:00
Clemens Ladisch 1f4d7be729 ALSA: oxygen: allow different number of PCM and mixer channels
For cards like the Xonar HDAV1.3, differentiate between the number of
PCM channels that can be played and the number of channels whose volume
can be adjusted.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:45:53 +01:00
Takashi Iwai bcb2f0f517 ALSA: hda - Add support for multiple headphone/speaker controls for Realtek
So far, Realtek auto-parser assumed that the multiple pins are only for
line-outs, and assigned the channel names like Front, Surround, etc for
the multiple outputs.  But, there are devices that have multiple
headphones, and these can be better controlled with the corresponding
control-name like "Headphone" with indicies.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 15:45:23 +01:00
Takashi Iwai b2d0576055 ALSA: hda - Fix multi-headphone handling for Realtek codecs
When multiple headphone pins are defined without line-out pins, the
driver takes them as primary outputs.  But it forgot to set line_out_type
to HP by assuming there is some rest of HP pins.  This results in some
mis-handling of these pins for Realtek codec parser.  It takes as if
these are pure line-out jacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2011-01-10 14:51:32 +01:00
Daniel T Chen ca6cd851d7 ALSA: hda: Use vostro model quirk for Dell Vostro 1014
BugLink: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5184

A user reported on the alsa-devel mailing list that he needs to use
the vostro model quirk to have audible playback, so apply it for his
PCI SSID.

Reported-and-tested-by: Fernando Lemos <fernandotcl@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 11:11:52 +01:00
David Henningsson 22f21d51bb ALSA: HDA: Add Lenovo vendor quirk for Conexant 205xx
BugLink: http://bugs.launchpad.net/bugs/689036

Many new Lenovos need the ideapad quirk. Also, since the
auto parser for this chip is far from optimal, the regression
risk is low (although not zero).

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 11:11:23 +01:00
David Henningsson 5322bf2790 ALSA: HDA: Fix volume control indices for Mics (Realtek)
If more than one mic is present with different locations,
e g "Front Mic" and "Rear Mic", they can use the same index (0),
since their names are different.

Previous behavior was to have "Front Mic" as index 1, causing it
to be ignored by e g PulseAudio.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 10:57:24 +01:00
David Henningsson 5f99f86a80 ALSA: HDA: Rename "Mic Boost" to "Mic Boost Volume"
BugLink: http://bugs.launchpad.net/bugs/697240

If the "Volume" suffix is not given, alsa-lib gets confused and
loses the dB information at the simple element level.

Boosts generally affects both playback and capture, as they are
applied early in the chain. Hence no "Playback" or "Capture" in
the suffix.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 10:53:34 +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
Andreas Mohr 689c69120e ALSA: azt3328: improve snd_azf3328_codec_setdmaa()
- add some WARN_ONCE
- add multi-I/O helper (and use helper struct)
- fix off-by-1 DMA length bug
- better variable naming

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-02 11:11:38 +01:00
Andreas Mohr da237f35a8 ALSA: azt3328: use proper private_data hookup for codec identification
- much improved implementation due to clean codec hierarchy
- preparation for potential per-codec spinlock change

NOTE: additionally removes a chip->pcm[codec_type] NULL ptr check
(due to it requiring access to external chip struct),
however I believe this to be ok since this condition should not occur
and most drivers don't check against that either.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-02 11:11:24 +01:00
Andreas Mohr 345855951a ALSA: azt3328: use a helper variable to remove one indirection in hotpath
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-02 11:09:43 +01:00
Andreas Mohr 9fd8d36caa ALSA: azt3328: cosmetics: use a helper variable for codec setup
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-02 11:09:18 +01:00
Andreas Mohr 8d9a114e6d ALSA: azt3328: _setfmt() update
- use a separate variable for the frequency part, don't always "or" it
- use a "clever"(?) macro to shorten the code

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-02 11:08:09 +01:00
Andreas Mohr adf5931f8c ALSA: azt3328: cosmetics, minor updates
- correct samples to be POSIX shell compatible
- add logging of jiffies value in _pointer()
- several comments
- cleanup

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-02 11:07:45 +01:00
Daniel T Chen e03fa055bc ALSA: hda: Use LPIB quirk for Dell Inspiron m101z/1120
Sjoerd Simons reports that, without using position_fix=1, recording
experiences overruns. Work around that by applying the LPIB quirk
for his hardware.

Reported-and-tested-by: Sjoerd Simons <sjoerd@debian.org>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-30 13:26:19 +01:00
Jesper Juhl c521dde6a6 sound, ca0106: Fix assignment to 'channel'.
The assignment to the local variable 'channel' in
snd_ca0106_pcm_pointer_capture() is a little crazy.  Order of assignment is
undefined. This fixes it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-12-27 15:09:53 +01:00
Jon Mason 1d3c16a818 PCI: make pci_restore_state return void
pci_restore_state only ever returns 0, thus there is no benefit in
having it return any value.  Also, a large majority of the callers do
not check the return code of pci_restore_state.  Make the
pci_restore_state a void return and avoid the overhead.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-12-23 12:53:09 -08:00
Takashi Iwai 7039c74cb5 ALSA: hda - Fix GPIO2-fixup for Sony laptops
The fix-up entries by the commit 2785591a97
     ALSA: hda - Add fix-up for Sony VAIO with ALC275 codecs
weren't applied in the right position.  They had to be before the quirk
entry matching to all Sony devices.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-23 16:35:34 +01:00
Takashi Iwai 1afe206ab6 ALSA: hda - Try to find an empty control index when it's occupied
When a mixer control element was already created with the given name,
try to find another index for avoiding conflicts, instead of breaking
with an error.  This makes the driver more robust.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-23 10:22:55 +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
Jiri Kosina 4b7bd36470 Merge branch 'master' into for-next
Conflicts:
	MAINTAINERS
	arch/arm/mach-omap2/pm24xx.c
	drivers/scsi/bfa/bfa_fcpim.c

Needed to update to apply fixes for which the old branch was too
outdated.
2010-12-22 18:57:02 +01:00
Kailang Yang c793bec550 ALSA: hda - Don't apply ALC269-specific initialization to ALC275
ALC275 doesn't require the ALC269 (and its variants) specific init
sequences.  Add the check of codec id.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-21 09:14:13 +01:00
Kailang Yang 2785591a97 ALSA: hda - Add fix-up for Sony VAIO with ALC275 codecs
Set GPIO2 for some Sony VAIO with ALC275 to fix speaker output.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-21 09:13:11 +01:00
David Henningsson 10528020d7 ALSA: HDA: Rename "e-Mic" and "i-Mic" to "Mic" and "Internal Mic"
Change non-standard mic control names to standard control names
to clean up the namespace.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-20 14:59:43 +01:00
David Henningsson 8607f7c424 ALSA: HDA: Rename "Ext Mic" and "External Mic" to "Mic"
Usually external microphones are just labelled "Mic", so rename
"Ext Mic" and "External Mic" to "Mic" to clear up the namespace.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-20 14:59:32 +01:00
David Henningsson 28c4edb71d ALSA: HDA: Rename "Int Mic" to "Internal Mic"
"Int Mic" and "Internal Mic" both mean the same thing, so rename
the former to the latter in order to clean up the namespace a little.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-20 14:59:16 +01:00
Takashi Iwai 67c6dc4df1 Merge branch 'fix/hda' into topic/hda 2010-12-20 10:28:51 +01:00
David Henningsson 022c92befa ALSA: HDA: Add auto-mute for Thinkpad SL410/SL510
BugLink: http://launchpad.net/bugs/580006

SKU turns off auto-mute for these machines, so ignore the SKU.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-20 10:28:29 +01:00
Takashi Iwai 53e8c3239b ALSA: hda - Fix conflict of Mic Boot controls
Due to the recent change for multiple mics assignment, we need to handle
the index of each Mic Boost control respectively.  Otherwise the driver
gets the control element conflicts, and gives the unsable state.

Reference: kernel bug 25002
	https://bugzilla.kernel.org/show_bug.cgi?id=25002

Reported-and-tested-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-17 15:23:41 +01:00
Takashi Iwai 30fac30103 ALSA: hda - Clean up dead code in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-16 17:56:00 +01:00
Anisse Astier eeb433876c ALSA: hda - factorize an automute_mic realtek quirk function
Multiple quirk functions were using the exact same code to verify if the Mic
jack was plugged and mute the Mic accordingly

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-16 17:19:42 +01:00
David Henningsson ac61240793 ALSA: HDA: Enable subwoofer on Asus G73Jw
Set default association/sequence right on pin 0x17 in order for
the automatic parser to recognize the subwoofer correctly.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-15 09:45:36 +01:00
David Henningsson fe67b24010 ALSA: HDA: Fix auto-mute on Lenovo Edge 14
BugLink: http://launchpad.net/bugs/690530

The SKU value of this machine dictates that auto-mute should be
disabled. Since the SKU value is similar to the PCI SSID, the most
likely conclusion is that the SKU value should be ignored.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-15 08:17:30 +01:00
Takashi Iwai fbb5bb5639 ALSA: hda - Mute speakers when line-out jack is plugged with Conexant auto mode
Mute speakers when a line-out jack is plugged as well as headphone jacks
with the new Conexant codec parser in the auto mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-13 12:50:25 +01:00
Takashi Iwai 354d14b3f5 Merge branch 'topic/workq-update' into topic/misc 2010-12-13 09:29:52 +01:00
Tejun Heo 5b84ba26a9 sound: don't use flush_scheduled_work()
flush_scheduled_work() is deprecated and scheduled to be removed.

* cancel[_delayed]_work() + flush_scheduled_work() ->
  cancel[_delayed]_work_sync().

* wm8350, wm8753 and soc-core use custom code to cancel a delayed
  work, execute it immediately if it was pending and wait for its
  completion.  This is equivalent to flush_delayed_work_sync().  Use
  it instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-13 09:22:44 +01:00
Brian Bloniarz 93430096f9 ALSA: ice1712 - working M-Audio Delta 66E support
Rev. E of the M-Audio Delta 66 is partially supported (commit
ef2cd2ccad), but the layout of the GPIO
pins was still unclear. This patch adds the GPIO definitions so that
communication to the CS8247 & 2x AK4524 works correctly.

ALSA bug#3327 has more details; users cap & jhunt report there that the
GPIO wiring is similar to the Digigram VX442 (chip select: pin 4 =
CS8427, pin 5 = AK4524 #0, pin 6 = AK4524 #1).  There has been a lot of
conflicting information in the bug, but given these definitions, my
Delta 66E works; I tested analog in&out at 44.1kHz & 96kHz, analog gain
settings, S/PDIF clock sync, and S/PDIF in&out at 44.1kHz.

Signed-off-by: Brian Bloniarz <brian.bloniarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-09 08:40:01 +01:00
David Henningsson 8a96b1e020 ALSA: HDA: Quirk for Dell Vostro 320 to make microphone work
BugLink: http://launchpad.net/497546

Confirmed that the ideapad model works better than the current
quirk for Dell Vostro 320.

Cc: stable@kernel.org (2.6.35+)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-09 08:23:31 +01:00
Todd Broch 6be7948ff4 ALSA: hda: Add fixup for mario system
create fixup function for the mario model and override amp capabilities
for NID 0x2

Signed-off-by: Todd Broch <tbroch@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-09 07:33:36 +01:00
Todd Broch e1eb5f1006 ALSA: hda: Add modelname lookup and fixup for realtek codecs
Facilitate fixup for realtek codecs via modelname lookup of fixup
data.  Fallback to quirk based lookup in absence of model definition.

Signed-off-by: Todd Broch <tbroch@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-09 07:23:01 +01:00
David Henningsson 116dcde638 ALSA: HDA: Remove unconnected PCM devices for Intel HDMI
Some newer chips have more than one HDMI output, but usually not
all of them are exposed as physical jacks. Removing the unused
PCM devices (as indicated by BIOS in the pin config default) will
reduce user confusion as they currently have to choose between
several HDMI devices, some of them not working anyway.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-08 09:13:43 +01:00
Takashi Iwai d0fa15e098 Merge branch 'fix/hda' into topic/hda 2010-12-08 09:07:38 +01:00
Anssi Hannula 0bbaee3a58 ALSA: hda - Reset sample sizes and max bitrates when reading ELD
When a new HDMI/DP device is plugged in, hdmi_update_short_audio_desc()
is called for every SAD (Short Audio Descriptor) in the ELD data. For
LPCM coding type SAD defines the supported sample sizes. For several
other coding types (such as AC-3), a maximum bitrate is defined.

The maximum bitrate and sample size fields are not always cleared.
Therefore, if a device is unplugged and a different one is plugged in,
and the coding types of some SAD positions differ between the devices,
the old max_bitrate or sample_bits values will persist if the new SADs
do not define those values.

The leftover max_bitrate and sample_bits do not cause any issues other
than wrongly showing up in eld#X.Y procfs file and kernel log.

Fix that by always clearing sample_bits and max_bitrate when reading
SADs.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-08 08:36:20 +01:00
Anssi Hannula 3dc8642903 ALSA: hda - Always allow basic audio irrespective of ELD info
Commit bbbe33900d added functionality to restrict PCM parameters
based on ELD info (derived from EDID data) of the audio sink.

However, according to CEA-861-D no SAD is needed for basic audio
(32/44.1/48kHz stereo 16-bit audio), which is instead indicated with a
basic audio flag in the CEA EDID Extension.

The flag is not present in ELD. However, as all audio capable sinks are
required to support basic audio, we can assume it to be always
available.

Fix allowed audio formats with sinks that have SADs (Short Audio
Descriptors) which do not completely overlap with the basic audio
formats (there are no reports of affected devices so far) by always
assuming that basic audio is supported.

Reported-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-07 20:13:22 +01:00
Anssi Hannula 4b0dbdb17f ALSA: hda - Do not wrongly restrict min_channels based on ELD
Commit bbbe33900d added functionality to restrict PCM parameters
based on ELD info (derived from EDID data) of the audio sink.

However, it wrongly assumes that the bits 0-2 of the first byte of
CEA Short Audio Descriptors mean a supported number of channels. In
reality, they mean the maximum number of channels (as per CEA-861-D
7.5.2). This means that the channel count can only be used to restrict
max_channels, not min_channels.

Restricting min_channels causes us to deny opening the device in stereo
mode if the sink only has SADs that declare larger numbers of channels
(like Primare SP32 AV Processor does).

Fix that by not restricting min_channels based on ELD information.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Reported-by: Jean-Yves Avenard <jyavenard@gmail.com>
Tested-by: Jean-Yves Avenard <jyavenard@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-07 20:12:58 +01:00
Clemens Ladisch de66493693 ALSA: oxygen: update hardware comments
Reformat and update the comments that describe the hardware connections
on the various models.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:48:43 +01:00
Clemens Ladisch e2943efa4f ALSA: oxygen: show correct package ID
Instead of the hardcoded "CMI8788", show the actual chip name.

Note: This is neither what the chip is (it's always the same),
      nor what the chip is actually called.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:48:34 +01:00
Clemens Ladisch 9719fcaa6a ALSA: oxygen: allow to dump codec registers
To help with debugging, add the registers of the model-specific
codecs to the controller and AC97 register dump in the proc file.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:48:15 +01:00
Clemens Ladisch e96f38f732 ALSA: virtuoso: fix front panel routing for D1/DX/ST(X)
The "Front Panel" switch on the Xonar D1/DX actually switches only the
output direction, so mark it appropriately.

The front panel microphone is controlled by the FMIC2MIC bit of the
CM9780.  It was unconditionally enabled on the D1/DX and never set on
the ST(X); add a control for it.  Selecting the front panel microphone
as source does not actually disable the microphone jack, but this is
bug-compatible with the Windows driver, and users rely on it.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:48:08 +01:00
Clemens Ladisch 2509ec623d ALSA: virtuoso: add HDMI enable switch for HDAV1.3
The GPIO bit that enables analog output on the Xonar HDAV1.3 also
disables the HDMI audio output, so we better add a switch for it.
Hopefully, this is sufficient to make the HDMI output work.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:47:58 +01:00
Clemens Ladisch f7e4bad74e ALSA: virtuoso: initialize unknown GPIO bits
Initialize the configuration of some unknown GPIO output bits (that
might not be used at all) to be the same as in the Windows driver, just
to be sure.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:47:50 +01:00
Daniel T Chen dd5a089edf ALSA: hda: Use position_fix=1 for Acer Aspire 5538 to enable capture on internal mic
BugLink: https://launchpad.net/bugs/685161

The reporter of the bug states that he must use position_fix=1 to enable
capture for the internal microphone, so set it for his machine's PCI
SSID.  Verified using 2.6.35 and the 2010-12-04 alsa-driver build.

Reported-and-tested-by: Ralph Wabel <rwabel@gmx.net>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 10:34:09 +01:00
Anssi Hannula 36e9c135e2 ALSA: hda - use generic hdmi parser for ATI R6xx codec
Switch to the generic hdmi parser for codec id 1002:aa01 (ATI R6xx
HDMI), as the codec appears to work fine with it.

Note that the codec is still limited to stereo output only, despite it
reportedly being multichannel capable. Some as of yet unknown quirks
will be needed to get that working.

Testing was done on 2.6.36 by John Ettedgui.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Tested-by: John Ettedgui <john.ettedgui@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-05 11:52:22 +01:00
Manoj Iyer ef61d4e6d8 ALSA: hda - Enable jack sense for Thinkpad Edge 13
Added a quirk to cxt5066_cfg_tbl to enable jack sense for ThinkPad Edge 13.

Reference: http://launchpad.net/bugs/685015

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-04 08:58:36 +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
Takashi Iwai a3de8ab885 ALSA: hda - Clean up cxt5066 port-D handling & co
Instead of hard-coded magic numbers, properly define and use macros
for improve the readability.  Also, dell_automute is handled samely
as thinkpad, since it also sets port_d_mode, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-03 12:32:02 +01:00
Takashi Iwai 4c98ec1170 Merge branch 'fix/hda' into topic/hda 2010-12-03 12:27:47 +01:00
John Baboval 3a253445e3 ALSA: hda - Fix ThinkPad T410[s] docking station line-out
On the docking station for the Lenovo T410 and T410s, the line-out 
doesn't work. The trouble seems to be that it generates a plug event, 
but then doesn't report that the jack is connected. So automute mutes 
the jack when you plug something into it. The following patch (next 
message) fixes it.

Signed-off-by: John Baboval <john.baboval at virtualcomputer.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-03 12:27:11 +01:00
Daniel T Chen 77c4d5cdb8 ALSA: hda: Use model=lg quirk for LG P1 Express to enable playback and capture
BugLink: https://launchpad.net/bugs/595482

The original reporter states that audible playback from the internal
speaker is inaudible despite the hardware being properly detected.  To
work around this symptom, he uses the model=lg quirk to properly enable
both playback, capture, and jack sense.  Another user corroborates this
workaround on separate hardware.  Add this PCI SSID to the quirk table
to enable it for further LG P1 Expresses.

Reported-and-tested-by: Philip Peitsch <philip.peitsch@gmail.com>
Tested-by: nikhov
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-03 11:28:01 +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
Florian Faber 28b26e1553 ALSA: hdsp - Add support for RPM io box
Add support for the RME HDSP RPM IO box. Changes have been made in the identification of the IO box and the neccessary controls have been added.

Signed-off-by: Florian Faber <faberman@linuxproaudio.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-01 12:14:47 +01:00
Takashi Iwai dc42717075 ALSA: hda - Remove dead md2 quirk code
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-29 08:12:43 +01:00
Takashi Iwai ca19e77e44 Merge branch 'fix/hda' into topic/hda 2010-11-29 07:44:01 +01:00
Daniel T Chen ac70eb1305 ALSA: hda: Use BIOS auto-parsing instead of existing model quirk for MEDION MD2
BugLink: https://launchpad.net/bugs/682199

A 2.6.35 (Ubuntu Maverick) user, burningphantom1, reported a regression
in audio: playback was inaudible through both speakers and headphones.
In commit 272a527c04 of sound-2.6.git, a new model was added with this
machine's PCI SSID.  Fortunately, it is now sufficient to use the auto
model for BIOS auto-parsing instead of the existing quirk.

Playback, capture, and jack sense were verified working for both
2.6.35 and the alsa-driver snapshot from 2010-11-27 when model=auto is
used.

Reported-and-tested-by: burningphantom1
Cc: <stable@kernel.org> [2.6.35+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-29 07:41:09 +01:00
Takashi Iwai 5a8cfb4e8a ALSA: hda - Use ALC_INIT_DEFAULT for really default initialization
When SKU assid gives no valid bits for 0x38, the driver didn't take
any action, so far.  This resulted in the missing initialization for
external amps, etc, thus the silent output in the end.

Especially users hit this problem on ALC888 newly since 2.6.35,
where the driver doesn't force to use ALC_INIT_DEFAULT any more.

This patch sets the default initialization scheme to use
ALC_INIT_DEFAULT when no valid bits are set for SKU assid.

Reference:
	https://bugzilla.redhat.com/show_bug.cgi?id=657388

Reported-and-tested-by: Kyle McMartin <kyle@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-26 17:11:18 +01:00
Herton Ronaldo Krzesinski 7167594a3d ALSA: hda - Fix ALC660-VD/ALC861-VD capture/playback mixers
The mixer nids passed to alc_auto_create_input_ctls are wrong: 0x15 is
a pin, and 0x09 is the ADC on both ALC660-VD/ALC861-VD. Thus with
current code, input playback volume/switches and input source mixer
controls are not created, and recording doesn't work. Select correct
mixers, 0x0b (input playback mixer) and 0x22 (capture source mixer).

Reference: https://qa.mandriva.com/show_bug.cgi?id=61159

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-25 08:23:07 +01:00
David Henningsson cc1c452e50 ALSA: HDA: Add an extra DAC for Realtek ALC887-VD
The patch enables ALC887-VD to use the DAC at nid 0x26,
which makes it possible to use this DAC for e g Headphone
volume.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-24 15:17:45 +01:00
Denis Kuplyakov d94772070a ALSA: hda - Fix Acer 7730G support
Fixes automatic EAPD configuration on Acer 7730G laptop.

Signed-off-by: Denis Kuplyakov <dener.kup@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-24 06:04:12 +01:00
Kailang Yang 48c88e820f ALSA: hda - Identify more variants for ALC269
Give more correct chip names for ALC269-variant codecs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-23 08:56:16 +01:00
Kailang Yang 1657cbd871 ALSA: hda - Fix wrong ALC269 variant check
The refactoring commit d433a67831
    ALSA: hda - Optimize the check of ALC269 codec variants
introduced a wrong check for ALC269-vb type.  This patch corrects it.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-23 08:55:11 +01:00
Manoj Iyer 6027277e77 ALSA: hda - Enable jack sense for Thinkpad Edge 11
Add a quirk entry for Thinkpad Edge 11 as well as other TP Edge models.

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-23 07:43:44 +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
Takashi Iwai 9d57883f08 ALSA: hda - Add a generic fixup callback for Realtek codecs
Add a generic callback function for fixup elements.  This can be used
to do some unusual things like overriding the AMP cache, etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 13:29:19 +01:00
Kailang Yang 01e0f1378c ALSA: hda - Fixed ALC887-VD initial error
ALC887-VD is like ALC888-VD. It can not be initialized as ALC882.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 10:59:36 +01:00
Daniel T Chen 673f7a8984 ALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J
BugLink: https://launchpad.net/bugs/677652

The original reporter states that, in 2.6.35, headphones do not appear
to work, nor does inserting them mute the A52J's onboard speakers.  Upon
inspecting the codec dump, it appears that the newly committed hp-laptop
quirk will suffice to enable this basic functionality.  Testing was done
with an alsa-driver build from 2010-11-21.

Reported-and-tested-by: Joan Creus
Cc: <stable@kernel.org> [2.6.35+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 10:56:54 +01:00
Andreas Mohr 78ac07b0d2 ALSA: azt3328: period bug fix (for PA), add missing ACK on stop timer
. Fix PulseAudio "ALSA driver bug" issue
  (if we have two alternated areas within a 64k DMA buffer, then max
  period size should obviously be 32k only).
  Back references:
   http://pulseaudio.org/wiki/AlsaIssues
   http://fedoraproject.org/wiki/Features/GlitchFreeAudio
. In stop timer function, need to supply ACK in the timer control byte.
. Minor log output correction

When I did my first PA testing recently, the period size bug resulted
in quite precisely observeable half-period-based playback distortion.

PA-based operation is quite a bit more underrun-prone (despite its
zero-copy optimizations etc.) than raw ALSA with this rather spartan
sound hardware implementation on my puny Athlon.

Note that even with this patch, azt3328 still doesn't work for both
cases yet, PA tsched=0 and tsched
(on tsched=0 it will playback tiny fragments of periods, leading to tiny
stuttering sounds with some pauses in between, whereas with
timer-scheduled operation playback works fine - minus some quite increased
underrun trouble on PA vs. ALSA, that is).

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 10:56:53 +01:00
Daniel T Chen a0e90acc65 ALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup
BugLink: https://launchpad.net/bugs/677830

The original reporter states that the subwoofer does not mute when
inserting headphones.  We need an entry for his machine's SSID in the
subwoofer pin fixup list, so add it there (verified using hda_analyzer).

Reported-and-tested-by: i-NoD
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 10:56:52 +01:00
Clemens Ladisch 075140ea8b ALSA: oxygen: support for period wakeup disabling
Allow disabling period wakeup interrupts for all PCM streams.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 08:13:54 +01:00
Clemens Ladisch 7bb8fb70c4 ALSA: hda-intel: support for period wakeup disabling
Allow disabling period wakeup interrupts for HDA PCM streams.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 08:13:34 +01:00
Takashi Iwai d2b88e4c10 Merge branch 'fix/misc' into topic/misc 2010-11-22 08:11:10 +01:00
Daniel T Chen a1d71a2c91 ALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J
BugLink: https://launchpad.net/bugs/677652

The original reporter states that, in 2.6.35, headphones do not appear
to work, nor does inserting them mute the A52J's onboard speakers.  Upon
inspecting the codec dump, it appears that the newly committed hp-laptop
quirk will suffice to enable this basic functionality.  Testing was done
with an alsa-driver build from 2010-11-21.

Reported-and-tested-by: Joan Creus
Cc: <stable@kernel.org> [2.6.35+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:55:43 +01:00
Andreas Mohr 7974150c85 ALSA: azt3328: period bug fix (for PA), add missing ACK on stop timer
. Fix PulseAudio "ALSA driver bug" issue
  (if we have two alternated areas within a 64k DMA buffer, then max
  period size should obviously be 32k only).
  Back references:
   http://pulseaudio.org/wiki/AlsaIssues
   http://fedoraproject.org/wiki/Features/GlitchFreeAudio
. In stop timer function, need to supply ACK in the timer control byte.
. Minor log output correction

When I did my first PA testing recently, the period size bug resulted
in quite precisely observeable half-period-based playback distortion.

PA-based operation is quite a bit more underrun-prone (despite its
zero-copy optimizations etc.) than raw ALSA with this rather spartan
sound hardware implementation on my puny Athlon.

Note that even with this patch, azt3328 still doesn't work for both
cases yet, PA tsched=0 and tsched
(on tsched=0 it will playback tiny fragments of periods, leading to tiny
stuttering sounds with some pauses in between, whereas with
timer-scheduled operation playback works fine - minus some quite increased
underrun trouble on PA vs. ALSA, that is).

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:54:45 +01:00
Daniel T Chen 86cbbad2b6 ALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup
BugLink: https://launchpad.net/bugs/677830

The original reporter states that the subwoofer does not mute when
inserting headphones.  We need an entry for his machine's SSID in the
subwoofer pin fixup list, so add it there (verified using hda_analyzer).

Reported-and-tested-by: i-NoD
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:52:56 +01:00
David Henningsson 03b7a1ab55 ALSA: HDA: Create mixers on ALC887
BugLink: http://launchpad.net/bugs/669092

ALC887 does not have any volume control ability on the mixer NIDs,
so put the volume controls on the dac NIDs instead. Without this
patch, ALC887 users cannot use alsamixer at all.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:45:08 +01:00
Joe Perches 5dbea6b1f2 ALSA: sound/pci/asihpi/hpioctl.c: Remove unnecessary casts of pci_get_drvdata
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:42:10 +01:00
Daniel T Chen 0613a59456 ALSA: ac97: Apply quirk for Dell Latitude D610 binding Master and Headphone controls
BugLink: https://launchpad.net/bugs/669279

The original reporter states: "The Master mixer does not change the
volume from the headphone output (which is affected by the headphone
mixer). Instead it only seems to control the on-board speaker volume.
This confuses PulseAudio greatly as the Master channel is merged into
the volume mix."

Fix this symptom by applying the hp_only quirk for the reporter's SSID.
The fix is applicable to all stable kernels.

Reported-and-tested-by: Ben Gamari <bgamari@gmail.com>
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-11-22 07:39:40 +01:00
Julia Lawall fa2b30af84 ALSA: sound/pci/ctxfi/ctpcm.c: Remove potential for use after free
In each function, the value apcm is stored in the private_data field of
runtime.  At the same time the function ct_atc_pcm_free_substream is stored
in the private_free field of the same structure.  ct_atc_pcm_free_substream
dereferences and ultimately frees the value in the private_data field.  But
each function can exit in an error case with apcm having been freed, in
which case a subsequent call to the private_free function would perform a
dereference after free.  On the other hand, if the private_free field is
not initialized, it is NULL, and not invoked (see snd_pcm_detach_substream
in sound/core/pcm.c).  To avoid the introduction of a dangling pointer, the
initializations of the private_data and private_free fields are moved to
the end of the function, past any possible free of apcm.  This is safe
because the previous calls to snd_pcm_hw_constraint_integer and
snd_pcm_hw_constraint_minmax, which take runtime as an argument, do not
refer to either of these fields.

In each function, there is one error case where apcm needs to be freed, and
a call to kfree is added.

The sematic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,e1,e2,e3;
identifier f,free1,free2;
expression a;
@@

*e->f = a
... when != e->f = e1
    when any
if (...) {
  ... when != free1(...,e,...)
      when != e->f = e2
* kfree(a)
  ... when != free2(...,e,...)
      when != e->f = e3
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-11 02:03:00 +01:00
Florian Fainelli e916151201 ALSA: sound/mixart: avoid redefining {readl,write}_{le,be} accessors
If the platform already provides a definition for these accessors
do not redefine them. The warning was caught on MIPS.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-11 02:02:20 +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
Takashi Iwai 69dbdd8195 Merge branch 'fix/asoc' into for-linus 2010-11-03 15:51:26 +01:00
Clemens Ladisch 2146dcfd15 ALSA: oxygen: add HiFier Serenade support
Add support for the TempoTec/MediaTek HiFier Serenade sound card.

The PCI ID was already there, but the driver handled it like the
Fantasia model, which resulted in a dummy recording device.  As
a stereo output-only card, this model is to be handled exactly
like the HG2PCI.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03 14:57:32 +01:00
Clemens Ladisch 18f24839f1 ALSA: oxygen: reorganize PCI IDs
Sort the PCI IDs so that they make logical sense.  Also move the card
name comments into this list because the model symbols should be (more)
self-explanationary.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03 14:56:04 +01:00
Clemens Ladisch 31f86bacfc ALSA: oxygen: add Kuroutoshikou CMI8787-HG2PCI support
Add support for the Kuroutoshikou CMI8787-HG2PCI sound card.

[replaced non-latin letters in the patch by tiwai]

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03 08:26:13 +01:00
Clemens Ladisch 45c1de8e20 ALSA: oxygen: merge HiFier driver into snd-oxygen
The snd-hifier driver contains more duplicated code than model-specific
code, so it does not make sense for it to be a separate driver.
Handling the two-channel output restriction can be easily done in the
generic driver.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03 08:19:11 +01:00
Takashi Iwai e6d06e085b Merge branch 'fix/misc' into topic/misc 2010-11-03 08:17:18 +01:00
Edgar (gimli) Hucek 87232dd49a ALSA: hda - MacBookAir3,1(3,2) alsa support
This patch add support for the MacBookAir3,1 and MacBookAir3,2 to the alsa
sound system.

Signed-off-by: Edgar (gimli) Hucek <gimli@dark-green.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03 08:15:40 +01:00
Jesper Juhl fd0977d0f4 ALSA: asihpi - Unsafe memory management when allocating control cache
I noticed that sound/pci/asihpi/hpicmn.c::hpi_alloc_control_cache() does
not check the return value from kmalloc(), which may fail.
If kmalloc() fails we'll dereference a null pointer and things will go bad
fast.
There are two memory allocations in that function and there's also the
problem that the first may succeed and the second may fail and nothing is
done about that either which will also go wrong down the line.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Eliot Blennerhassett <linux@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-02 07:38:21 +01:00
Uwe Kleine-König b595076a18 tree-wide: fix comment/printk typos
"gadget", "through", "command", "maintain", "maintain", "controller", "address",
"between", "initiali[zs]e", "instead", "function", "select", "already",
"equal", "access", "management", "hierarchy", "registration", "interest",
"relative", "memory", "offset", "already",

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-11-01 15:38:34 -04:00
Tim Blechmann f746745229 ALSA: lx6464es - make 1 bit signed bitfield unsigned
converts a 1 bit signed bitfield to an unsigned.

Reported-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-01 10:28:35 +01:00
Jesper Juhl bb617ee3f8 ALSA: cs46xx memory management fixes for cs46xx_dsp_spos_create()
When reading through sound/pci/cs46xx/dsp_spos.c I noticed a couple of
things in cs46xx_dsp_spos_create().

It seems to me that we don't always free the various memory buffers we
allocate and we also do some work (structure member assignment) early,
that is completely pointless if some of the memory allocations fail and
we end up just aborting the whole thing.

I don't have hardware to test, so the patch below is compile tested only,
but it makes the following changes:

- Make sure we always free all allocated memory on failures.
- Don't do pointless work assigning to structure members before we know
  all memory allocations, that may abort progress, have completed
  successfully.
- Remove some trailing whitespace.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-01 10:26:23 +01:00
Linus Torvalds 7c5814c719 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: usb-audio: automatically detect feedback format
  ASoC: sound/wm9090: add missing __devexit marker
  ASoC: sound/max98088: add missing __devexit marker
  ASoC: sound/ad73311: add missing __devexit marker
  ASoC: fsl - fix build error in pcm030-audio-fabric.c
  sound/oss/sb_ess.c: delete double assignment
  ALSA: hda - Change BTL amp level on some HP notebooks
2010-10-27 18:52:49 -07: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
Linus Torvalds 33081adf8b 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: (365 commits)
  ALSA: hda - Disable sticky PCM stream assignment for AD codecs
  ALSA: usb - Creative USB X-Fi volume knob support
  ALSA: ca0106: Use card specific dac id for mute controls.
  ALSA: ca0106: Allow different sound cards to use different SPI channel mappings.
  ALSA: ca0106: Create a nice spot for mapping channels to dacs.
  ALSA: ca0106: Move enabling of front dac out of hardcoded setup sequence.
  ALSA: ca0106: Pull out dac powering routine into separate function.
  ALSA: ca0106 - add Sound Blaster 5.1vx info.
  ASoC: tlv320dac33: Use usleep_range for delays
  ALSA: usb-audio: add Novation Launchpad support
  ALSA: hda - Add workarounds for CT-IBG controllers
  ALSA: hda - Fix wrong TLV mute bit for STAC/IDT codecs
  ASoC: tpa6130a2: Error handling for broken chip
  ASoC: max98088: Staticise m98088_eq_band
  ASoC: soc-core: Fix codec->name memory leak
  ALSA: hda - Apply ideapad quirk to Acer laptops with Cxt5066
  ALSA: hda - Add some workarounds for Creative IBG
  ALSA: hda - Fix wrong SPDIF NID assignment for CA0110
  ALSA: hda - Fix codec rename rules for ALC662-compatible codecs
  ALSA: hda - Add alc_init_jacks() call to other codecs
  ...
2010-10-25 08:32:05 -07:00
Takashi Iwai 506ecbca71 Merge branch 'topic/hda' into for-linus 2010-10-25 10:40:05 +02:00
Takashi Iwai 0e7adbe263 ALSA: hda - Disable sticky PCM stream assignment for AD codecs
The sticky PCM stream assignment introduced in 2.6.36 kernel seems
causing problems on AD codecs.  At some time later, the streaming no
longer works by unknown reason.  A simple workaround is to disable
sticky-assignment for these codecs.

Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-25 10:39:23 +02:00
Linus Torvalds 229aebb873 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
  Update broken web addresses in arch directory.
  Update broken web addresses in the kernel.
  Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
  Revert "Fix typo: configuation => configuration" partially
  ida: document IDA_BITMAP_LONGS calculation
  ext2: fix a typo on comment in ext2/inode.c
  drivers/scsi: Remove unnecessary casts of private_data
  drivers/s390: Remove unnecessary casts of private_data
  net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
  drivers/infiniband: Remove unnecessary casts of private_data
  drivers/gpu/drm: Remove unnecessary casts of private_data
  kernel/pm_qos_params.c: Remove unnecessary casts of private_data
  fs/ecryptfs: Remove unnecessary casts of private_data
  fs/seq_file.c: Remove unnecessary casts of private_data
  arm: uengine.c: remove C99 comments
  arm: scoop.c: remove C99 comments
  Fix typo configue => configure in comments
  Fix typo: configuation => configuration
  Fix typo interrest[ing|ed] => interest[ing|ed]
  Fix various typos of valid in comments
  ...

Fix up trivial conflicts in:
	drivers/char/ipmi/ipmi_si_intf.c
	drivers/usb/gadget/rndis.c
	net/irda/irnet/irnet_ppp.c
2010-10-24 13:41:39 -07:00
Andy Owen 64e5310a24 ALSA: ca0106: Use card specific dac id for mute controls.
Signed-off-by: Andy Owen <andy-alsa@ultra-premium.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-23 16:59:53 +02:00
Andy Owen 6fef153afa ALSA: ca0106: Allow different sound cards to use different SPI channel mappings.
Signed-off-by: Andy Owen <andy-alsa@ultra-premium.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-23 16:59:40 +02:00
Andy Owen 861391d3a0 ALSA: ca0106: Create a nice spot for mapping channels to dacs.
This is to allow a future patch to have card specific mappings between
dacs, which is required since the Sound Blaster 5.1vx seems to have a
different mapping to what was previously used.

Signed-off-by: Andy Owen <andy-alsa@ultra-premium.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-23 16:59:16 +02:00
Andy Owen 9bfd94132d ALSA: ca0106: Move enabling of front dac out of hardcoded setup sequence.
Signed-off-by: Andy Owen <andy-alsa@ultra-premium.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-23 16:58:50 +02:00
Andy Owen 51630142ed ALSA: ca0106: Pull out dac powering routine into separate function.
This is ground work for a future commit where cards (such as the Sound
Blaster 5.1vx) have different mappings between dacs and channels.

Signed-off-by: Andy Owen <andy-alsa@ultra-premium.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-23 16:58:30 +02:00
Andy Owen 23156e8fae ALSA: ca0106 - add Sound Blaster 5.1vx info.
Signed-off-by: Andy Owen <andy-alsa@ultra-premium.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-23 16:57:52 +02:00
Takashi Iwai 62b7e5e09b ALSA: hda - Add workarounds for CT-IBG controllers
Creative IBG controllers require the playback stream-tags to be started
from 1, instead of capture+1.  Otherwise the stream stalls.

Reported-by: Wai Yew CHAY <wychay@ctl.creative.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-22 17:15:47 +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
Takashi Iwai 00cd0bb730 ALSA: hda - Apply ideapad quirk to Acer laptops with Cxt5066
Multiple Acer laptops with the SSID 1025:04xx require the quirk
mode=ideapad, so let's use mask to apply to all these.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-21 09:57:40 +02:00
Takashi Iwai 14d34f166c ALSA: hda - Add some workarounds for Creative IBG
Creative HD-audio controller chips require some workarounds:
 - Additional delay before RIRB response
 - Set the initial RIRB counter to 0xc0

The latter seems to be done in general in Windows driver, so we may
use this value later for all types if it's confirmed to work better.

Reported-by: Wai Yew CHAY <wychay@ctl.creative.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-21 09:03:25 +02:00
Takashi Iwai 24b55c69b6 ALSA: hda - Fix wrong SPDIF NID assignment for CA0110
The dig_out_nid field must take a digital-converter widget, but the current
ca0110 parser passed the pin wrongly instead.

Reported-by: Wai Yew CHAY <wychay@ctl.creative.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-21 08:55:13 +02:00
Kailang Yang 693194f3b8 ALSA: hda - Fix codec rename rules for ALC662-compatible codecs
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-21 08:51:48 +02:00
Kailang Yang bf1b022588 ALSA: hda - Add alc_init_jacks() call to other codecs
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-21 08:50:50 +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
Justin P. Mattock 631dd1a885 Update broken web addresses in the kernel.
The patch below updates broken web addresses in the kernel

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Dimitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Acked-by: Ben Pfaff <blp@cs.stanford.edu>
Acked-by: Hans J. Koch <hjk@linutronix.de>
Reviewed-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-10-18 11:03:14 +02:00
Takashi Iwai c08d91695b ALSA: tlv - Define numbers in sound/tlv.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-17 10:46:14 +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
Takashi Iwai 84cc5c0bd3 Merge branch 'fix/misc' into topic/misc 2010-10-17 10:38:33 +02:00
David Henningsson c3d226ab8b ALSA: HDA: Apply SKU override for Acer aspire 7736z
BugLink: http://launchpad.net/bugs/617647

The current SKU value disables playback, so ignore the SKU value.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-17 10:22:39 +02:00
David Henningsson 906229174c ALSA: HDA: Enable SKU quirks for Realtek
Realtek have ways of specifying external amps and more via a
special nid or via the Codec's subsystem ID, this is called "SKU".
The computer manufacturer sometimes gets this wrong, so we need
to be able to override or ignore the SKU customization value.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-17 10:20:27 +02:00
Andrea Gelmini fa2eb005eb sound: fixed typos
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-17 10:08:27 +02:00
Daniel T Chen 2df03514de ALSA: hda: Add speaker pin to automute Acer Aspire 8943G
BugLink: https://bugs.launchpad.net/bugs/656625

Add clause for handling Acer Aspire 8943G's subwoofer as additional
speaker pin for automuting.

Reported-by: RussianNeuroMancer
Cc: stable@kernel.org
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-14 09:31:22 +02:00
David Henningsson bdd9ef24cd ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA controllers
Position_fix quirks for specific machines now override the default
position_fix behavior for all HDA controllers.

BugLink: http://launchpad.net/bugs/465942
BugLink: http://launchpad.net/bugs/580749
BugLink: http://launchpad.net/bugs/587546

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-12 13:05:02 +02:00
Takashi Iwai 6a92934d9e ALSA: hda - Add input volume control for each mic/line-in pin
The input pins on cirrus codecs have also input amps.  Let's make
control elemetns for them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-11 15:16:20 +02:00
Takashi Iwai f46119b734 ALSA: hda - Add model=mbp55 entry for MacBookPro 7,1
Reference: Novell bnc#645066
	https://bugzilla.novell.com/show_bug.cgi?id=645066

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-11 14:46:35 +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
Takashi Iwai 4e83998f5a Merge branch 'fix/misc' into topic/misc 2010-10-11 13:45:22 +02:00
Takashi Iwai dd1d3a49db ALSA: oxygen - Add a SSID for CMI8787-HG2PCI
This board has a strange PCI SSID 13f6:ffff.  Works as compabile as
MODEL_CMEDIA_REF.

Reported-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-06 17:28:56 +02:00
Clemens Ladisch ebebeece4b ALSA: oxygen: add PEX8111 initialization
Configure the PEX8111 bridge on the PCI Express cards so that the audio
DMA controller can do proper burst reads and is less likely to lose
data.  This is usually done automatically, but is required on older
cards where the user has not applied the PLX firmware update.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-06 16:27:18 +02:00
Clemens Ladisch 7cb4ced5aa ALSA: oxygen: rewrite PCIe bridge initialization
Change the PCIe/PCI bridge initialization code to configure only the
bridge that is actually connected to the sound chip, instead of any
bridge found in the system.  The new code also makes it easier to add
other bridges.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-06 16:27:12 +02:00
Clemens Ladisch 93943beb29 ALSA: oxygen: reduce minimum period count
The interrupt counter is independent of the buffer counter, so there are
no restrictions on the period size.  Having fewer periods also makes
PulseAudio happy.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-06 16:27:03 +02:00
Clemens Ladisch 9a0b379265 ALSA: oxygen: fix input monitor dB scale
The input monitor half volume bit results in a factor of 0.5, so the
minimum scale value should be -6 dB.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-05 18:11:23 +02:00
Clemens Ladisch de0074ee7a ALSA: oxygen: fix chip ID register symbols
Rename the symbol for the XCID pins, fix up a decimal/hex confusion for
the CMI8787 package ID, and add the other known package IDs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-05 18:11:22 +02:00
Clemens Ladisch d737f3eede ALSA: virtuoso: fix Xonar STX anti-pop delay
The anti-pop delay for the STX should be 800 ms, not 100 ms like the ST.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-05 18:11:20 +02:00
Clemens Ladisch 2b830bae1f ALSA: virtuoso: add HDAV1.3 Slim PCI ID
Add a PCI ID for the Xonar HDAV1.3 Slim.  There is no actual support,
but the presence of the ID allows the EEPROM repair code to work for
this card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-05 18:11:19 +02:00
Clemens Ladisch b6ca8ab399 ALSA: oxygen: handle CD input configuration with a flag
There are more models without a CD input than with one, so handle this
explicitly with a device_config flag to avoid having to define a control
filter callback to filter it out.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-05 18:11:17 +02:00
Clemens Ladisch 45bc307f32 ALSA: virtuoso: fix Xonar DS chip name
The controller on the Xonar DS is labeled "AV66", not "AV200".

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-05 18:11:15 +02:00
Valentine Sinitsyn d41185882b ALSA: hda - Added fixup for Lenovo Y550P
Signed-off-by: Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-04 08:42:24 +02:00
David Henningsson 4cb3631084 ALSA: HDA: Add position_fix=3 module option, and refactor related code
What was previously known as via_dmapos_patch, and hard-coded to be
used for VIA and ATI controllers, is now configurable through a module
option. The background is that some VIA controllers seem to prefer
via_dmapos_patch to be turned off.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-30 14:16:11 +02:00
Luke Yelavich c123e5e437 ALSA: hda - Add quirk for another Acer laptop with a CX20585 codec
BugLink: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/647374

Set another Acer laptop (SSID 1025:043d) to use CXT5066_IDEAPAD

Signed-off-by: Luke Yelavich <luke.yelavich@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-28 22:33:06 +02:00
Otavio Salvador e35d4b1195 ALSA: hda: add Vortex86MX PCI ids
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-27 07:57:31 +02:00
Takashi Iwai 3b23cd2875 Merge branch 'fix/hda' into for-linus 2010-09-25 17:57:53 +02:00
Dan Rosenberg e68d3b316a ALSA: sound/pci/rme9652: prevent reading uninitialized stack memory
The SNDRV_HDSP_IOCTL_GET_CONFIG_INFO and
SNDRV_HDSP_IOCTL_GET_CONFIG_INFO ioctls in hdspm.c and hdsp.c allow
unprivileged users to read uninitialized kernel stack memory, because
several fields of the hdsp{m}_config_info structs declared on the stack
are not altered or zeroed before being copied back to the user.  This
patch takes care of it.

Signed-off-by: Dan Rosenberg <dan.j.rosenberg@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-25 17:46:22 +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 fec88dea9d Merge branch 'fix/hda' into topic/hda 2010-09-24 09:12:21 +02:00
Takashi Iwai 01fdf1801e ALSA: hda - Fix auto-parse of SPDIF input of Realtek codecs
The SPDIF in audio widget must be searched through the list as the widget
that contains the given pin as the connection source.  The current code
was implemented in a reverse way.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-24 09:09:42 +02:00
Vince Weaver 4e7d7c6018 ALSA: hda - MacBookPro 5,3 line-in support
I've found the following patch is necessary to enable line-in on
my MacBookPro 5,3 machine.  With the patch applied I've successfully
recorded audio from the line-in jack.  This is based on the existing
5,5 support.

Signed-off-by: Vince Weaver <vweaver1@eecs.utk.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-23 19:40:46 +02:00
Erik J. Staab 0873a5ae74 ALSA: oxygen: fix analog capture on Claro halo cards
On the HT-Omega Claro halo card, the ADC data must be captured from the
second I2S input.  Using the default first input, which isn't connected
to anything, would result in silence.

Signed-off-by: Erik J. Staab <ejs@insightbb.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-22 10:04:08 +02:00
Takashi Iwai abdd8f5106 ALSA: hda - Apply ALC269 VAIO fix-up to all Sony laptops with ALC269
We've applied a fix-up for ALC269 VAIO only for two models.  But all
Sony VAIO models with ALC269 codec seem to require the similar fix.
Let's apply it with vendor-id mask.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-21 17:42:46 +02:00
Takashi Iwai 5e09416f36 Merge branch 'fix/hda' into topic/hda 2010-09-21 17:40:48 +02:00
Takashi Iwai 265a02478d ALSA: hda - Check invalid NIDs in alc_init_jacks()
The headphone and external-mic pin NIDs can be null, and the jack input
elements should be skipped in such a case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-21 11:26:21 +02:00
Luke Yelavich 0f9f1ee9d1 ALSA: hda - Add Dell Latitude E6400 model quirk
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/643891

Set the Dell Latitude E6400 (1028:0233) SSID to use AD1984_DELL_DESKTOP

Cc: stable@kernel.org
Signed-off-by: Luke Yelavich <luke.yelavich@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-21 10:07:45 +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
Jerry Zhou 9396d3174b ALSA: hdmi - fix surround41 channel mapping
Channel 2 and channel 3 were all wrongly mapped to HDMI slot 4.
This shows up as a bug that one channel is "lost" when playing in
surround41 mode.

Signed-off-by: Jerry Zhou <jerry.zhou@intel.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-21 09:51:00 +02:00
Wu Fengguang 53d7d69d8f ALSA: hdmi - support infoframe for DisplayPort
DisplayPort works mostly in the same way as HDMI, except that it expects
a slightly different audio infoframe format.

Citations from "HDA036-A: Display Port Support and HDMI Miscellaneous
Corrections":

The HDMI specification defines a data island packet with a header of 4
bytes (3 bytes content + 1 byte ECC) and packet body of 32 bytes (28
bytes content and 4 bytes ECC). Display Port specification on the other
hand defines a data island packet (secondary data packet) with header of
4 bytes protected by 4 bytes of parity, and data of theoretically up to
1024 bytes with each 16 bytes chunk of data protected by 4 bytes of
parity. Note that the ECC or parity bytes are not present in the DIP
content populated by software and are hardware generated.

It tests DP connection based on the ELD conn_type field, which will be
set by the graphics driver and can be overriden manually by users
through the /proc/asound/card0/eld* interface.

The DP infoframe is tested OK on Intel SandyBridge/CougarPoint platform.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-21 09:49:57 +02:00
Takashi Iwai 0ec33d1f95 ALSA: hda - Refactor ALC269 power-ups/downs in PM callbacks
Create a helper function to simplify the code.
Also, cleaned up the ifdef SND_HDA_NEEDS_RESUME and
CONFIG_SND_HDA_POWER_SAVE.  The former is always defined when the latter
is set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-20 15:36:07 +02:00
Takashi Iwai f3550d1b05 ALSA: hda - Fix capture widget for ALC269vb and co
ALC269vb and other variants don't use the widgets 0x24 but prefer the
widget 0x22 instead.  We need to fix the input parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-20 15:36:03 +02:00
Takashi Iwai d433a67831 ALSA: hda - Optimize the check of ALC269 codec variants
Don't call the COEF check for checking ACL269 codec variants at each
time in init but remember the type at the initialization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-20 15:35:29 +02:00
Takashi Iwai e1ca7b4ea2 ALSA: hda - Fix initialization of multiple output pins for ALC268/269
When multiple pins are assigned to headphones or speakers, they haven't
been initialized properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-20 14:58:57 +02:00
Takashi Iwai f6837bbd59 ALSA: hda - Fix up autocfg output pin numbers in realtek parser
When quirks are applied, the numbers of output pins in autocfg aren't
set up properly but only pin arrays are changed.  Let's fix it up so that
the rest of the parser can use autocfg.line_outs & co safely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-20 14:56:32 +02:00
Takashi Iwai 84eb01be18 ALSA: hda - Merge all HDMI modules into the unified module
This patch merges all three patch_*hdmi variants to the single HDMI
parser.  There is only one snd-hda-codec-hdmi module now.

In this patch, the behavior of each parser isn't changed much.
The old ATI parser still doesn't use the dynamic parser yet.
In later patches, they'll be cleaned up.

Also, this patch gets rid of the individual snd-hda-eld module and
builds into snd-hda-codec-hdmi, since this is referred only from the
HDMI parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-20 10:02:29 +02:00
Takashi Iwai f68b3b291d ALSA: hda - Check the external mic pin more strictly for Conexant chips
The external mic jack for auto-mic switch must be really an external
jack and with a presense-detection capability.  This patch makes the
check more paranoia.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-17 14:45:14 +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
David Henningsson 5637edb2e1 ALSA: HDA: Sort CXT5066 quirk table
It was just a boring day.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-17 11:17:46 +02:00
David Henningsson 1feba3b736 ALSA: HDA: Fix spelling (change VOSTO to VOSTRO)
It was just a boring day.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-17 11:17:34 +02:00
Takashi Iwai 41c89ef3aa ALSA: hda - Fix mic attribute check for internal mics
Now Windows claims that the BIOS sets pins for internal mics to be
BOTH connection instead of FIXED.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-17 10:28:20 +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 30ea098fc0 ALSA: hda - Fix input-pin setup for Realtek codecs
Through the transition of autocfg to individual inputs array, I forgot
to rewrite the argument passed to alc_set_input_pin().  This resulted in
wrongly setup input pins.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 18:47:56 +02:00
Takashi Iwai 5855fb8076 ALSA: hda - Fix initialization of secondary headphone and speaker
The secondary or later headphones or speakers aren't initialized preoprly
for some codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 18:24:02 +02:00
David Henningsson 145a902bfe ALSA: HDA: Enable internal speaker on Dell M101z
BugLink: http://launchpad.net/bugs/640254

In some cases a magic processing coefficient is needed to enable
the internal speaker on Dell M101z. According to Realtek, this
processing coefficient is only present on ALC269vb.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 10:18:54 +02:00
Takashi Iwai 3b119f662d ALSA: hda - Add quirk for Acer laptop with CX20585 codec
Its pin configuration is compatible with ideapad.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 07:36:14 +02:00
Takashi Iwai b686453543 ALSA: hda - Reduce pci id list for Intel with class id
Most of Intel controllers work as generic HD-audio without quirks,
and it'll be hopefully so in future.  Let's mark pci id with the
PCI_CLASS_MULTIMEDIA_HD_AUDIO for Intel so that the driver will work
with any new control chips in future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 07:35:46 +02:00
Takashi Iwai f2e5731dfd ALSA: hda - Preliminary support for new Conexant audio codecs
This patch adds the preliminary support for new Conexant audio codecs with
14f1:5097, 14f1:5098, 14f1:50a1, 14f1:50a2, 14f1:50ab, 14f1:50ac,
14f1:50b8 and 14f1:50b9.

Unlike other Conexant parsers, this is designed to be mostly automatic,
parsing from BIOS pin configurations.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 07:34:55 +02:00
Takashi Iwai c91925db49 Merge branch 'fix/hda' into topic/hda 2010-09-16 07:33:21 +02:00
Kailang Yang 977ddd6b2e ALSA: hda - Set up COEFs for ALC269 to avoid click noises at power-saving
For avoiding the click noises at power-saving, set some COEF values
for ALC269* codecs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 07:32:30 +02:00
Stephen Warren 3894335876 ALSA: patch_nvhdmi.c: Fix supported sample rate list.
22050 isn't a valid HDMI sample rate. 32000 is.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-By: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-14 23:28:18 +02:00
Kailang Yang 9ad0e49651 ALSA: hda - Add input jack layer support to Realtek codec
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-14 23:22:00 +02:00
Takashi Iwai f3fbba6efb Merge branch 'fix/misc' into topic/misc 2010-09-14 16:15:29 +02:00
Anisse Astier 2ca9cac965 ALSA: hda - Add quirk for Toshiba C650D using a Conexant CX20585
Add a quirk for laptop Toshiba Satellite C650D to have proper external HP and
external Mic support.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-13 12:33:32 +02:00
Seth Heasley cea310e8f8 ALSA: hda_intel: ALSA HD Audio patch for Intel Patsburg DeviceIDs
This patch adds the Intel Patsburg (PCH) HD Audio Controller DeviceIDs.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-13 08:37:27 +02:00
Takashi Iwai 5431427b1a Merge branch 'fix/hda' into for-linus 2010-09-10 08:27:00 +02:00
Takashi Iwai 4a4d4a6985 ALSA: hda - Sort input pins in snd_hda_parse_pin_def_config()
Sort inputs[] array in autocfg so that the codec parsers can filter out
easily per input pin types.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 22:22:02 +02:00
Takashi Iwai 990061c28a ALSA: hda - Add comments to new helper functions
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 22:08:44 +02:00
Takashi Iwai a1c9851583 ALSA: hda - Reduce redundant mic location prefix in input source labels
When the mic pins are assigned to the same location, we can omit the
redundant location prefix like "Front" or "Rear".

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 21:36:27 +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
Clemens Ladisch 51485e8e24 ALSA: virtuoso: update Kconfig text
Update the Xonar config texts with the latest information about the
Xonar DS, HDAV1.3 Slim, and Xense.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 10:53:43 +02:00
Clemens Ladisch 99f08bf590 ALSA: oxygen: fix CONFIG_SND_OXYGEN_LIB dependency selection
As the select directive does not handle indirect dependencies, select
those explicitly in the driver sections.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 10:53:40 +02:00
Clemens Ladisch 2dbf0ea29c ALSA: virtuoso: Xonar DS: add stereo upmixing to center/LFE channels
Add the possibility to route a mix of the two channels of stereo data to
the center and LFE outputs.  Due to a WM8766 restriction, all surround
and back channels also get the mixed L/R signal in this case.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 10:53:37 +02:00
Clemens Ladisch 84cf83a28d ALSA: virtuoso: automatically handle Xonar DS headphone routing
Automatically mute the speaker outputs as long as a headphone is plugged.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 10:53:33 +02:00
Clemens Ladisch 435feac648 ALSA: virtuoso: add Xonar DS headphone jack detection
Now that the polarity of the headphone detection pin is known, replace
the debugging message with a proper jack plug input device.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 10:53:30 +02:00
Clemens Ladisch 9bac84edf0 ALSA: virtuoso: fix Xonar DS input switches
Use the correct number, register bits, and names for the input switches.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 10:53:27 +02:00
Clemens Ladisch da0dab5ecb ALSA: virtuoso: fix WM8766 register writes with MSB
The check for the volume update latch bit was accidentally in the wrong
function, where it would prevent the MSB from being written, instead of
correctly ignoring it for cached values.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 10:53:23 +02:00
Takashi Iwai c8bdfacb63 Merge branch 'fix/misc' into topic/misc 2010-09-09 10:51:45 +02:00
David Henningsson 6cb3b707f9 ALSA: HDA: Add fixup pins for Ideapad Y550
By adding the subwoofer as a speaker pin, it is treated correctly when auto-muting.

BugLink: https://launchpad.net/bugs/611803
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 09:10:01 +02:00
Takashi Iwai 18675e4283 ALSA: hda - Add fixup for FSC Celsius H270
Added a fixup table for ALC262 codec containing the entry for FSC
Celsius H270.  Now both headphone jacks are detected properly as
headphones.

Reference: Novell bnc637263
	https://bugzilla.novell.com/show_bug.cgi?id=637263

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 15:55:44 +02:00
Takashi Iwai 033688a5a8 ALSA: hda - Add multiple headphone support to ALC262 codec
This patch changes the alc262 auto-parser to allow multiple pins
assigned for a single purpose (line-out, headphone or speaker).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 15:50:07 +02:00
Takashi Iwai bb35febd16 ALSA: hda - Support multiple headphone auto-mute
Currently headphone auto-mute using alc_automute_pin() assumes only
the single pin used for the headphone output.  Since there are devices
with multiple headphone jacks, we need to check all these pins there,
too.

Also this patch merges the common code between alc_automute_pin() and
alc_automute_amp() helper functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 15:48:29 +02:00
Takashi Iwai 03642c9a44 ALSA: hda - Clear left-over hp_pins in snd_hda_parse_pin_def_config()
In snd_hda_parse_def_config(), some unused values may remain in hp_pins[]
array during the headphone-reassignment workaround.  This patch clears
the unused array members.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 15:30:20 +02:00
Takashi Iwai eb7f80c179 Merge branch 'fix/hda' into topic/hda 2010-09-08 15:28:03 +02:00
Takashi Iwai 122661b678 ALSA: hda - Fix wrong HP pin detection in snd_hda_parse_pin_def_config()
snd_hda_parse_pin_def_config() has some workaround for re-assigning
some pins declared as headphones to line-outs.  This didn't work properly
for some cases because it used memmove() stupidly wrongly.

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

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 14:59:26 +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 83c0de892d Merge branch 'fix/hda' into topic/hda 2010-09-08 08:42:26 +02:00
Takashi Iwai 080dc7bc25 ALSA: hda - Enable PC-beep for EeePC with ALC269 codec
EeePC 1001HAG has a similar problem like other ASUS machine, which doesn't
set the codec SSID properly for indicating the beep capability.
To enable PC-beep again, put this to the whitelist.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 08:38:41 +02:00
Brian Austin a769cbcf60 ALSA: hda - Add errata initverb sequence for CS42xx codecs
Add init verb sequence for errata ER880C3
http://www.cirrus.com/en/pubs/errata/ER880C3.pdf

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 08:35:56 +02:00
Clemens Ladisch fe6ce80ae2 ALSA: virtuoso: fix setting of Xonar DS line-in/mic-in controls
The Line and Mic inputs cannot be used at the same time, so the driver
has to automatically disable one of them if both are set.  However, it
forgot to notify userspace about this change, so the mixer state would
be inconsistent.  To fix this, check if the other control gets muted,
and send a notification event in this case.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Nathan Schagen
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 08:26:15 +02:00
Clemens Ladisch 4c25b93223 ALSA: virtuoso: work around missing reset in the Xonar DS Windows driver
For the WM8776 chip, this driver uses a different sample format and
more features than the Windows driver.  When rebooting from Linux into
Windows, the latter driver does not reset the chip but assumes all its
registers have their default settings, so we get garbled sound or, if
the output happened to be muted before rebooting, no sound.

To make that driver happy, hook our driver's cleanup function into the
shutdown notifier and ensure that the chip gets reset.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Nathan Schagen
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 08:26:13 +02:00
Takashi Iwai 9737731d64 Merge branch 'fix/hda' into topic/hda 2010-09-07 12:18:43 +02:00
Takashi Iwai 4d155641c8 ALSA: hda - Add quirk for Lenovo T400s
Lenovo T400s requires the quirk to make automatic HP/mic switching working.

Reported-by: Frank Becker <fb@alien8.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-07 12:04:48 +02:00
Takashi Iwai add7c0a6a4 ALSA: ca0106 - clean up playback pointer callback
Clean up the playback pointer callback function a bit, and make the
pointer check more strictly to avoid bogus pointers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-07 11:54:16 +02:00
Joe Perches 9fe856e47e sound: Remove unnecessary casts of private_data
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-07 08:05:59 +02:00
Takashi Iwai 68885a3ff3 Merge branch 'fix/misc' into topic/misc 2010-09-03 22:38:52 +02:00
David Henningsson 048e78a5bc ALSA: hda - Add a new hp-laptop model for Conexant 5066, tested on HP G60
This new model adds the following functionality to HP G60:
- Automute of internal speakers
- Autoswitch of internal/external mics
- Remove SPDIF not physically present

BugLink: http://launchpad.net/bugs/587388
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-02 11:49:17 +02:00
Takashi Iwai 7b315bb498 ALSA: hda - Use new inputs[] field to parse input-pins for VIA codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:06:30 +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
Takashi Iwai 66ceeb6bc2 ALSA: hda - Use new inputs[] field to parse input-pins for Realtek codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:05:52 +02:00
Takashi Iwai c1e0bb9217 ALSA: hda - Use new inputs[] field to parse input-pins for CirrusLogic codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:05:30 +02:00
Takashi Iwai fa4968a8b2 ALSA: hda - Use new inputs[] field to parse input-pins for CA-IBG codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:05:08 +02:00
Takashi Iwai 9e042e7132 ALSA: hda - Use new inputs[] field to parse input-pins for AD codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:04:44 +02:00
Takashi Iwai d7b1ae9d88 ALSA: hda - Add snd_hda_get_input_pin_label() helper function
Added snd_hda_get_input_pin_label() helper function to return the
string that can be used for control or capture-source ids.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:00:16 +02:00
Takashi Iwai 75e0eb24ee ALSA: hda - Add inputs[] to auto_pin_cfg struct
Added the new fields to contain all input-pins to struct auto_pin_cfg.
Unlike the existing input_pins[], this array contains all input pins
even if the multiple pins are assigned for a single role (i.e. two
front mics).  The former input_pins[] still remains for a while, but
will be removed in near future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 12:56:55 +02:00
Takashi Iwai f3268512c3 ALSA: hda - Refactor input-pin parser for VIA codecs
patch_via.c has redundant codes for parsing the input-pins.  Although
they are pretty similar, but all implemented in different functions
just because of hard-coded ids and slight incompatibilities.
This patch refactors the codes to use the common helper function,
resulting in the reduction of many lines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 11:00:19 +02:00
Takashi Iwai 73413b120d ALSA: hda - embed alc_fixup contents into struct definitions
Instead of defining each content as a separate struct, put all into the
definition of struct alc_fixup arrays so that reader doesn't go back to
see the definition again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 09:39:57 +02:00
Takashi Iwai 6a36672502 Merge branch 'fix/hda' into for-linus 2010-08-28 21:44:12 +02:00
Eliot Blennerhassett 60f1deb595 ALSA: asihpi - Return hw error directly from oustream_write.
If hw error is ignored, status is updated with invalid info.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-28 11:55:07 +02:00
David Henningsson dbbcbc073a ALSA: hda - Add Sony VAIO quirk for ALC269
The attached patch enables playback on a Sony VAIO machine.

BugLink: http://launchpad.net/bugs/618271

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-26 08:36:46 +02:00