Commit Graph

6475 Commits

Author SHA1 Message Date
Clemens Ladisch f42bb22243 ALSA: virtuoso: add Xonar Essence STX II support
Just add the PCI ID for the STX II.  It appears to work the same as the
STX, except for the addition of the not-yet-supported daughterboard.

Tested-by: Mario <fugazzi99@gmail.com>
Tested-by: corubba <corubba@gmx.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-04 15:20:48 +02:00
Hans Wennborg 47efe636ad ALSA: riptide: fix %d confusingly prefixed with 0x in format strings
Signed-off-by: Hans Wennborg <hans@hanshq.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-04 13:17:53 +02:00
Libin Yang d1585c89ce ALSA: hda - add codec ID for Braswell display audio codec
This patch adds codec ID (0x80862883) and module alias for Braswell
display codec.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-04 11:19:12 +02:00
Libin Yang f31b2ffcad ALSA: hda - add PCI IDs for Intel Braswell
Add HD Audio Device PCI ID for the Intel Braswell platform.
It is an HDA Intel PCH controller.

AZX_DCAPS_ALIGN_BUFSIZE is not necessary for this controller.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-04 11:19:12 +02:00
Takashi Iwai 2e65b8916c Merge branch 'for-next' into for-linus 2014-08-04 11:11:22 +02:00
Hui Wang 00ef99408b ALSA: hda - add mic mute led hook for dell machines
The mic mute led on dell laptops is controlled by the wmi driver.
Followed this part being merged to the kernel, we add the mic mute led
hook in the hda driver.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-31 09:21:42 +02:00
Hui Wang 7440850c20 ALSA: hda - fix an external mic jack problem on a HP machine
ON the machine, two pin complex (0xb and 0xe) are both routed to
the same external right-side mic jack, this makes the jack can't work.

To fix this problem, set the 0xe to "not connected".

BugLink: https://bugs.launchpad.net/bugs/1350148
Tested-by: Franz Hsieh <franz.hsieh@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-30 07:22:23 +02:00
Takashi Iwai c5d019c395 ALSA: hda - Fix loopback noise on Dell XPS 15
Dell XPS 15 (1028:05fe) gives the bad feedback noise from analog
loopback line even if the channels are muted.  The similar problem has
been seen on XPS 13, and it was fixed by simply disabling loopback.
The same fixup was confirmed to be applicable and fix the problem on
XPS 15, too.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80821
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-22 17:33:32 +02:00
David Henningsson 214eef76eb ALSA: hda - Make vendor quirks lowest prio for ALC2xx
Add a new quirk table to make sure that pin quirks have a higher
priority than quirks that apply to an entire vendor.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-22 14:26:53 +02:00
David Henningsson f5662e1cbf ALSA: hda - Refactor quirk picking and change quirk priority
Previously, calling one quirk function first and another later
would make the latter one take priority, this is now changed
to make the former take priority.

By adding two special values for fixup_id we can also get rid of the
fixup_forced flag.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-22 14:26:50 +02:00
Daniel Drake 9dc12862da ALSA: hda - Add mic fixup for Gigabyte BXBT-2807
The Gigabyte BRIX BXBT-2707 is a mini-PC with Realtek ALC283 HDA,
exposing a single headset jack.

However, the default pin config information only suggests
that one pin is connected: a HP out jack (pin 0x21, default
config 0x04211010).

The microphone input is behind pin 0x19, which has default
config 0x411111f0 (i.e. unused), so it does not show up in
userspace, and no microphone input is possible via the headset.

Override the pin config so that the headset mic can be used.

[rearranged the fixup entry position by tiwai]

Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-22 12:48:04 +02:00
David Henningsson 423044744a ALSA: hda - Add mute LED pin quirk for HP 15 touchsmart
This makes the mute LED work on a HP 15 touchsmart machine.

