openwrt/staging/blogic.git
15 years agoALSA: hda - Don't call snd_hda_codec_configure in snd_hda_codec_new()
Takashi Iwai [Wed, 17 Jun 2009 07:33:52 +0000 (09:33 +0200)]
ALSA: hda - Don't call snd_hda_codec_configure in snd_hda_codec_new()

The codec setup call via snd_hda_codec_configure() isn't necessarily
called in snd_hda_codec_new().  For the later added feature, it's better
to change the code flow like:
 - create all codec instances
 - configure each codec

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Make jack-plug notification selectable
Takashi Iwai [Mon, 22 Jun 2009 15:00:38 +0000 (17:00 +0200)]
ALSA: hda - Make jack-plug notification selectable

Make the jack-plug notification via input layer selectable via Kconfig.
This is often unnecessary, and the similr function will be provided
using the ALSA control API in near future anyway.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add digital-mic support to ALC262 auto model
Takashi Iwai [Mon, 22 Jun 2009 08:56:54 +0000 (10:56 +0200)]
ALSA: hda - Add digital-mic support to ALC262 auto model

Add the digital-mic support with ALC262 auto model.
The new ALC262 models have the digital mic at NID 0x12.  This widget
isn't checked in the current alc262_auto_create_analog_input_ctls()
since it's under 0x18.  So, just reuse the routine for alc269 to fix
the behavior.

But, it doesn't suffice: the digital mic is supported only with the
ADC0, we have to exclude other ADCs when d-mic is detected.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix check of input source type for realtek codecs
Takashi Iwai [Mon, 22 Jun 2009 08:50:19 +0000 (10:50 +0200)]
ALSA: hda - Fix check of input source type for realtek codecs

Fix the check of the input-source type by checking the widget type of
each capture-source item.  Since some codecs can have both the mixer
and selector types depending on the ADC, alc_mux_enum_put() needs to
check each widget.

With this change, spec->capture_style gets unneeded, so it's removed,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add quirk for Sony VAIO Z21MN
Takashi Iwai [Mon, 22 Jun 2009 09:03:13 +0000 (11:03 +0200)]
ALSA: hda - Add quirk for Sony VAIO Z21MN

It needs model=toshiba-s06 to work with the digital-mic.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
15 years agoALSA: hda - Get back Input Source for ALC262 toshiba-s06 model
Takashi Iwai [Mon, 22 Jun 2009 06:16:56 +0000 (08:16 +0200)]
ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model

The commit f9e336f65b666b8f1764d17e9b7c21c90748a37e
    ALSA: hda - Unify capture mixer creation in realtek codes
removed the "Input Source" mixer element creation for toshiba-s06 model
because it contains a digital-mic input.

This patch take the control back.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
15 years agoALSA: hda - Fix unsigned comparison in patch_sigmatel.c
Takashi Iwai [Mon, 22 Jun 2009 06:00:10 +0000 (08:00 +0200)]
ALSA: hda - Fix unsigned comparison in patch_sigmatel.c

Fix the comparison of unsigned int that causes a compile warning below
by changing to the right signed type:
  patch_sigmatel.c: In function ‘stac92xx_vref_set’:
  patch_sigmatel.c:658: warning: comparison of unsigned expression < 0 is always false

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add model=6530g option
Takashi Iwai [Sun, 21 Jun 2009 08:56:44 +0000 (10:56 +0200)]
ALSA: hda - Add model=6530g option

Add the new model string corresponding to the previous Acer Aspire
6530G support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Acer Inspire 6530G model for Realtek ALC888
Tony Vroon [Sat, 20 Jun 2009 23:40:10 +0000 (00:40 +0100)]
ALSA: hda - Acer Inspire 6530G model for Realtek ALC888

The selected 4930G model seemed to keep the subwoofer 'tuba'
function from operating correctly. Removing the existing PCI
ID match made this work again, but it was mapped to 'Side'
instead of to LFE as one would expect.
This attempts to enable all functionality and keep the amount
of available mixer sliders low. Any slider that had no audible
effect on the output audio has been removed, and as such EAPD
is not currently enabled.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: HDA - Correct trivial typos in comments.
Sasha Alexandr [Tue, 16 Jun 2009 20:00:15 +0000 (16:00 -0400)]
ALSA: HDA - Correct trivial typos in comments.

Correct some trivial typos in comments.

Signed-off-by: Sasha Alexandr <brina_keith@ns.sympatico.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: HDA - Name-fixes in code (tagra/targa)
Sasha Alexandr [Tue, 16 Jun 2009 18:52:54 +0000 (14:52 -0400)]
ALSA: HDA - Name-fixes in code (tagra/targa)

Correct some cut+paste typos from 'tagra' to 'targa'.

Signed-off-by: Sasha Alexandr <brina_keith@ns.sympatico.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: HDA - Add pci-quirk for MSI MS-7350 motherboard.
Sasha Alexandr [Tue, 16 Jun 2009 18:46:17 +0000 (14:46 -0400)]
ALSA: HDA - Add pci-quirk for MSI MS-7350 motherboard.

Add pci-quirk for MSI MS-7350 motherboard with Realtek ALC888.

Signed-off-by: Sasha Alexandr <brina_keith@ns.sympatico.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix memory leak at codec creation
Takashi Iwai [Wed, 17 Jun 2009 06:22:32 +0000 (08:22 +0200)]
ALSA: hda - Fix memory leak at codec creation

