Takashi Iwai [Thu, 19 Nov 2009 10:48:44 +0000 (11:48 +0100)]
ALSA: hda - Change quirk for Acer Aspire 5930G
Change the quirk for Acer Aspire 5930G from model=acer-aspire-4930g to
model=acer-aspre-6530g. The tuba bass gets muted along with the other
built-in speakers upon headphones insertion, the internal mic works
perfectly etc.
Takashi Iwai [Wed, 18 Nov 2009 16:20:24 +0000 (17:20 +0100)]
ALSA: hda - Fix mute-LED sync on HP laptops with IDT92HD83xxx codecs
The mute-LED isn't synchronized with the actual mute state on some
HP laptops with IDT 92HD83xxx codecs. A similar hack using
check_power_status callback is added for this codec, too.
Takashi Iwai [Wed, 18 Nov 2009 13:23:37 +0000 (14:23 +0100)]
ALSA: hda - Fix detection of dual headphones
The dual-headphone mode with STAC/IDT codecs is useful only for machines
that have two (or more) built-in headphones.
But, some HP laptops give multiple headphone pin configs, one for the
built-in and another for the separate (likely a docking station) one.
This results in a missing speaker volume control.
This patch adds more check for the dual-headphone mode to avoid this
problem.
Wu Fengguang [Wed, 18 Nov 2009 04:38:06 +0000 (12:38 +0800)]
ALSA: intelhdmi - sticky stream id and format
We tracked down the first-0.5s-hdmi-audio-samples-lost problem to the
AC_VERB_SET_CHANNEL_STREAMID command. It is suspected that many HDMI
sinks need some time to adapt to the new state.
The workaround is to avoid changing stream id/format whenever possible.
Proposed by David.
Takashi Iwai [Tue, 17 Nov 2009 15:01:58 +0000 (16:01 +0100)]
ALSA: hda - Disable default quirk for Sony VAIO with ALC262 codec
The ALC262 has a quirk entry matching with all Sony Vaio laptops
to use model=sony-assamd as default. But, model=auto works much better
for new models in the recent driver versions, thus it's safer to disable
that default quirk entry.
Jaroslav Kysela [Fri, 13 Nov 2009 17:41:52 +0000 (18:41 +0100)]
ALSA: hda - add beep_mode module parameter
The beep_mode parameter for snd-hda-intel module allows to choose among
different digital beep device registation to the input layer.
0 = do not register to the input layer
1 = register to the input layer all time
2 = use "Beep Switch" control exported to user space mixer applications
Also, introduce CONFIG_SND_HDA_INPUT_BEEP_MODE for default value.
Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Wed, 21 Oct 2009 12:48:23 +0000 (14:48 +0200)]
ALSA: hda_intel: Digital PC Beep - change behaviour for input layer
Original implementation was keeping registered input device for SND_BEEP
and SND_TONE events all time. This patch changes this behaviour:
If digital PC Beep is turned off using universal control switch,
the input device is unregistered.
Explanation: The kd_mksound() send SND_BEEP and SND_TONE only to last
registered device acceping those events. It means that the HDA Intel
audio driver blocks also the internal PC Speaker device (pcspkr.c
driver) even if the HDA Beep is muted. The user can easy disable
all beeps using 'setterm -blength 0' or 'xset b off' command.
Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_via.c: work around gcc-4.0.2 ICE
sound/pci/hda/patch_via.c: In function 'via_hp_bind_automute':
sound/pci/hda/patch_via.c:2074: internal compiler error: in do_SUBST, at combine.c:462
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
[added a comment by tiwai]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 12 Nov 2009 08:50:28 +0000 (09:50 +0100)]
ALSA: hda - Don't access invalid substream in proc file
The commit e3303235209c0496b490e10ab131e72a9568c153
"ALSA: hda - proc - show which I/O NID is associated to PCM device"
introduces the access to substream pointer. But, PCMs may have no
substreams in one or both directions, and this results in NULL
dereference. Also, print the first substream number doesn't make
sense.
This patch removes the access to the substream pointer, and reformat
to fit to the standard coding style.
Daniel T Chen [Wed, 11 Nov 2009 19:32:10 +0000 (14:32 -0500)]
ALSA: hda: Use model=mb5 for MacBookPro 5,2
BugLink: https://bugs.launchpad.net/bugs/462098
Until we can look closer at the verbs, let's use ALC885_MB5 for
codec SSID 0x106b4600 to enable playback and capture for MacBookPro
5,2s.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 11 Nov 2009 08:34:25 +0000 (09:34 +0100)]
ALSA: hda - Add power on/off counter
Added the power on/off counter and expose via sysfs files.
The sysfs files, power_on_acct and power_off_acct, are created under
each codec hwdep sysfs directory (e.g. /sys/class/sound/hwC0D0).
The files show the msec length of the codec power-on and power-off,
respectively.
Roel Kluin [Tue, 10 Nov 2009 19:11:55 +0000 (20:11 +0100)]
ALSA: hda - possible read past array alc88[02]_parse_auto_config()
The test of index `i' is after the read - too late - and
unsafe: if snd_hda_get_connections() fails in the last
iteration a read beyond the array is possible.
Takashi Iwai [Tue, 10 Nov 2009 15:08:45 +0000 (16:08 +0100)]
ALSA: hda - Avoid quirk for HP dc5750
The present quirk for HP dc5750 seems broken and maps the pins wrongly.
Since the auto-parser works well for this device, set the default entry
to use model=auto.
Daniel Drake [Mon, 9 Nov 2009 15:17:24 +0000 (15:17 +0000)]
ALSA: hda - Tweak OLPC XO-1.5 microphone bias
Our contacts at Conexant suggested that we reduce the external
microphone bias to 50% in order to center the input signal with
the DC input range of the codec. This is because the microphone
port is DC coupled for potential use with sensors.
Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Sat, 7 Nov 2009 08:49:04 +0000 (09:49 +0100)]
ALSA: hda - Don't initialize CORB/RIRB for single_cmd mode
So far, CORB/RIRB still remains even if the driver is switched to the
single_cmd mode. The specification says that this should be disabled,
but I hoped this isn't the case; indeed most devices worked together with
CORB/RIRB.
However, Poulsbo (US15W) seems problematic with this setup, and it
requires to disable CORB/RIRB when single_cmd is used.
Now this patch disables CORB/RIRB initialization when the single_cmd
mode is used. Also the unsolicited event is disabled because it can't
work without RIRB.
Takashi Iwai [Fri, 6 Nov 2009 14:47:50 +0000 (15:47 +0100)]
ALSA: hda - Reset pins of IDT/STAC codecs at free
Some laptops cause annoying clicks or noises at shutdown/reboot since
the speaker pin is set still high. Apply the same procedure used for
the suspend to avoid such clicks/noises for freeing the codec, too.
Jaroslav Kysela [Tue, 3 Nov 2009 14:47:25 +0000 (15:47 +0100)]
ALSA: rename "PC Speaker" and "PC Beep" controls to "Beep"
To avoid confusion in control names for the standard analog PC Beep generator
using a small Internal PC Speaker, rename all related "PC Speaker" and "PC
Beep" controls to "Beep" only. This name is more universal and can be also
used on more platforms without confusion.
Introduce also "Internal Speaker" in ControlNames.txt for systems with
full-featured build-in internal speaker.
Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is a port of the sound/oss/sh_dac_audio.c driver.
The driver uses an on-chip 8-bit D/A converter, which has a speaker connected
to one of its channels, found in several ancient HP machines.
For interrupts it uses a high-resolution timer (hrtimer).
Tested on SH7709 based hp6xx (HP Jornada 680/690 and HP Palmtop 620lx/660lx).
Also, since OSS Emulation works, the old OSS sound/oss/sh_dac_audio.c driver
would be obsolete soon, and it could be removed.
Signed-off-by: Rafael Ignacio Zurita <rizurita@yahoo.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Vitaliy Kulikov [Wed, 4 Nov 2009 06:57:45 +0000 (07:57 +0100)]
ALSA: hda - Enable GPIO control for mute LED on HP systems
This patch enables GPIO to control mute LED indicator on the HP systems
with the special string in BIOS and applies it with the correct polarity on
HP B-series systems.
It also restores configuration of the pin intended as the second Headphone
on HP B-series systems but configured as something else in the BIOS to
pass MS DTM.
Daniel T Chen [Sun, 1 Nov 2009 23:32:29 +0000 (18:32 -0500)]
ALSA: hda: Use quirk mask for Dell Inspiron Mini9/Vostro A90 using ALC268
BugLink: https://bugs.launchpad.net/bugs/368629
We should use a quirk mask for these Dell Inspiron Mini9s and Vostro
A90s, as the model=dell quirk appears to enable audio on them.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stas Sergeev [Sun, 1 Nov 2009 10:13:19 +0000 (11:13 +0100)]
ALSA: snd-pcsp: add nopcm mode
Currently, if the high-res timers are unavailable, snd-pcsp does not
initialize. People who choose it over pcspkr, loose their console beeps
in that case and get annoyed.
With this patch, the console beeps remain regardless of the high-res
timers. Additionally, the "nopcm" modparam is added to forcibly
disable the PCM capabilities of the driver.
Takashi Iwai [Fri, 30 Oct 2009 12:21:49 +0000 (13:21 +0100)]
ALSA: hda - Switch to polling mode before disabling MSI
When any codec communication error happens, try to switch to the polling
mode first before turning off MSI. MSI gets more stable nowadays, thus
we should keep it on as much as possible.
Krzysztof Helt [Sat, 24 Oct 2009 15:47:33 +0000 (17:47 +0200)]
sound: remove OSS Ensoniq SoundScape driver
The OSS driver for Ensoniq SoundScape cards is broken after conversion
to mutexes and a new ALSA snd-sscape driver handles all devices handled
by the OSS one.
The ALSA driver was tested with these cards:
Spea V7 MediaFX
Ensoniq Soundscape Elite
Ensoniq Soundscape VIVO (this card is not handled by the OSS driver)
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch [Thu, 22 Oct 2009 07:04:09 +0000 (09:04 +0200)]
sound: via82xx: deactivate DXS controls of inactive streams
Activate the DXS volume controls only when the corresponding stream is
being used. This makes the behaviour consistent with the other drivers
that have per-stream volume controls.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 30 Oct 2009 11:31:39 +0000 (12:31 +0100)]
ALSA: hda - Add a proper ifdef to a debug code
Added a proper ifdef CONFIG_SND_DEBUG_VERBOSE to avoid a compile warning:
sound/pci/hda/patch_intelhdmi.c:406: warning: ‘hdmi_get_channel_count’ defined but not used
Roel Kluin [Fri, 23 Oct 2009 14:03:08 +0000 (16:03 +0200)]
ALSA: Cleanup redundant tests on unsigned
The variables are unsigned so the test `>= 0' is always true,
the `< 0' test always fails. In these cases the other part of
the test catches wrapped values.
In dac_audio_write() there does not occur a test for wrapped
values, but the test appears redundant.
Julia Lawall [Sat, 17 Oct 2009 06:33:47 +0000 (08:33 +0200)]
ALSA: sound/parisc: Move dereference after NULL test
If the NULL test on h is needed in snd_harmony_mixer_init, then the
dereference should be after the NULL test.
Actually, there is a sequence of calls: snd_harmony_create, then
snd_harmony_pcm_init, and then snd_harmony_mixer_init. snd_harmony_create
initializes h, but may indeed leave it as NULL. There was no NULL test at
the beginning of snd_harmony_pcm_init, so I have added one. The NULL test
in snd_harmony_mixer_init is then not necessary, but in case the ordering
of the calls changes, I have left it, and moved the dereference after it.
A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):
Julia Lawall [Sat, 17 Oct 2009 06:33:22 +0000 (08:33 +0200)]
ALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests
In pcm.c, if the NULL test on pcm is needed, then the dereference should be
after the NULL test.
In dummy.c and ali5451.c, the context of the calls to
snd_card_dummy_new_mixer and snd_ali_free_voice show that dummy and pvoice,
respectively cannot be NULL.
A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):
Stas Sergeev [Fri, 30 Oct 2009 10:51:24 +0000 (11:51 +0100)]
ALSA: pcsp - Fix nforce workaround
The attached patch fixes the problems introduced in this commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=eea0579fc85e64e9f05361d5aacf496fe7a151aa
- Fix nForce workaround by honouring the pointer_update var
- Revert "ns" to u64, as per the hrtimer API
- Revert to the zero-delay timer startup, since I can't reproduce any
problem with it (please, give me the hint!)
Wu Fengguang [Fri, 30 Oct 2009 10:40:03 +0000 (11:40 +0100)]
ALSA: hda - allow up to 4 HDMI devices
The new Intel HDMI codec supports 2 independant HDMI/DisplayPort pipes.
We'll be exporting them as 2 pcm devices. So bump up the allowed number
of HDMI devices.
Wu Zhangjin [Thu, 15 Oct 2009 02:22:54 +0000 (10:22 +0800)]
ALSA: SND_CS5535AUDIO: Remove the X86 platform dependency
SND_CS5535AUDIO is available on Loongson(MIPS compatible) family
machines, and checked it with ARCH=x86_64, no relative compiling
warnings & errors, so, remove the platform dependency directly.
Logan Li [Wed, 14 Oct 2009 02:10:38 +0000 (10:10 +0800)]
ALSA: HDA VIA: Remove 48k sample rate limit for S/PDIF
48 kHz limit is for slightly better stability, and sample rates other
than 48k (like 96k/192k) are for better sound quality.
We choose better quality, so remove the 48k limit.
Signed-off-by: Logan Li <loganli@viatech.com.cn> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 13 Oct 2009 14:07:59 +0000 (16:07 +0200)]
ALSA: hda - Allow all formats as default for Nvidia HDMI
In the commit f0613d5752d8f7d1d02e6d40947f38877fdf9c90
ALSA: hda - Add full rates/formats support for Nvidia HDMI
the flag LIMITIED_RATE_FMT_SUPPORT was set as default, as I forgot
to clear before commit.
After a reboot on an ARM1176 which amounts to a softreset, it has been
noted that the ALSA driver does not get registered and the probe fails
with the error "aaci-pl041 fpga:04: ac97 read back fail". In the process
of reading from a register the SL1TxBusy bit is set indicating that the
transceiver is busy and remains so until the default timeout occurs.
Set the Power down register 0x26 to an arbitrary value as specified in
the PL041 manual (page: 3-18) so that AACISL1TX/AACISL2TX registers take
their default state.
Signed-off-by: Philby John <pjohn@in.mvista.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Sun, 11 Oct 2009 15:38:29 +0000 (17:38 +0200)]
ALSA: hda - Fix mute sound with STAC9227/9228 codecs
On FSC laptops, the sound gets muted gradually when the volume is chnaged.
This is due to the wrong volume-knob widget setup. The delta bit (bit 7)
shouldn't be set for these devices.
This patch adds a new quirk to set the value 0x7f to the widget 0x24
instead of 0xff.
Tobias Hansen [Mon, 12 Oct 2009 14:24:15 +0000 (16:24 +0200)]
ALSA: snd-usb-us122l: corrent error number for not probing US-144 on ehci-hcd
snd-usb-us122l: corrent error number for not probing US-144 on ehci-hcd
This is the correct error number for telling the USB system that this
driver is not for the device.
Wu Zhangjin [Sat, 10 Oct 2009 15:53:49 +0000 (23:53 +0800)]
ALSA: SND_CS5535AUDIO: Remove the X86 platform dependency
SND_CS5535AUDIO is available on Loongson(MIPS compatible) family
machines, and checked it with ARCH=x86_64, no relative compiling
warnings & errors, so, remove the platform dependency directly.
Stephen Rothwell [Mon, 12 Oct 2009 04:56:17 +0000 (15:56 +1100)]
sound: use semicolons to end statements
Fixes:
sound/pci/hda/patch_via.c: In function 'patch_vt1718S':
sound/pci/hda/patch_via.c:4951: error: expected expression before 'return'
sound/pci/hda/patch_via.c: In function 'patch_vt1716S':
sound/pci/hda/patch_via.c:5441: error: expected expression before 'return'
sound/pci/hda/patch_via.c: In function 'patch_vt2002P':
sound/pci/hda/patch_via.c:5794: error: expected expression before 'return'
sound/pci/hda/patch_via.c: In function 'patch_vt1812':
sound/pci/hda/patch_via.c:6148: error: expected expression before 'return'
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: ice1724 - Make call to set hw params succeed on ESI Juli@
If two streams are started immediately after one another (such as a
playback and a recording stream), the call to set hw params fails with
EBUSY. This patch makes the call succeed, so playback and recording will
work properly.
Signed-off-by: David Henningsson <launchpad.web@epost.diwic.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>