BugLink: https://bugs.launchpad.net/bugs/1334950
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-22 12:34:43 +02:00
Takashi Iwai 2d9772ef65 ALSA: hda - Add NULL check to all PM ops in hda_intel.c
Since devptr can be NULL due to asynchronous probe, all PM ops should
have NULL checks at the beginning.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-16 16:32:01 +02:00
Takashi Iwai 8695a003a5 ALSA: hda - Add the pin fixup for HP Envy TS bass speaker
NID 0x10 seems corresponding to the bass speaker.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-15 16:59:56 +02:00
Takashi Iwai 1618e84aa8 Merge branch 'for-linus' into for-next
Since init_failed flag was moved to struct hda_intel, its access in
the commit [4da63c6f: ALSA: hda - Fix broken PM due to incomplete
i915 initialization] is also replaced with hda->init_failed
appropriately.
2014-07-15 15:28:43 +02:00
Takashi Iwai 4da63c6fc4 ALSA: hda - Fix broken PM due to incomplete i915 initialization
When the initialization of Intel HDMI controller fails due to missing
i915 kernel symbols (e.g. HD-audio is built in while i915 is module),
the driver discontinues the probe.  However, since the probe was done
asynchronously, the driver object still remains, thus the relevant PM
ops are still called at suspend/resume. This results in the bad access
to the incomplete audio card object, eventually leads to Oops or stall
at PM.

This patch adds the missing checks of chip->init_failed flag at each
PM callback in order to fix the problem above.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79561
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-15 15:19:43 +02:00
Takashi Iwai cd50065b3b ALSA: hda - Revert stream assignment order for Intel controllers
We got a regression report for 3.15.x kernels, and this turned out to
be triggered by the fix for stream assignment order.  On reporter's
machine with Intel controller (8086:1e20) + VIA VT1802 codec, the
first playback slot can't work with speaker outputs.

But the original commit was actually a fix for AMD controllers where
no proper GCAP value is returned, we shouldn't revert the whole
commit.  Instead, in this patch, a new flag is introduced to determine
the stream assignment order, and follow the old behavior for Intel
controllers.