The codec->modelname field is allocated twice in snd_hda_codec_new().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add quirk for Acer Aspire 6935G
Takashi Iwai [Sat, 13 Jun 2009 08:16:43 +0000 (10:16 +0200)]
ALSA: hda - Add quirk for Acer Aspire 6935G

Added model=acer-aspire-8930g for Acer Aspire 6935G (1025:0146).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205)
Simos Xenitellis [Wed, 10 Jun 2009 15:33:31 +0000 (16:33 +0100)]
ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205)

A quirk is required for 8086:284b (rev 03) [Subsystem: 161f:2073].
The following has been tested with Alsa 1.0.20 (git master).

Background details can be found at
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4561
http://forum.ubuntu-gr.org/viewtopic.php?f=38&t=5290

Tested-by: Theodora Iliopoulou <th30dr@gmail.com>
Signed-off-by: Simos Xenitellis <simos@gnome.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix the previous tagra-8ch patch
Takashi Iwai [Mon, 8 Jun 2009 14:38:17 +0000 (16:38 +0200)]
ALSA: hda - Fix the previous tagra-8ch patch

- Fix a typo in the patch
- Adapted to follow the recent change for unsol event handling

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add 7.1 support for MSI GX620
David Heidelberger [Mon, 8 Jun 2009 14:15:18 +0000 (16:15 +0200)]
ALSA: hda - Add 7.1 support for MSI GX620

Added 7.1 support for MSI GX620 and jack quirk.

Reference: kernel bug#13430
http://bugzilla.kernel.org/show_bug.cgi?id=13430

Signed-off-by: David Heidelberger <d.okias@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: support Sony Vaio TT
Guido Günther [Thu, 4 Jun 2009 22:47:26 +0000 (00:47 +0200)]
ALSA: support Sony Vaio TT

with BIOS probing only we offer a non functional headphone swith and
volume slider.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda_intel: fix build error when !PM
Alexander Beregalov [Thu, 4 Jun 2009 09:46:16 +0000 (13:46 +0400)]
ALSA: hda_intel: fix build error when !PM

Fix this build error when CONFIG_PM is not set:
ound/pci/hda/hda_intel.c: In function 'azx_bus_reset':
sound/pci/hda/hda_intel.c:1270: error: implicit declaration of function 'snd_pcm_suspend_all'
sound/pci/hda/hda_intel.c:1271: error: implicit declaration of function 'snd_hda_suspend'
sound/pci/hda/hda_intel.c:1272: error: implicit declaration of function 'snd_hda_resume'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - More Aspire 8930G fixes
Hector Martin [Wed, 3 Jun 2009 22:13:40 +0000 (00:13 +0200)]
ALSA: hda - More Aspire 8930G fixes

Enable all three capture channels, including the missing nid 7 which is
the only one capable of capturing DMIC input

Enable Headphone amp for the HP jack. This causes a volume boost for
headphones, but does not cause any noticeable effect for light loads
like other amps, so there is no need to make it configurable.

Add Input Mix capture mux setting to capture the output of the playback
input mux (that is, what goes out the speakers except for PCM)

