This patch adds quirk ID's for the ZxR and it's daughter board, the
DBPro. It also adds a function for determining the quirk for each board
through HDA subsytem ID's instead of PCI subsystem ID's.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch fixes an issue where if surround sound was the selected
output and output effects were enabled, the sound wasn't sent to all
channels correctly.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch corrects the control type of the additional AE-5 controls
added in a previous patch from HDA_INPUT to HDA_OUTPUT.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds controls for the AE-5's headphone gain setting, and the
DAC's interpolation filter setting.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the input selection commands for the Sound BlasterX
AE-5.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch cleans up ca0132_alt_out_select by moving the card specific
output commands into a separate function. As more cards are added, the
function ca0132_alt_out_select is going to get more bloated with these,
so moving into a separate function tries to keep that from happening.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch cleans up some of the formatting of the post-dsp load setup
functions, and also merges some of the sub functions into individual
ones.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The Recon3D, AE-5, Z and ZxR all share the same firmware file. Rename
this from the specific "ctefx-sbz.bin" to "ctefx-desktop.bin" and set
the AE-5 and Recon3D to use it as well.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds AE-5 specific stuff to the ca0132_alt_init function.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds AE-5 pre-init functions that happen before the main
ca0132_alt_init, and gives functions related to the ca0113 a ca0113
prefix instead of ca0132. It also adds functions to write to the 8051's
SFRs, and to write the special ca0113 commands for the AE-5.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the unique writes for the AE-5 on startup to
ca0132_mmio_init. The other cards share some addresses written to, but
use different values.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch sets the bool values for the AE-5, as well as selects the
mixer it will use.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the pincfg for the Sound BlasterX AE-5, and cleans up
the function it's assigned in.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the PCI subsys ID quirk for the Sound BlasterX AE-5.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch defines some new verbs found from reverse engineering of the
onboard 8051 CPU, and a control param found there as well. This clears
up usage of these verbs in other parts of the driver, and removes their
usage where they're now known to be unnecessary.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Replace "fallthru" with a proper "fall through" annotation.
This fix is part of the ongoing efforts to enabling
-Wimplicit-fallthrough
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The interrupt handler has to be acquired after the other resource
initialization when allocated with IRQF_SHARED. Otherwise it's
triggered before the resource gets ready, and may lead to unpleasant
behavior.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When CONFIG_X86=n function azx_snoop doesn't use the variable chip it
only returns true.
sound/pci/hda/hda_intel.c: In function ‘dma_alloc_pages’:
sound/pci/hda/hda_intel.c:2002:14: warning: unused variable ‘chip’ [-Wunused-variable]
struct azx *chip = bus_to_azx(bus);
^~~~
Create a inline function of azx_snoop.
Fixes: a41d122449 ("ALSA: hda - Embed bus into controller object")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The recently introduced PCM info flag assures the call of ack ops at
each applptr change, and this is mandatory for the indirect PCM
helpers.
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The recently introduced PCM info flag assures the call of ack ops at
each applptr change, and this is mandatory for the indirect PCM
helpers.
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The recently introduced PCM info flag assures the call of ack ops at
each applptr change, and this is mandatory for the indirect PCM
helpers.
Also, with the proper ack callback, we need no longer prefill at
trigger start. The relevant code can be killed.
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For easier sharing with ASoC.
-----BEGIN PGP SIGNATURE-----
iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAluIAxkTHGJyb29uaWVA
a2VybmVsLm9yZwAKCRAk1otyXVSH0NVNB/0cE/j09cyBR80x5gvnFE3Z5NEPNPLP
yl7sD93xFP6iww3CGJjXgxxDTh2sf7Sro4hcR9ZdD9zSSQ1qMVVY28MJ1YUsbFPu
TeUkqRFNPjgOpSmwK7T5QpVbIvdTZmmht8umgQ2+Y4vsGu1aKZf80ZT2n/2mjTOe
bEYfpyjP5V1aVL8JcX4TN3hbGZ2Pth5m404Qe0pkIdv4qqLx2edphJQ7ecU8w3kK
vTg1gfo7j9CKx7rzHZei/cvA3qXl/g9oufHAfpJDrlYFz6N35qwpA5UCyXqcFVo2
kZtyFbaBAvBjnhVyMNkdG7PvBMlL6HMLxN3fJbMLPPS30/+IuAsHXkZY
=wtBB
-----END PGP SIGNATURE-----
Merge tag 'hda-codec-h-move' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ALSA: Move hda_codec.h to include/sound
For easier sharing with ASoC.
As suggested by Takashi, move this header file to make it easier
to include from e.g. the Intel Skylake driver in follow-up patches
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
On AMD/ATI controllers, the HD-audio controller driver allows a bus
reset upon the error recovery, and its procedure includes the
cancellation of pending jack polling work as found in
snd_hda_bus_codec_reset(). This works usually fine, but it becomes a
problem when the reset happens from the jack poll work itself; then
calling cancel_work_sync() from the work being processed tries to wait
the finish endlessly.
As a workaround, this patch adds the check of current_work() and
applies the cancel_work_sync() only when it's not from the
jackpoll_work.
This doesn't fix the root cause of the reported error below, but at
least, it eases the unexpected stall of the whole system.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200937
Cc: <stable@vger.kernel.org>
Cc: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Currently the jackpoll_ms option value is passed indirectly by
referring to an array in chip->jackpoll_ms although each card needs to
see only the assigned value. Also, the sanity check is done at each
time in get_jackpoll_interval() although basically jackpoll_ms option
is a read-only, hence we need to evaluate only once at probe time.
This patch is the code simplification about the above points: the jack
polling interval is directly set to chip->jackpoll_interval so that it
can be simply copied to each codec.
No functional change but only code reduction.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
intel8x0 driver requires the non-cached pages for 440MX workaround,
and this can be implemented more easily with the new memalloc type,
SNDRV_DMA_TYPE_DEV_UC. This allows us to reduce lots of code.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since we dropped the memory page fiddling in the own allocators in
hda_intel.c, the substream allocation and free ops in both hda_intel.c
and hda_tegra.c became nothing but the simple calls of the standard
snd_pcm_lib helpers. As both are identical, there is no longer need
for indirect calls via ops; it's a good opportunity for removing ops
and simplifying the codes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now the ALSA memory allocator helper supports the new non-cached
pages, let's use the new type, SNDRV_DMA_TYPE_DEV_UC_SG, for HD-audio
driver. This allows us to reduce lots of codes.
As another positive side-effect by this patch, the long-standing issue
with non-snoop mode playing in the non-mmap mode is fixed. The core
memalloc helper does the proper pgprot setup for non-cached pages for
vmap(), which was missing in the past.
Reported-and-tested-by: Hans Hu <HansHu@zhaoxin.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Introduce a new flag, uc_buffer, to indicate that the controller
requires the non-cached pages for stream buffers, either as a
chip-specific requirement or specified via snoop=0 option.
This improves the code-readability.
Also, this patch fixes the incorrect behavior for C-Media chip where
the stream buffers were never handled as non-cached due to the check
of driver_type even if you pass snoop=0 option.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Trivial fix to spelling mistake in dev_dbg message and also remove
extraneous white space and repeated question marks.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
no surprises here: a regression fix for virmidi code refactoring,
three fixes for the new AC97 bus compat and runtime PM, and a usual
HD-audio quirk.
-----BEGIN PGP SIGNATURE-----
iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAlt+hRUOHHRpd2FpQHN1
c2UuZGUACgkQLtJE4w1nLE9ukQ/+Ou8QjdFM8hghYiLWUiNdzFhut6k3CyzJpSyr
BD3oUEuCUp+rsI3HuTIaerdTezT4xdIwFozbXZ51f3OWxqGkP0lSBASfpxBOELRi
i2fAfExgWnvTY34EFuW8Zf/H2grl14wixC4IQN2IqlRWwnQbcrOI+wEizaXcLrrb
KcItJVmjsNzwJrtg51MA8eLPWeyZ2dCeDXcSawLe8qHkpUyAX4kpt2oOyYcTeGJe
+kM2x6MWoDN5cdWzkJxkayO+wiffCZXQv3NUq+EFY0p1yAO9Bsz3zq42RsxEl0E8
l8WL/FXvroc4VGO38ksicyZp4iy6YSMPv6PHijHHDqVAh5hmdAwMhdzi5LWExV12
b6GBbd8WajqQ0nShRtnx/uFHG0PrmS59k17JdP9kK8z6YSekD5vmS8NkF8ibXr5T
NySqyrK4BGxolB/cXyImzCvdkxvPbTKe2sy5VD8kevRKZcloQ7N8lghP1JMMNa/i
qqjuDIG9wUhf6Ksw63eksG6u27v6kki+TbmteyBLl0y6iTdbZ+xmLsragcm/LD35
+nebpqQBDNOGtMY8llZ+Y8QAuhnWy5YFlnYg16T8K0lnE84YtwyQzG5uV34fJ8Qw
iVkS89pAZHnf6OkyOi3yWTyykzlTpq6DL7zulXXs0/KCcZCl9qj9yreHq+0lYYVe
WrFv6PE=
=381l
-----END PGP SIGNATURE-----
Merge tag 'sound-fix-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"No surprises here: a regression fix for virmidi code refactoring,
three fixes for the new AC97 bus compat and runtime PM, and a usual
HD-audio quirk"
* tag 'sound-fix-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda/realtek - Fix HP Headset Mic can't record
ALSA: ac97: fix unbalanced pm_runtime_enable
ALSA: ac97: fix check of pm_runtime_get_sync failure
ALSA: ac97: fix device initialization in the compat layer
ALSA: seq: virmidi: Fix discarding the unsubscribed output
This patch will fix HP workstation Headset Mic not recording.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Commit c647f806b8 ("ALSA: hda - Allow multiple ADCs for mic mute LED
controls") changed the return value of the snd_hda_gen_add_micmute_led()
without actually updating the callers.
Admittedly, almost no callers actually cared about the return value.
But one call site very much did: the Dell wmi code. It would see the
registration return zero, which _used_ to mean "failed" but now means
"success", and clear the dell_micmute_led_set_func pointer.
End result: the successful registration would end up calling the Dell
code that thought it had all failed, and call through a NULL pointer.
To make matters worse, it ends up being a tail-call, and with the
retpoline sequence you don't even see the caller (dell_micmute_update())
in the stack trace, so the error ended up way less obvious than it
should have been.
Fixes: c647f806b8 "ALSA: hda - Allow multiple ADCs for mic mute LED controls"
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that in this particular case, I replaced the code comment with
a proper "fall through" annotation, which is what GCC is expecting
to find.
Addresses-Coverity-ID: 114889 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds exit functions for the Recon3D, and cleans up the
current exit function.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds commands to the alternative input and output select
commands to support the Recon3D.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The Recon3D can use many of the same functions as the Recon3Di, so many
of the r3di prefix function remain the same, but change their names to
the more generic r3d prefix. This patch does this, and adds quirk checks
for things specific to the Recon3Di.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds functions for Recon3D startup, and sets values for
things such as use_pci_mmio. It also renames some functions and tables
from the sbz prefix into ca0132, as the Recon3D uses them as well.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the ability to choose whether or not to map the pci
region2, which is used for things such as GPIO on the Recon3D and Sound
Blaster Z.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds pin configs from the Recon3D, taken from the Window's
driver.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the PCI subsys ID for the Recon3D that has been tested,
and adds the QUIRK_R3D enumeration.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch fixes a previous oversight where the microphone unsolicited
response would use the wrong input selection function.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch cleans up ca0132_init by removing unnecessary commands and
ordering things better.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds a new function, ca0132_mmio_gpio_set, to clear up what
is going on with writes to mmio region 0x320.
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>