Fixes: dcb32ecd9a ('ALSA: hda - Do not assign streams in reverse order')
Reported-and-tested-by: Steven Newbury <steve@snewbury.org.uk>
Cc: <stable@vger.kernel.org> [v3.15+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-14 10:45:31 +02:00
Hui Wang 50dd9050e4 ALSA: hda - add capture mute led support in led_power_filter
Now the led_power_filter() needs to handle 3 situations:
    - only mute_led_nid is set
    - only cap_mute_led_nid is set
    - both mute_led_ind and cap_mute_led_nid are set

BugLink: https://bugs.launchpad.net/bugs/1329580
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: Kailang Yang <kailang@realtek.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-08 12:41:21 +02:00
Hui Wang fc1fad93c9 ALSA: hda - fix a typo by changing mute_led_nid to cap_mute_led_nid
BugLink: https://bugs.launchpad.net/bugs/1329580
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: Kailang Yang <kailang@realtek.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-08 12:41:08 +02:00
Aaron Plattner 91947d8cc5 ALSA: hda - Add new GPU codec ID 0x10de0070 to snd-hda
Vendor ID 0x10de0070 is used by a yet-to-be-named GPU chip.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-08 11:13:57 +02:00
Thierry Reding 525549d734 ALSA: hda: Fix build warning
The hda_tegra_disable_clocks() function is only used by the suspend and
resume code, so it needs to be included in the #ifdef CONFIG_PM_SLEEP
block to prevent the following warning:

  CC      sound/pci/hda/hda_tegra.o
sound/pci/hda/hda_tegra.c:238:13: warning: 'hda_tegra_disable_clocks' defined but not used [-Wunused-function]
 static void hda_tegra_disable_clocks(struct hda_tegra *data)
             ^

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-07 15:15:10 +02:00
Hui Wang 549d878235 ALSA: hda - Add several entries for enabling HP mute led
BugLink: https://bugs.launchpad.net/bugs/1329580
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-07 11:35:34 +02:00
Joe Perches d82353e534 ALSA: hda - Fix and neaten print_nid_path/debug_badness
print_nid_path has a possible buffer overflow if
struct nid_path.path values are > 256.

Avoid this and neaten the output to remove the leading ':'

Neaten debug_badness to always verify arguments.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-07 09:34:16 +02:00
Konstantinos Tsimpoukas 2f6ba2b31b ALSA: ice1712: Correcting/completing #defines for REGS
This small patch completes #defines for Control/Status Register,
adds comments for the missing ones there and on the Interrupt Mask
Register and additionally corrects "#define ICE1712_SERR_LEVEL 0x04 -> 0x08",
according to documentation.

Signed-off-by: Konstantinos Tsimpoukas <kostaslinuxxx@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-04 09:18:36 +02:00
Takashi Iwai 1a0e3f9639 Merge branch 'for-linus' into for-next
Conflicts:
	sound/pci/hda/hda_intel.c
2014-07-04 07:48:57 +02:00
Mengdong Lin e4d9e513de ALSA: hda - restore BCLK M/N value as per CDCLK for HSW/BDW display HDA controller
For HSW/BDW display HD-A controller, hda_set_bclk() is defined to set BCLK
by programming the M/N values as per the core display clock (CDCLK) queried from
i915 display driver.

And the audio driver will also set BCLK in azx_first_init() since the display
driver can turn off the shared power in boot phase if only eDP is connected
and M/N values will be lost and must be reprogrammed.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-04 07:47:22 +02:00
Sachin Kamat d5471e6722 ALSA: hda: Remove unused variable
'status' is not used in the function. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Tested-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-01 17:55:25 +02:00
Sachin Kamat 330fb10df8 ALSA: mixart: Remove unused variable
'err' is not used in the function. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-01 14:06:31 +02:00
Sachin Kamat 427f42e4cf ALSA: echoaudio: Remove unused variable
'chip' is not used in the function. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-01 14:06:24 +02:00
Takashi Iwai 178942b69f ALSA: hda - Fix build error in hda_tegra.c
The "list" field has been omitted from struct azx, but its
initialization remained mistakenly in hda_tegra.c, which leads to a
compile error:
   sound/pci/hda/hda_tegra.c: In function 'hda_tegra_create':
   sound/pci/hda/hda_tegra.c:481:22: error: 'struct azx' has no member
named 'list'

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Fixes: 9a34af4a33 ('ALSA: hda - Move more PCI-controller-specific stuff from generic code')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-01 14:02:02 +02:00
Sachin Kamat e2ff8406ad ALSA: trident: Remove unused variable in trident_memory.c
'prev' is not used in the function. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-01 11:24:39 +02:00
Sachin Kamat 8d9048643f ALSA: trident: Remove unused variable in trident_main.c
'private_data' is not used in the function. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-01 11:24:31 +02:00
Takashi Iwai 84526820c4 Merge branch 'topic/hda-cleanup' into for-next 2014-07-01 11:24:06 +02:00
Takashi Iwai e8750940ce ALSA: hda - Fix invalid function call in snd_hda_add_vmaster()
The recent commit [6194b99d: ALSA: hda - Kill the rest of snd_print*()
usages] changed the callback map_slaves(), but one call was forgotten
to be replaced due to the cast, which leads to kernel Oops due to
invalid function.  This patch replaces it with a proper function.

Fixes: 6194b99de9 ('ALSA: hda - Kill the rest of snd_print*() usages')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-30 14:05:17 +02:00
Takashi Iwai a12137e779 ALSA: hda - Add a fixup for Thinkpad T540p
The similar fixup as T440 is needed for supporting the dock on T540.

Reported-by: Jim Minter <jminter@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-27 12:14:35 +02:00
David Henningsson e03fdbde8a ALSA: hda - Add another headset pin quirk for some Dell machines
Another quirk to make the headset mic work on some new Dell machines.

Cc: Hui Wang <hui.wang@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1297581
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-27 12:09:57 +02:00
Takashi Iwai fb1d8ac299 ALSA: hda - Replace ICH6_ prefix
ICH6_ prefix doesn't mean that it's specific to ICH6 chipset but
rather its generic for all HD-audio (or "Azalia") devices.
Use AZX_ prefix instead to align with other constants.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-26 18:00:02 +02:00
Takashi Iwai c6bf1d8e8c ALSA: hda - Remove obsoleted SFX definitions
It's no longer referred by anyone after standardizing with dev_*()
macros.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-26 18:00:02 +02:00
Takashi Iwai 33124929a2 ALSA: hda - Move SD nums definitions to hda_intel.c
The defined numbers of SDs are specific to hda-intel, so move them to
there.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-26 18:00:01 +02:00
Takashi Iwai 703c759f38 ALSA: hda - Use common reboot notifier
The very same notifier code is used in both hda_intel.c and
hda_tegra.c.  Move it to the generic code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-26 18:00:01 +02:00
Takashi Iwai 9a34af4a33 ALSA: hda - Move more PCI-controller-specific stuff from generic code
Just move struct fields between struct azx and struct hda_intel, and
move some definitions from hda_priv.h to hda_intel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-26 18:00:01 +02:00
Takashi Iwai b6050ef664 ALSA: hda - Make position_fix as generic callback
... and move most parts into hda_intel.c from the generic controller
code.  This is a clean up, and there should be no functional change by
this patch.

Now, struct azx obtains the generic callbacks for getting the position
and the delay.  As default NULL, posbuf is read.  These replace the
old position_fix[], and each is implemented as a callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-26 18:00:01 +02:00
Takashi Iwai 085ec0d945 ALSA: hda - Remove superfluous MAX_AZX_DEV
MAX_AZX_DEV is no longer referred anywhere, let's kill it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-26 18:00:01 +02:00
Takashi Iwai 7e9c2eb626 Merge branch 'for-linus' into for-next 2014-06-26 15:49:20 +02:00
Mengdong Lin a07187c992 ALSA: hda - restore BCLK M/N values when resuming HSW/BDW display controller
For Intel Haswell/Broadwell display HD-A controller, the 24MHz HD-A link BCLK
is converted from Core Display Clock (CDCLK): BCLK = CDCLK * M / N
And there are two registers EM4 and EM5 to program M, N value respectively.
The EM4/EM5 values will be lost and when the display power well is disabled.

BIOS programs CDCLK selected by OEM and EM4/EM5, but BIOS has no idea about
display power well on/off at runtime. So the M/N can be wrong if non-default
CDCLK is used when the audio controller resumes, which results in an invalid
BCLK and abnormal audio playback rate. So this patch saves and restores valid
M/N values on controller suspend/resume.

And 'struct hda_intel' is defined to contain standard HD-A 'struct azx' and
Intel specific fields, as Takashi suggested.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-26 15:47:42 +02:00
Takashi Iwai 8b3dfdaf0c ALSA: hda - Adjust speaker HPF and add LED support for HP Spectre 13
HP Spectre 13 has the IDT 92HD95 codec, and BIOS seems to set the
default high-pass filter in some "safer" range, which results in the
very soft tone from the built-in speakers in contrast to Windows.
Also, the mute LED control is missing, since 92HD95 codec still has no
HP-specific fixups for GPIO setups.

This patch adds these missing features: the HPF is adjusted by the
vendor-specific verb, and the LED is set up from a DMI string (but
with the default polarity = 0 assumption due to the incomplete BIOS on
the given machine).

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=74841
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-25 17:50:24 +02:00
Takashi Iwai db8e8a9dc9 ALSA: hda - Remove the obsoleted static quirk codes from patch_cmedia.c
The static quirk code has been disabled for a while and it seems
working fine, so it's time to actually get rid of it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-25 14:51:24 +02:00
Takashi Iwai d0ea6d270b ALSA: hda - Remove the obsoleted static quirk codes from patch_conexant.c
The static quirk code has been disabled for a while and it seems
working fine, so it's time to actually get rid of it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-25 14:51:23 +02:00
Takashi Iwai 6194b99de9 ALSA: hda - Kill the rest of snd_print*() usages
Pass the codec object so that we can replace all the rest of
snd_print*() usages with the proper device-specific print helpers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-25 14:51:23 +02:00
Takashi Iwai 79514d473b ALSA: hda - Kill snd_printd*() in HDMI debug / info prints
Pass codec instance to each function that still prints info and debug
outputs via snd_printd*().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-25 14:51:23 +02:00