Hack another coef register because the stereo DMIC for some reason
produces a nonstandard sum/difference signal. I found a bit to make it
just use the sum signal for both channels, which makes it behave like a
standard mono microphone. The stereo is useless anyway (they're 1cm apart).

Tested working: Three capture channels, mic in, line in, DMIC.

Tested not working: CD. Not sure why, might be unconnected in the actual
hardware or a CD drive issue.

Also looked at SPDIF. It appears to work (emitter lights up inside the
HP out jack) but I lack a proper miniTOSLINK cable to test it.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'topic/hda-ctl-reset' into topic/hda
Takashi Iwai [Tue, 2 Jun 2009 10:15:48 +0000 (12:15 +0200)]
Merge branch 'topic/hda-ctl-reset' into topic/hda

15 years agoALSA: hda - Acer Aspire 8930G support
Hector Martin [Tue, 2 Jun 2009 08:54:19 +0000 (10:54 +0200)]
ALSA: hda - Acer Aspire 8930G support

Short story: this laptop has 5.1 built-in speakers which you *really*
want to use (the not-so-"sub" woofer is what makes the audio above
average for a laptop), so 6-channel support is important (plus a decent
asound.conf to upmix stereo). It also has the 3 typical jacks that ought
to have a selectable mode. And it's based on ALC889, which sucks.

Rationale/explanations:

The const_channel_count stuff was added because, for a laptop like this,
you always have 6 channels available (internal speakers) but still need
to set the mode for the 3 external jacks. Therefore, the device always
needs to be in 6-channel mode but there still needs to be a mixer
control for the jack mode. You could use line/mic-in at the same time as
the 6 internal speakers, for example. You might be tempted to make it
even smarter by dynamically switching the max channel count when
headphones are plugged in (therefore muting the internal speakers and
reducing the physical channel count to the jack channel mode), but as a
user I consider this to be harmful because I want the audio to blow up
to 6 channels / upmixed as soon as I unplug the headphones, and having
opened the device while in 2-channel mode would prevent this from
working (and always making 6-channel mode available doesn't do any harm).

The hardware needs EAPD turned on and the DACs routed to the internal
speaker pins, so the patch adds those verbs.

The ALC889 CLFE and subsequent (side/aux, here unused) DACs do NOT work
by default, at least here. I wasted much time trying to talk to
Realtek/pshou about this, but they just kept sending me useless updates
to patch_realtek.c that did nothing relevant. In the end I gave up and
brute forced the issue by trying to flip every bit in the proprietary
coefficient registers, and eventually found the two magic registers that
need to be cleared to enable all DACs. I have only heard Acer users
complain, but that might be because ALC889 is pretty new and using 5.1
(and noticing the missing center/lfe channels) might not be that common.
If this is a generalized issue with all ALC889 systems then those verbs
should probably be moved to a common verb array.

The internal mic is untested and probably doesn't work.

These settings will probably work for other Acer Gemstone laptops with
the same 5.1 speaker config. When identified, those should be added to
the PCI subsystem ID list.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Limit codec-verb retry to limited hardwares
Takashi Iwai [Mon, 1 Jun 2009 23:20:22 +0000 (01:20 +0200)]
ALSA: hda - Limit codec-verb retry to limited hardwares

The reset of a BUS controller during operations is somehow risky and
shouldn't be done inevitably for devices that have apparently no such
codec-communication problems.

This patch adds the check of the hardware and limits the bus-reset
capability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add codec bus reset and verb-retry at critical errors
Takashi Iwai [Mon, 1 Jun 2009 23:16:07 +0000 (01:16 +0200)]
ALSA: hda - Add codec bus reset and verb-retry at critical errors

Some machines machine cause a severe CORB/RIRB stall in certain
weird conditions, such as PA access at the start up together with
fglrx driver.  This seems unable to be recovered without the controller
reset.

This patch allows the bus controller reset at critical errors so
that the communication gets recovered again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Reorder and clean-up ALC268 quirk table
Takashi Iwai [Mon, 1 Jun 2009 23:02:50 +0000 (01:02 +0200)]
ALSA: hda - Reorder and clean-up ALC268 quirk table

Rearrange alc268_cfg_tbl[] in the order of vendor id, and group some
entries using SND_PCI_QUIRK_MASK().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - fix audio on LG R510
Ozan Çağlayan [Mon, 1 Jun 2009 20:13:17 +0000 (23:13 +0300)]
ALSA: hda - fix audio on LG R510

Currently, LG R510 is only able to produce sound on headphones, the
internal speakers are not working.

The user tested and confirmed that with model=Dell headphones,
internal speakers and the microphone are working flawlessly.

Tested-by: Serdar Soytetir <tulliana@gmail.com>
Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Macbook[Pro] 5 6ch support
Kacper Szczesniak [Mon, 1 Jun 2009 22:55:19 +0000 (00:55 +0200)]
ALSA: hda - Macbook[Pro] 5 6ch support

this is a patch against current snapshot that adds:
6 channels support for the MB5 model

Signed-off-by: Kacper Szczesniak <kacper@qwe.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda-intel: improve initialization for ALC262_HP_BPC model
Jaroslav Kysela [Mon, 25 May 2009 14:44:20 +0000 (16:44 +0200)]
ALSA: hda-intel: improve initialization for ALC262_HP_BPC model

Fix issues for 3 generations of HP workstations.

The modest modifications do the following:
1. Change the second MIC from device 3 to device 1
2. Init the "boost" values to "0" by default

From: John Brown <john.brown3@hp.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Jack Mode changes for Sigmatel boards
Nickolas Lloyd [Mon, 1 Jun 2009 09:12:29 +0000 (11:12 +0200)]
ALSA: hda - Jack Mode changes for Sigmatel boards

This patch changes Line In as Out Switch and Mic In as Out Switch to
enums for consistency, and causes all mic and line in ports to be probed
and controls to be added appropriately.

Signed-off-by: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Support NVIDIA 8 channel HDMI audio
Wei Ni [Mon, 1 Jun 2009 08:37:28 +0000 (16:37 +0800)]
ALSA: hda - Support NVIDIA 8 channel HDMI audio

Support 8 channel HDMI audio for MCP78/7A

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix a typo in the previous patch
Takashi Iwai [Sun, 31 May 2009 07:28:12 +0000 (09:28 +0200)]
ALSA: hda - Fix a typo in the previous patch

ICH6_GCTL_RESET was wrongly set to another bit by the commit
b21fadb9c1852c91622ca1dccfeb144bc535e36e.  This caused a problem when
the codec needs really a reset (e.g. recovering from the communication
error at probe).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix reverted LED setup for HP
Takashi Iwai [Sat, 30 May 2009 06:59:03 +0000 (08:59 +0200)]
ALSA: hda - Fix reverted LED setup for HP

The commit 86d190e77c44cb057742dcc871b12ebd4633c387 reverted the bit
flip of LED GPIO for HP DX and DV4-1222nr.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Thu, 28 May 2009 11:12:48 +0000 (13:12 +0200)]
Merge branch 'fix/hda' into topic/hda

15 years agoALSA: hda - Add more register bits definitions
Takashi Iwai [Thu, 28 May 2009 10:26:15 +0000 (12:26 +0200)]
ALSA: hda - Add more register bits definitions

Added some missing register bits definitions to reduce magic numbers.
Also renamed some to follow the names on the datasheet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Always sync writes in single_cmd mode
Takashi Iwai [Thu, 28 May 2009 09:59:12 +0000 (11:59 +0200)]
ALSA: hda - Always sync writes in single_cmd mode

In the single_cmd mode, the hardware cannot store the multiple replies
like on RIRB, thus each verb has to sync and wait for the response no
matter whether the return value is needed or not.  Otherwise it may
result in a wrong return value from the previous verb.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Compaq Presario CQ60 patching for Conexant
Tony Vroon [Wed, 27 May 2009 20:00:41 +0000 (21:00 +0100)]
ALSA: hda - Compaq Presario CQ60 patching for Conexant

A docking mic control is shown by default. The Compaq Presario
CQ60 laptop has no docking connector, so designate it as a
CXT5051_HP model.
This makes the phantom mixer slider disappear.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Support sync after writing a verb
Takashi Iwai [Tue, 26 May 2009 14:07:57 +0000 (16:07 +0200)]
ALSA: hda - Support sync after writing a verb

This patch adds a debug mode to make the codec communication
synchronous.  Define SND_HDA_SUPPORT_SYNC_WRITE in hda_codec.c,
and the call of snd_hda_codec_write*() will become synchronous,
i.e. wait for the reply from the codec at each time issuing a verb.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Allow concurrent RIRB access in single_cmd mode
Takashi Iwai [Tue, 26 May 2009 13:22:00 +0000 (15:22 +0200)]
ALSA: hda - Allow concurrent RIRB access in single_cmd mode

In the single_cmd mode, the current driver code doesn't do any update
for RIRB just for any safety reason.  But, actually the RIRB and
single_cmd mode don't conflict.  Unsolicited events can be delivered
even while using the single_cmd mode.

This patch allows the handling of unsolicited events with single_cmd
mode, just always checking RIRB independent from single_cmd flag.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Tue, 26 May 2009 13:19:56 +0000 (15:19 +0200)]
Merge branch 'fix/hda' into topic/hda

