I forgot this again... codec->in_pm is in #ifdef CONFIG_PM
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If this array is not cleared, the jack related code later might
fail to create "Internal Speaker Phantom Jack" on Dell Inspiron 3420 and
Dell Vostro 2420.
BugLink: https://bugs.launchpad.net/bugs/1076840
Cc: stable@vger.kernel.org (3.6+)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We found a new codec ID 292, and that just a simple quirk would enable
sound output/input on this ALC292 chip.
BugLink: https://bugs.launchpad.net/bugs/1081466
Cc: stable@vger.kernel.org
Tested-by: Acelan Kao <acelan.kao@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We've got a report that the runtime PM may make the codec the
unresponsive on AMD platforms. Since the feature has been tested only
on the recent Intel platforms, it's safer to limit the support to such
devices for now.
This patch adds a new DCAPS bit flag indicating the runtime PM
support, and mark it for Intel controllers.
Reported-and-tested-by: Julian Wollrath <jwollrath@web.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the bus reset is performed during the suspend/resume (including
the power-saving too), it calls snd_hda_suspend() and
snd_hda_resume() again, and deadlocks eventually.
For avoiding the recursive call, add a new flag indicating that the PM
is being performed, and don't go to the bus reset mode when it's on.
Reported-and-tested-by: Julian Wollrath <jwollrath@web.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
There is a precedence bug because | has higher precedence than ?:. This
code was cut and pasted and I fixed a similar bug a few days ago.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
I don't think this works as intended. '|' higher precedence than ?: so
the bitwize OR "0 | (val & STR_MOST)" is a no-op.
I have re-written it to be more clear.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is another variant of iMac 9,1 with a different codec SSID.
Reported-and-tested-by: Everaldo Canuto <everaldo.canuto@gmail.com>
Cc: <stable@vger.kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
alc269_toggle_power_output() was only use in ALC269VB. I rename it to
alc269vb_toggle_power_output().
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The RayDAT reports the sync status of its inputs in consecutive bit
positions, so all we do in hdspm_s1_sync_check is to iterate over idx:
status = hdspm_read(hdspm, HDSPM_RD_STATUS_1);
lock = (status & (0x1<<idx)) ? 1 : 0;
sync = (status & (0x100<<idx)) ? 1 : 0;
The index is given in kcontrol->private_value:
HDSPM_SYNC_CHECK("WC SyncCheck", 0),
HDSPM_SYNC_CHECK("AES SyncCheck", 1),
HDSPM_SYNC_CHECK("SPDIF SyncCheck", 2),
HDSPM_SYNC_CHECK("ADAT1 SyncCheck", 3),
HDSPM_SYNC_CHECK("ADAT2 SyncCheck", 4),
HDSPM_SYNC_CHECK("ADAT3 SyncCheck", 5),
HDSPM_SYNC_CHECK("ADAT4 SyncCheck", 6),
HDSPM_SYNC_CHECK("TCO SyncCheck", 7),
HDSPM_SYNC_CHECK("SYNC IN SyncCheck", 8),
The patch corrects the indicated sync flags by passing the proper index
value to hdspm_s1_sync_check().
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
To parse properly the subwoofer outputs on ASUS G75 laptop with VT1802
codec, correct the default configurations of speaker pins 0x24 and
0x33.
Reported-by: Massimo Del Fedele <max@veneto.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
VT1802 codec provides the invalid connection lists of NID 0x24 and
0x33 containing the routes to a non-exist widget 0x3e. This confuses
the auto-parser. Fix it up in the driver by overriding these
connections.
Reported-by: Massimo Del Fedele <max@veneto.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In via_auto_fill_adc_nids(), the parser tries to fill dac_nids[] at
the point of the current line-out (i). When no valid path is found
for this output, this results in dac = 0, thus it creates a hole in
dac_nids[]. This confuses is_empty_dac() and trims the detected DAC
in later reference.
This patch fixes the bug by appending DAC properly to dac_nids[] in
via_auto_fill_adc_nids().
Reported-by: Massimo Del Fedele <max@veneto.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Several bug reports suggest that the forcibly resetting IEC958 status
bits is required for AD codecs to get the SPDIF output working
properly after changing streams.
Original fix credit to Javeed Shaikh.
BugLink: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/359361
Reported-by: Robin Kreis <r.kreis@uni-bremen.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add generic ESS vendor ID to pm_whitelist. This should fix suspend on
all Maestro-2 and Maestro-2E based PCI cards.
Tested on Terratec DMX and SF64-PCE2.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Correctly enable the digital microphones with the right bits in the
right coeffecient registers on Cirrus CS4206/7 codecs. It also
prevents misconfiguring ADC1/2.
This fixes the digital mic on the Macbook Pro 10,1/Retina.
Based-on-patch-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Daniel J Blueman <daniel@quora.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The audio chipset used in Teradici's Tera2 host cards is the same as that in
the 1200 host cards. This patch allows ALSA to recognize the Tera2 cards.
Signed-off-by: Lars R. Damerow <lars@pixar.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The rate isn't restored properly after resume since it's only set up
in hw_params, and not in prepare callback. For fixing it, put the
corresponding call to resume callback as well.
Reported-and-tested-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The BIOS on HP dv5 doesn't have the DMI string to guide the setup of
mute led GPIO and polarity. Associate this laptop with the hp-inv-led
model.
Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
Tested-by: Vinícius Angiolucci <angiolucci@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
By some reason, Toshiba laptop doesn't like the EAPD turned up for the
headphone pin. Add a fix up code to force to turn down EAPD for NID
0x15.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=569991
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
checkpatch.pl discourages the use of spaces at the beginning of lines.
Some of the CTL_ELEM defines were not properly indented.
This patch replaces the leading spaces by tabs. No functionality is
changed, the commit is purely cosmetic.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
According to the documentation, AES32 cards use a different bit position
for reporting the sync_in status.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In contrast to AES32, MADI uses the first status register to report the
sync_in status.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
MADI and MADIface used to report the autosync_sample_rate. This
functionality was lost in commit
0dca179306, this commit now adds it back.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Missing breaks lead to a fall-through, thus causing the wrong
autosync_sample_rate to be reported.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Due to missing breaks and the resulting fall-through, card subtype
selection was effectively missing, thus causing the wrong sync check
functions to be called.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
As a follow-up to a97bda7d29, report the
external sample rate as system_sample_rate when in slave mode.
For PCIe MADI cards, the DDS value automatically contains the external
sample rate, but the PCI version needs this manual workaround.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The DDS value is the actual physical sample rate. We set it indirectly
when selecting 44100, 48000 and so on via snd_hdspm_hw_params or
hdspm_set_clock_source.
This commit now allows the DDS value to be altered at runtime, thus
speeding up or slowing down the physical sample rate. This is required
for MADI's varispeed that allows for ±12.5% speed adjustment from the
"selected" rate (32kHz, 44100kHz, 48kHz and so on).
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
I have a Lenovo ThinkPad T430 and an UltraBase Series 3 docking
station.
Without this patch, if I plug my headphones into the jack on the
computer, everything works fine. The computer speakers mute and the
audio is played in the headphones. However, if I plug into the docking
station headphone jack the computer speakers are muted but there is no
audio in the headphones.
Addresses https://bugs.launchpad.net/bugs/1060372
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add chip details for E-mu 1010 PCIe card. It has the same
chip as found in E-mu 1010b but it uses different PCI id.
Signed-off-by: Maxim Kachur <mcdebugger@duganet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Even when CONFIG_SND_DEBUG is not enabled, we don't want to
return an arbitrary memory location when the channel count is
larger than we expected.
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If LPIB reports a pretty bad value, we can't trust such hardware for
calculating the PCM delay. Automatically turn off the delay counting
when such a problem is encountered.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=48911
Cc: <stable@vger.kernel.org> [v3.6]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Delay the registration of VGA switcheroo client to the end of the
probing. Otherwise a too quick switching may result in Oops during
probing.
Also add the check of the return value from snd_hda_lock_devices().
Reported-and-tested-by: Daniel J Blueman <daniel@quora.org>
Cc: <stable@vger.kernel.org> [v3.5+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The white-list entries of position_fix for ASUS laptops have been
added just as a workaround for broken COMBO mode. Now the combo mode
itself is disabled, we can safely remove these entries.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This update contains a few cleanup works, regression/stable fixes
gathered since the last pull request.
- Clean up with generic hd-audio jack handling code by David
Henningsson
- A few regression fixes for standardized HD-audio auto-parser
- Misc clean-up and small fixes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iQIcBAABAgAGBQJQdsj/AAoJEGwxgFQ9KSmkR6YP/A95xqlZiESwOjeKhU0um1lp
4yitG7sRbOy6g4mOPGtLAdkWcFapz7Lu99xI7GpEWF8aubYahF9rcBjhy3EVGhE8
SUlzG6s9vZGFzFMnLOmhGo6yFTUZx41qUU+RGTLE9tSPFJBsK6gjnOeGEXu/1jRD
ZXPhrecpE8NOMgTcA/mQFhP/stUQSsTBssFAcb4FMPWOsD+pVIySBUOEfdtU50T0
/kvDNDDOHKmLgZcxVC3cwqLDnsHdFKCp1FehpeJ/ti/1HYCuJ0C8V2Nf6Ptl6cGU
l/DLqPRPo646udHuplPs0AXNHepEKBvXTudPIrZrHI93UFeOz7iyIbueDNaxx/mj
i1hb6ylUycRsw7w6j/IngnfUj4HOEncsjNrlsfKH4keJW8drmSX5sfw0dNQbQH8R
Tp6rBtWVoTyg4EuQee26cC/dK+c+ofXvThYOH22sClrHGsHO4+sTJABSf4JgXFzt
4GQgbOdm46DanIRMDMKvG7uxHiE8bhuZTGPGbSELsyk9TBP+Uybit4ZHq3MF1bUq
xHjQ7JBuifpasR9eIFdxJRC+LI6IeqQt9wXLFzbdt+d7787I7+++CwKoXfYkvm6V
fEiJf+hQd2A/XgHYrfTeIVYdlJFjPZO760J+zW6Sv3TR1WgSgaidC1fW4xcMbdIq
Fn+4BX65M0SnlTGY/ZL/
=ehiy
-----END PGP SIGNATURE-----
Merge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates #2 from Takashi Iwai:
"This update contains a few cleanup works, regression/stable fixes
gathered since the last pull request.
- Clean up with generic hd-audio jack handling code by David
Henningsson
- A few regression fixes for standardized HD-audio auto-parser
- Misc clean-up and small fixes"
* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - do not detect jack on internal speakers for Realtek
ALSA: hda - Fix missing beep on ASUS X43U notebook
ALSA: hda - Remove AZX_DCAPS_POSFIX_COMBO
ALSA: hda - Warn an allocation for an uninitialized array
ALSA: hda/cirrus - Add missing init/free of hda_gen_spec
ALSA: hda - Fix memory leaks at error path in patch_cirrus.c
ALSA: hda - Add missing hda_gen_spec to struct via_spec
ALSA: hda - remove "Mic Jack Mode" for headset jacks (Latitude Exx30)
ALSA: hda - make Cirrus codec use generic unsol event handler
ALSA: hda - make VIA codec use generic unsol event handler
ALSA: hda - Remove dead GPIO code for VIA codec
ALSA: usb-audio: Add TASCAM US122 MKII playback
This caused the internal speaker to mute itself because it was
present, which happened after powersave.
It was found on Dell XPS 15 (L502x), ALC665.
Reported-by: Da Fox <da.fox.mail@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It turned out that the COMBO position fix mode is rather more harmful,
and it got reverted (with the replacement of runtime->delay
calculation) recently. Hence we can get rid of AZX_DCAPS_POSFIX_COMBO
as well.
It's still possible to pass this mode via position_fix module option,
in case where this really helps on weird machines (who knows).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In the transition to the generic fixup code, the call of
snd_hda_gen_init() and snd_hda_gen_free() was missing.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The commit [4b527b65 ALSA: hda - limit internal mic boost for Asus
X202E] introduced the use of auto-parser code, but it forgot to add
struct hda_gen_spec at the head of codec->spec which the auto-parser
assumes silently. Without this record, it may result in memory
corruption.
This patch adds the missing piece.
Cc: <stable@vger.kernel.org> [v3.5+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Dell Latitude 5x30 and 6x30 series of machines all have
a single 4-pin headset jack. Enabling line in mode for such jack
is very confusing (you would only get mono input, and would have to
use non-standard adapters), so remove the option by default.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>