15 years agoALSA: hda - Minor clean up of patch_sigmatel.c
Takashi Iwai [Tue, 26 May 2009 13:18:58 +0000 (15:18 +0200)]
ALSA: hda - Minor clean up of patch_sigmatel.c

- Remove unneeded semicolons
- Introduce spec->gpio_led to specify the GPIO bit for LED control

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Reset CORB/RIRB at retrying the verb communication
Takashi Iwai [Mon, 25 May 2009 16:34:52 +0000 (18:34 +0200)]
ALSA: hda - Reset CORB/RIRB at retrying the verb communication

When a codec communication error occurs, the CORB/RIRB counters should
be reset first before re-issuing the verb.  Simply call azx_free_cmd_io()
and azx_init_cmd_io() to achieve that.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add missing check of pin vref 50 and others in Realtek codecs
Takashi Iwai [Mon, 25 May 2009 06:06:02 +0000 (08:06 +0200)]
ALSA: hda - Add missing check of pin vref 50 and others in Realtek codecs

Some Realtek codecs like ALC861 seem to support only VREF50 while the
current driver assumes it's only VREF80.  Check other VREF bits to set
the correct value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add 5stack-no-fp model for STAC927x
Takashi Iwai [Sun, 24 May 2009 17:00:08 +0000 (19:00 +0200)]
ALSA: hda - Add 5stack-no-fp model for STAC927x

The recent fix for the headphone volume control on IDT/STAC codecs
resulted in the removal of invalid "Side" volume eventually.  But,
if the front panel doesn't exist, this setup could be regarded as a
sort of regression, as reported in kernel bug #13250.

Now as a workaround, a new model 5stack-no-fp is added so that the user
without the front panel can choose this one explicitly.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add forced codec-slots for ASUS W5Fm
Ozan Çağlayan [Sat, 23 May 2009 12:00:04 +0000 (15:00 +0300)]
ALSA: hda - Add forced codec-slots for ASUS W5Fm

ASUS W5Fm needs the fixed codec-slots to probe to override the BIOS
problem like W5F.

Tested-by: Alp Kılıç <kilic.alp@gmail.com>
Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - fix audio on HP TX25xx series notebooks
Adam Williamson [Thu, 21 May 2009 22:32:59 +0000 (18:32 -0400)]
ALSA: hda - fix audio on HP TX25xx series notebooks

Fixes https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4121

Taken from https://bugzilla.redhat.com/show_bug.cgi?id=498060

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix digital beep tone calculation
Takashi Iwai [Tue, 19 May 2009 10:50:04 +0000 (12:50 +0200)]
ALSA: hda - Fix digital beep tone calculation

The digital beep tone is calculated in two different ways depending
on the codec chip.  The standard one is using a divider, and another
one is a linear tone for IDT/STAC codecs.  Currently, only the
latter type is used for all codecs, which resulted in a wrong tone
pitch.

This patch adds the calculation of the standard HD-audio type.
Also clean-up the fields in hda_beep struct.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add prefix to kernel messages
Takashi Iwai [Tue, 19 May 2009 10:16:46 +0000 (12:16 +0200)]
ALSA: hda - Add prefix to kernel messages

Add proper prefix to each kernel message in hda_intel.c.
Also, avoid the unneeded prefix when CONFIG_SND_VERBOSE_PRINTK is used
together with snd_print*().

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Improved MacBook 3,1 support
Torben Schulz [Mon, 18 May 2009 13:02:35 +0000 (15:02 +0200)]
ALSA: hda - Improved MacBook 3,1 support

This patch adds support for MacBook 3,1 sound by adding a model new
"mb31" with the appropriate init verbs, mixers and channel modes to
the ALC883 configuration. patch_alc882() and patch_alc883() are
modified to handle the MacBook 3,1 sound-chip (Realtek ALC889A)
correctly.

Signed-off-by: Torben Schulz <public@letorbi.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Avoid conflicts with snd-ctxfi driver
Takashi Iwai [Mon, 18 May 2009 10:40:52 +0000 (12:40 +0200)]
ALSA: hda - Avoid conflicts with snd-ctxfi driver

The PCI entries of Creative with HD-audio class can be the devices
with emu20k1/emu20k2 chips.  These are supported better by snd-ctxfi
driver.  With that driver, the device will mutate from HD-audio to
its native class.

This patch adds a simple ifdef to avoid the conflict of device probe
between snd-hda-intel and snd-ctxfi drivers.  1102:0009 seems still
OK to be added as it has no emu20kx chip, and is a pure HD-audio
device.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Show the actual chip name in 'unkown model' messages
Takashi Iwai [Mon, 18 May 2009 10:33:36 +0000 (12:33 +0200)]
ALSA: hda - Show the actual chip name in 'unkown model' messages

Show the actual chip name in 'unknown model..' info messages for
Realtek codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Split codec->name to vendor and chip name strings
Takashi Iwai [Sat, 16 May 2009 08:00:49 +0000 (10:00 +0200)]
ALSA: hda - Split codec->name to vendor and chip name strings

Split the name string in hda_codec struct to vendor_name and chip_name
strings to be stored directly from the preset name.
Since mostly only the chip name is referred in many patch_*.c, this
results in the reduction of many codes in the end.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - add controls to toggle DC bias on mic ports
Nickolas Lloyd [Fri, 15 May 2009 13:33:30 +0000 (15:33 +0200)]
ALSA: hda - add controls to toggle DC bias on mic ports

This patch adds a mixer control for the STAC92XX boards to control the
DC bias of mic ports, allowing recording from both powered and
non-powered sources.  It replaces the "Mic Output Switch" with "Mic Jack
Mode" to switch between Mic, Line In, and Line Out.

Signed-off-by: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add a quirk entry for Macbook Pro 5,1
Takashi Iwai [Thu, 14 May 2009 16:20:33 +0000 (18:20 +0200)]
ALSA: hda - Add a quirk entry for Macbook Pro 5,1

Added the codec SSID for MacBook Pro 5,1 as compatible as MP51.
However, the headphone auto-muting function doesn't work.  So,
this is just a tentative solution.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Disable fallback to model=acer for Acer laptops
Takashi Iwai [Wed, 13 May 2009 09:32:52 +0000 (11:32 +0200)]
ALSA: hda - Disable fallback to model=acer for Acer laptops

The model=acer for ALC883/889 doesn't work well for the recent Acer
Aspire laptops.  Since model=auto works better nowadays, it's safer
to use the default fallback instead of the Acer specific one.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add support of Samsung NC10 mini notebook
Chris Pockelé [Tue, 12 May 2009 06:08:53 +0000 (08:08 +0200)]
ALSA: hda - Add support of Samsung NC10 mini notebook

Add specific configuration for Samsung NC10 mini notebook.  Internal
mic/speakers will be correctly muted when plugging in external ones.
Mixer controls are added for speakers, headphones and PC beep.
"Boost" is added for the microphones.

Signed-off-by: Chris Pockelé <chris.pockele.f1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'topic/hda-vt-spdif' into topic/hda
Takashi Iwai [Mon, 11 May 2009 08:23:36 +0000 (10:23 +0200)]
Merge branch 'topic/hda-vt-spdif' into topic/hda

15 years agoALSA: hda - Add missing models for Realtek codecs
Takashi Iwai [Mon, 11 May 2009 06:12:43 +0000 (08:12 +0200)]
ALSA: hda - Add missing models for Realtek codecs

Added the missing descriptions and the model names for Realtek codecs
to the documentation and the config table.

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

15 years agoALSA: hda - Clean up Realtek auto-mute unsol routines
Takashi Iwai [Fri, 8 May 2009 13:57:59 +0000 (15:57 +0200)]
ALSA: hda - Clean up Realtek auto-mute unsol routines

Most of unsol handlers defined in patch_realtek.c can be classified to
two types, mute via amp of pins and mute via ctl bits of pins.
Thus there are a big room to generalize each implementation.

This patch creates two generic functions, alc_automute_amp() and
alc_automute_pin().  The latter is actually changed from the previous
alc_sku_automute().  Each caller needs to initialize hp_pins and
speaker_pins properly at own init_hook.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Clean up for ALC262 HP model auto-mute functions
Takashi Iwai [Fri, 8 May 2009 12:31:55 +0000 (14:31 +0200)]
ALSA: hda - Clean up for ALC262 HP model auto-mute functions

Just clean up, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix and clean up hippo-compat HP auto-muting
Takashi Iwai [Fri, 8 May 2009 12:11:43 +0000 (14:11 +0200)]
ALSA: hda - Fix and clean up hippo-compat HP auto-muting

The speaker auto-muting per HP plugging for ALC262 HIPPO and compatible
devices is slightly buggy as the "Master" or "Front" mixer control can
still toggle the speaker output even if the headphone is plugged.

This patch fixes the issue, and clean up the hippo-related codes
together with fixes of some inconsistent mixer names.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix secondary SPDIF on VT1708S and VT1702 codecs
Takashi Iwai [Thu, 7 May 2009 14:31:14 +0000 (16:31 +0200)]
ALSA: hda - Fix secondary SPDIF on VT1708S and VT1702 codecs

VIA VT1708S and VT1702 codecs can have two SPDIF outputs.  One of them
should have been handled as the extra digital out, but it's not
properly accessed.

This patch fixes the handling of the secondary SPDIF on these codecs
with the slave dig-out as found in patch_sigmatel.c.  This makes the
use of such a device easier (for normal users).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix line-in on Mac Mini Core2 Duo
Takashi Iwai [Thu, 7 May 2009 14:22:53 +0000 (16:22 +0200)]
ALSA: hda - Fix line-in on Mac Mini Core2 Duo

BIOS on Mac Mini Core2 Duo sets both INPUT and OUTPUT pinctl bits to
the line-in jack, and it confuses the driver as if it's a valid input.
This patch adds the check of OUTPUT bit so that the driver fixes the
invalid pin setup.

Tested-by: Tino Keitel <tino.keitel@gmx.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add support for MacBook 5.1 (Aluminium)
Kacper Szczesniak [Thu, 7 May 2009 10:47:43 +0000 (12:47 +0200)]
ALSA: hda - Add support for MacBook 5.1 (Aluminium)

Signed-off-by: Kacper Szczesniak <kacper@qwe.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Addition for HP dv4-1222nr laptop support
James Gardiner [Sun, 3 May 2009 08:00:44 +0000 (04:00 -0400)]
ALSA: hda - Addition for HP dv4-1222nr laptop support

Signed-off-by: James Gardiner <renidragsemaj@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix a typo in patch_realtek.c again
Takashi Iwai [Tue, 28 Apr 2009 11:03:19 +0000 (13:03 +0200)]
ALSA: hda - Fix a typo in patch_realtek.c again

The commmit dfed0ef9b3ff9e37903920b6938ed33344ad0b3d was reverted
accidentally by the merge of auto-detection fix patch.

Fixed again now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Don't enable auto-mute but for speakers in patch_realtek.c
Takashi Iwai [Tue, 28 Apr 2009 11:01:26 +0000 (13:01 +0200)]
ALSA: hda - Don't enable auto-mute but for speakers in patch_realtek.c

Enable auto-muting in model=auto only for devices with HP and speakers.
For devices with HP and line-outs, don't enable the auto-muting.

Also, add a debug print to show the auto-mute feature.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'topic/hda-realtek-amp' into topic/hda
Takashi Iwai [Tue, 28 Apr 2009 07:51:57 +0000 (09:51 +0200)]
Merge branch 'topic/hda-realtek-amp' into topic/hda

15 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Tue, 28 Apr 2009 07:51:49 +0000 (09:51 +0200)]
Merge branch 'fix/hda' into topic/hda

15 years agoALSA: hda - Add amp initialization for realtek auto mode
Takashi Iwai [Wed, 22 Apr 2009 14:31:35 +0000 (16:31 +0200)]
ALSA: hda - Add amp initialization for realtek auto mode

In the realtek auto-probing mode, the initialization of amp with
some magic COEF or EAPD verbs is applied only when the codec SSID
has valid values to satisfy the realtek's definition.
However, many devices don't provide in that way, thus the device
doesn't work as is.

This patch allows the same initialization code even if the SSID
doesn't pass the bit test.  Also, alc_subsystem_id() is changed
just to check and define the type, so that it's called in the
parser, instead of the initializer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix init verbs of AD1884A mobile model
Takashi Iwai [Thu, 23 Apr 2009 06:24:48 +0000 (08:24 +0200)]
ALSA: hda - Fix init verbs of AD1884A mobile model

The current ad1884a-mobile model has a problem that the speaker output
doesn't work sometimes after boot or power-saving on some HP laptops.
It seems that the verbs accessing to the non-functional widgets cause
this problem.

This patch simplifies the init verbs for mobile model not to touch
unnecessary setups so that it avoids the speaker-mute problem.

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

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

15 years agoALSA: hda - Add quirk for Packard Bell RS65
Takashi Iwai [Tue, 21 Apr 2009 16:36:30 +0000 (18:36 +0200)]
ALSA: hda - Add quirk for Packard Bell RS65

Added a quirk (model=m51va) for Packard Bell RS65 with ALC663.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix a typo in debug print for realtek auto-detection
Takashi Iwai [Tue, 21 Apr 2009 16:33:12 +0000 (18:33 +0200)]
ALSA: hda - Fix a typo in debug print for realtek auto-detection

The NID and ASS numbers were swapped...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - minor optimization in hda_set_power_state()
Takashi Iwai [Tue, 21 Apr 2009 11:37:29 +0000 (13:37 +0200)]
ALSA: hda - minor optimization in hda_set_power_state()

Check the target power-state before checking EAPD exception to reduce
unneeded verb executions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'topic/hda-cache' into topic/hda
Takashi Iwai [Tue, 21 Apr 2009 09:11:54 +0000 (11:11 +0200)]
Merge branch 'topic/hda-cache' into topic/hda

15 years agoALSA: hda - Add debug prints for Realtek auto-init
Takashi Iwai [Tue, 24 Mar 2009 06:43:24 +0000 (07:43 +0100)]
ALSA: hda - Add debug prints for Realtek auto-init

Added a couple of debug prints to show the checked id numbers in
alc_subsystem_id().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Retry codec-verbs at errors
Takashi Iwai [Tue, 24 Mar 2009 06:36:09 +0000 (07:36 +0100)]
ALSA: hda - Retry codec-verbs at errors

The current error-recovery scheme for the codec communication errors
doesn't work always well.  Especially falling back to the
single-command mode causes the fatal problem on many systems.

In this patch, the problematic verb is re-issued again after the error
(even with polling mode) instead of the single-cmd mode.  The
single-cmd mode will be used only when specified via the command
option explicitly, mainly just for testing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Cache PCM and STREAM parameters queries
Takashi Iwai [Tue, 24 Mar 2009 06:32:14 +0000 (07:32 +0100)]
ALSA: hda - Cache PCM and STREAM parameters queries

Cache quries for PCM and STREAM parameters as well as ampcap and
pincap sharing the hash table.  This will reduce the superfluous
access of the same codec verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Tue, 21 Apr 2009 05:41:12 +0000 (07:41 +0200)]
Merge branch 'fix/hda' into topic/hda

15 years agoALSA: hda - Add quirks for Realtek codecs
Kailang Yang [Tue, 21 Apr 2009 05:39:04 +0000 (07:39 +0200)]
ALSA: hda - Add quirks for Realtek codecs

- Support ASUS F81Se F5Q P80 U20A U80 U50 UX50 for ALC269
- Support ASUS F70SL UX20 X58LE F50Z N80Vc N81Te N505Tp Vx3V N5051A
  for ALC663
- Support DELL ZM1 for ALC272

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix alc662_init_verbs
Kailang Yang [Tue, 21 Apr 2009 05:35:25 +0000 (07:35 +0200)]
ALSA: hda - Fix alc662_init_verbs

Don't unmute unneeded amps for input mixers of ALC662 & co.
It caused possible recording noises.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Use snd_hda_codec_get_pincfg() in patch_ca0110.c
Takashi Iwai [Mon, 20 Apr 2009 08:51:11 +0000 (10:51 +0200)]
ALSA: hda - Use snd_hda_codec_get_pincfg() in patch_ca0110.c

Use the new function to reduce the access and allow the user setup
via sysfs, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix channels_max setting for CA0110
Takashi Iwai [Mon, 20 Apr 2009 08:49:25 +0000 (10:49 +0200)]
ALSA: hda - Fix channels_max setting for CA0110

Added the missing definition of max channels for CA0110, which resulted
in an error at opening PCM devices.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Set function_id only on FG nodes
Takashi Iwai [Fri, 17 Apr 2009 16:04:41 +0000 (18:04 +0200)]
ALSA: hda - Set function_id only on FG nodes

(Re)set function_id only from the value on FG nodes.
The current code overrides the value with the last widget.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add upper-limit of mixer amp for AD1884A-laptop model, too
Takashi Iwai [Thu, 16 Apr 2009 12:19:19 +0000 (14:19 +0200)]
ALSA: hda - Add upper-limit of mixer amp for AD1884A-laptop model, too

Add the upper-limit of mixer amp for AD1884A-laptop model just like
the mobile model for some HP laptops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs
Takashi Iwai [Thu, 16 Apr 2009 10:20:24 +0000 (12:20 +0200)]
ALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs

When the headphone can have no unique DAC, the current code doesn't
check the HP-detection although it should.  Put the hp-detection check
before the DAC check to fix this bug.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Check strcpy length
Takashi Iwai [Thu, 16 Apr 2009 08:22:24 +0000 (10:22 +0200)]
ALSA: hda - Check strcpy length

Check the length to copy via strlen() beforehand to avoid the stack
corruption, or use strlcpy() to be safe in HD-audio codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add Creative CA0110-IBG support
Takashi Iwai [Thu, 16 Apr 2009 06:53:34 +0000 (08:53 +0200)]
ALSA: hda - Add Creative CA0110-IBG support

Added the support for Creative SB X-Fi boards with UAA (HD-audio) mode.
In the HD-audio mode, no multiple streams are supported by just it
behaves like a normal HD-audio device.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda_intel.c - Consolidate bitfields
Joe Perches [Wed, 15 Apr 2009 18:39:01 +0000 (11:39 -0700)]
ALSA: hda_intel.c - Consolidate bitfields

Commit fa00e046b41663cbda9b1affc0594669e5f14219
added a new bitfield not adjacent to other
bitfields in the same struct.  Moved the new one.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Wed, 15 Apr 2009 16:11:11 +0000 (09:11 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix the cmd cache keys for amp verbs
  ALSA: add missing definitions(letters) to HD-Audio.txt
  ALSA: hda - Add quirk mask for Fujitsu Amilo laptops with ALC883
  [ALSA] intel8x0: add one retry to the ac97_clock measurement routine
  [ALSA] intel8x0: fix wrong conditions in ac97_clock measure routine
  ALSA: hda - Avoid call of snd_jack_report at release
  ALSA: add private_data to struct snd_jack
  ALSA: snd-usb-caiaq: rename files to remove redundant information in file pathes
  ALSA: snd-usb-caiaq: clean up header includes
  ALSA: sound/pci: use memdup_user()
  ALSA: sound/usb: use memdup_user()
  ALSA: sound/isa: use memdup_user()
  ALSA: sound/core: use memdup_user()
  [ALSA] intel8x0: do not use zero value from PICB register
  [ALSA] intel8x0: an attempt to make ac97_clock measurement more reliable
  [ALSA] pcm-midlevel: Add more strict buffer position checks based on jiffies
  [ALSA] hda_intel: fix unexpected ring buffer positions
  ASoC: Disable S3C64xx support in Kconfig
  ASoC: magician: remove un-necessary #include of pxa-regs.h and hardware.h

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
Linus Torvalds [Wed, 15 Apr 2009 16:04:12 +0000 (09:04 -0700)]
Merge git://git./linux/kernel/git/steve/gfs2-2.6-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
  GFS2: Use DEFINE_SPINLOCK
  GFS2: cleanup file_operations mess
  GFS2: Move umount flush rwsem
  GFS2: Fix symlink creation race
  GFS2: Make quotad's waiting interruptible

15 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Wed, 15 Apr 2009 16:03:47 +0000 (09:03 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block: (28 commits)
  cfq-iosched: add close cooperator code
  cfq-iosched: log responsible 'cfqq' in idle timer arm
  cfq-iosched: tweak kick logic a bit more
  cfq-iosched: no need to save interrupts in cfq_kick_queue()
  brd: fix cacheflushing
  brd: support barriers
  swap: Remove code handling bio_alloc failure with __GFP_WAIT
  gfs2: Remove code handling bio_alloc failure with __GFP_WAIT
  ext4: Remove code handling bio_alloc failure with __GFP_WAIT
  dio: Remove code handling bio_alloc failure with __GFP_WAIT
  block: Remove code handling bio_alloc failure with __GFP_WAIT
  bio: add documentation to bio_alloc()
  splice: add helpers for locking pipe inode
  splice: remove generic_file_splice_write_nolock()
  ocfs2: fix i_mutex locking in ocfs2_splice_to_file()
  splice: fix i_mutex locking in generic_splice_write()
  splice: remove i_mutex locking in splice_from_pipe()
  splice: split up __splice_from_pipe()
  block: fix SG_IO to return a proper error value
  cfq-iosched: don't delay queue kick for a merged request
  ...

15 years agoMerge branch 'topic/hda' into for-linus
Takashi Iwai [Wed, 15 Apr 2009 15:52:32 +0000 (17:52 +0200)]
Merge branch 'topic/hda' into for-linus

* topic/hda:
  ALSA: hda - Fix the cmd cache keys for amp verbs
  ALSA: add missing definitions(letters) to HD-Audio.txt

15 years agoALSA: hda - Fix the cmd cache keys for amp verbs
Takashi Iwai [Wed, 15 Apr 2009 15:48:35 +0000 (17:48 +0200)]
ALSA: hda - Fix the cmd cache keys for amp verbs

Fix the key value generation for get/set amp verbs.  The upper bits of
the parameter have to be combined with the verb value to be unique for
each direction/index of amp access.

This fixes the resume problem on some hardwares like Macbook after
the channel mode is changed.

Tested-by: Johannes Berg <johannes@sipsolutions.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Wed, 15 Apr 2009 15:42:40 +0000 (08:42 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  powerpc: pseries/dtl.c should include asm/firmware.h
  powerpc: Fix data-corrupting bug in __futex_atomic_op
  powerpc/pseries: Set error_state to pci_channel_io_normal in eeh_report_reset()
  powerpc: Allow 256kB pages with SHMEM
  powerpc: Document new FSL I2C bindings and cleanup
  powerpc/mm: Fix compile warning
  powerpc/85xx: TQM8548: update defconfig
  powerpc/85xx: TQM8548: use proper phy-handles for enet2 and enet3
  powerpc/85xx: TQM85xx: correct address of LM75 I2C device nodes
  powerpc: Add support for early tlbilx opcode
  powerpc: Fix tlbilx opcode

15 years agoacpi-cpufreq: fix 'smp_call_function_many()' confusion
Linus Torvalds [Wed, 15 Apr 2009 15:05:13 +0000 (08:05 -0700)]
acpi-cpufreq: fix 'smp_call_function_many()' confusion

It turns out that 'smp_call_function_many()' doesn't work at all like
'smp_call_function_single()', and my change to Andrew's patch to use it
rather than a loop over all CPU's acpi-cpufreq doesn't work.

My bad.

'smp_call_function_many()' has two "features" (aka "documented bugs"):

 (a) it needs to be called with preemption disabled, because it uses
     smp_processor_id() without guarding the CPU lookup with 'get_cpu()'
     and 'put_cpu()' like the 'single' variant does.

 (b) even if the current CPU is part of the CPU mask, it won't do the
     call on that CPU.

Still, we're better off trying to use 'smp_call_function_many()' than
looping over CPU's, since it at least in theory allows us to use a
broadcast IPI and do it all in parallel.  So let's just work around the
silly semantic bugs in that function.

Reported-and-tested-by: Ali Gholami Rudi <ali@rudi.ir>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocfq-iosched: add close cooperator code
Jens Axboe [Wed, 15 Apr 2009 10:15:11 +0000 (12:15 +0200)]
cfq-iosched: add close cooperator code

If we have processes that are working in close proximity to each
other on disk, we don't want to idle wait. Instead allow the close
process to issue a request, getting better aggregate bandwidth.
The anticipatory scheduler has similar checks, noop and deadline do
not need it since they don't care about process <-> io mappings.

The code for CFQ is a little more involved though, since we split
request queues into per-process contexts.

This fixes a performance problem with eg dump(8), since it uses
several processes in some silly attempt to speed IO up. Even if
dump(8) isn't really a valid case (it should be fixed by using
CLONE_IO), there are other cases where we see close processes
and where idling ends up hurting performance.

Credit goes to Jeff Moyer <jmoyer@redhat.com> for writing the
initial implementation.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agocfq-iosched: log responsible 'cfqq' in idle timer arm
Jens Axboe [Wed, 15 Apr 2009 10:14:13 +0000 (12:14 +0200)]
cfq-iosched: log responsible 'cfqq' in idle timer arm

Makes it easier to read the traces.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agocfq-iosched: tweak kick logic a bit more
Jens Axboe [Wed, 15 Apr 2009 10:12:46 +0000 (12:12 +0200)]
cfq-iosched: tweak kick logic a bit more

We only kick the dispatch for an idling queue, if we think it's a
(somewhat) fully merged request. Also allow a kick if we have other
busy queues in the system, since we don't want to risk waiting for
a potential merge in that case. It's better to get some work done and
proceed.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>