Commit Graph

232 Commits

Author SHA1 Message Date
Adam Stylinski
7843380d07 ALSA: hda/ca0132: add quirk for EVGA X299 DARK
This quirk is necessary for surround and other DSP effects to work
with the onboard ca0132 based audio chipset for the EVGA X299 dark
mainboard.

Signed-off-by: Adam Stylinski <kungfujesus06@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=67071
Link: https://lore.kernel.org/r/ZGopOe19T1QOwizS@eggsbenedict.adamsnet
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-05-22 08:26:01 +02:00
Kuninori Morimoto
98e5eb1100 ALSA: hda/ca0132: fixup buffer overrun at tuning_ctl_set()
tuning_ctl_set() might have buffer overrun at (X) if it didn't break
from loop by matching (A).

	static int tuning_ctl_set(...)
	{
		for (i = 0; i < TUNING_CTLS_COUNT; i++)
(A)			if (nid == ca0132_tuning_ctls[i].nid)
				break;

		snd_hda_power_up(...);
(X)		dspio_set_param(..., ca0132_tuning_ctls[i].mid, ...);
		snd_hda_power_down(...);                ^

		return 1;
	}

We will get below error by cppcheck

	sound/pci/hda/patch_ca0132.c:4229:2: note: After for loop, i has value 12
	 for (i = 0; i < TUNING_CTLS_COUNT; i++)
	 ^
	sound/pci/hda/patch_ca0132.c:4234:43: note: Array index out of bounds
	 dspio_set_param(codec, ca0132_tuning_ctls[i].mid, 0x20,
	                                           ^
This patch cares non match case.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sfe9eap7.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-03-14 17:04:53 +01:00
Alexey V. Vissarionov
3ee0fe7fa3 ALSA: hda/ca0132: minor fix for allocation size
Although the "dma_chan" pointer occupies more or equal space compared
to "*dma_chan", the allocation size should use the size of variable
itself.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 01ef7dbffb ("ALSA: hda - Update CA0132 codec to load DSP firmware binary")
Signed-off-by: Alexey V. Vissarionov <gremlin@altlinux.org>
Link: https://lore.kernel.org/r/20230117111522.GA15213@altlinux.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-01-17 18:01:34 +01:00
Xian Wang
0c423e2ffa ALSA: hda/ca0132: add quirk for EVGA Z390 DARK
The Z390 DARK mainboard uses a CA0132 audio controller. The quirk is
needed to enable surround sound and 3.5mm headphone jack handling in
the front audio connector as well as in the rear of the board when in
stereo mode.

Page 97 of the linked manual contains instructions to setup the
controller.

Signed-off-by: Xian Wang <dev@xianwang.io>
Cc: stable@vger.kernel.org
Link: https://www.evga.com/support/manuals/files/131-CS-E399.pdf
Link: https://lore.kernel.org/r/20221104202913.13904-1-dev@xianwang.io
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-11-05 08:01:31 +01:00
ye xingchen
b5eee17cf7 ALSA: hda/ca0132 - remove the unneeded result variable
Return the value dsp_allocate_ports() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/20220922112846.236987-1-ye.xingchen@zte.com.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-09-22 13:53:26 +02:00
Takashi Iwai
327b34f2a9 ALSA: hda: Nuke unused reboot_notify callback
As reboot_notify callback is no longer used by the codec core, let's
get rid of the unused code.  Conexant codec needs a slight code change
as it used to call the reboot_notify at the codec removal, too.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045
Link: https://lore.kernel.org/r/20210813081230.4268-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-08-14 08:39:38 +02:00
Colin Ian King
2d52c5dd8e ALSA: hda/ca0132: remove redundant initialization of variable status
The variable status is being initialized with a value that is never
read, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210709152938.460763-1-colin.king@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-12 13:12:47 +02:00
Colin Ian King
d955782da2 ALSA: hda/ca0132: Make a const array static, makes object smaller
Don't populate the const array dsp_dma_stream_ids the stack but instead
make it static. Makes the object code smaller by 21 bytes.

Before:
   text    data     bss     dec     hex filename
 189012   70376     192  259580   3f5fc ./sound/pci/hda/patch_ca0132.o

After:
   text    data     bss     dec     hex filename
 188927   70440     192  259559   3f5e7 ./sound/pci/hda/patch_ca0132.o

(gcc version 10.3.0)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210526160616.3764119-1-colin.king@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-27 08:25:54 +02:00
Jaroslav Kysela
e65bf99718 ALSA: HDA - remove the custom implementation for the audio LED trigger
With the new snd-ctl-led module, we have a generic way
to trigger audio LEDs based on the sound control changes.

Remove the custom implementation from the HDA driver.

Move the LED initialization before snd_hda_gen_parse_auto_config()
call in all drivers to create marked controls there.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210317172945.842280-5-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-03-30 15:35:15 +02:00
Simeon Simeonoff
f15c5c11ab ALSA: hda/ca0132: Add Sound BlasterX AE-5 Plus support
The new AE-5 Plus model has a different Subsystem ID compared to the
non-plus model. Adding the new id to the list of quirks.

Signed-off-by: Simeon Simeonoff <sim.simeonoff@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/998cafbe10b648f724ee33570553f2d780a38963.camel@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-03-09 07:34:37 +01:00
Pierre-Louis Bossart
3531ba21f5 ALSA: hda: fix kernel-doc warnings
v5.12-rc1 flags new warnings with make W=1, fix missing or broken
function descriptors.

sound/pci/hda/hda_codec.c:3492: warning: expecting prototype for
snd_hda_input_mux_info_info(). Prototype was for
snd_hda_input_mux_info() instead

sound/pci/hda/hda_codec.c:3521: warning: expecting prototype for
snd_hda_input_mux_info_put(). Prototype was for
snd_hda_input_mux_put() instead

sound/pci/hda/hda_codec.c:3958: warning: expecting prototype for
_snd_hda_pin_ctl(). Prototype was for _snd_hda_set_pin_ctl() instead

sound/pci/hda/hda_jack.c:223: warning: expecting prototype for
snd_hda_set_dirty_all(). Prototype was for
snd_hda_jack_set_dirty_all() instead

sound/pci/hda/hda_jack.c:309: warning: expecting prototype for
snd_hda_jack_detect_enable_mst(). Prototype was for
snd_hda_jack_detect_enable_callback_mst() instead

sound/pci/hda/hda_generic.c:3933: warning: expecting prototype for
snd_dha_gen_add_mute_led_cdev(). Prototype was for
snd_hda_gen_add_mute_led_cdev() instead

sound/pci/hda/hda_generic.c:4093: warning: expecting prototype for
snd_dha_gen_add_micmute_led_cdev(). Prototype was for
snd_hda_gen_add_micmute_led_cdev() instead

sound/pci/hda/patch_ca0132.c:2357: warning: expecting prototype for
Prepare and send the SCP message to DSP(). Prototype was for
dspio_scp() instead

sound/pci/hda/patch_ca0132.c:2883: warning: expecting prototype for
Allocate router ports(). Prototype was for dsp_allocate_router_ports()
instead

sound/pci/hda/patch_ca0132.c:3202: warning: expecting prototype for
Write a block of data into DSP code or data RAM using pre(). Prototype
was for dspxfr_one_seg() instead

sound/pci/hda/patch_ca0132.c:3397: warning: expecting prototype for
data overlay to DSP memories(). Prototype was for dspxfr_image()
instead

sound/hda/hdac_regmap.c:393: warning: expecting prototype for
snd_hdac_regmap_init(). Prototype was for snd_hdac_regmap_exit()
instead

sound/hda/ext/hdac_ext_controller.c:142: warning: expecting prototype
for snd_hdac_ext_bus_get_link_index(). Prototype was for
snd_hdac_ext_bus_get_link() instead

sound/hda/ext/hdac_ext_stream.c:140: warning: expecting prototype for
snd_hdac_ext_linkstream_start(). Prototype was for
snd_hdac_ext_link_stream_start() instead

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210301174617.116960-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-03-02 10:21:36 +01:00
Connor McAdams
d84489e374 ALSA: hda/ca0132 - Add ZxR surround DAC setup.
Add pre-dsp download initialization for the DAC's used in the surround
sound configuration. Fixes issues of no audio on surround channels.

Fixes: 2e492b8ee5 ("ALSA: hda/ca0132 - Add ZxR init commands")
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20201211225504.4508-2-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-12-12 11:09:52 +01:00
Connor McAdams
c1d8aeed83 ALSA: hda/ca0132 - Add 8051 PLL write helper functions.
Add helper functions for the 8051 PLL PMU write verbs.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20201211225504.4508-1-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-12-12 11:09:37 +01:00
Connor McAdams
19b5926b68 ALSA: hda/ca0132 - Remove now unnecessary DSP setup functions.
Now that the DSP's audio configuration is understood, remove previous
hacky methods of trying to properly configure it.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20201210160658.461739-6-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-12-11 09:53:11 +01:00
Connor McAdams
8cb12b94c2 ALSA: hda/ca0132 - Ensure DSP is properly setup post-firmware download.
Make sure that the DSP has no DMA channels allocated once the firmware
is downloaded, and that the default audio streams in use by the DSP are
setup in the correct order.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20201210160658.461739-5-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-12-11 09:53:01 +01:00
Connor McAdams
799c70639c ALSA: hda/ca0132 - Add 8051 exram helper functions.
Add functions for both reading and writing to the 8051's exram. Also,
add a little bit of documentation on how the addresses are segmented.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20201210160658.461739-4-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-12-11 09:52:53 +01:00
Connor McAdams
aedeb64211 ALSA: hda/ca0132 - Add stream port remapping function.
Add function for remapping a ChipIO stream's ports. Also include some
documentation as to how this works.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20201210160658.461739-3-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-12-11 09:52:44 +01:00
Connor McAdams
4a6d3b4e7a ALSA: hda/ca0132 - Reset codec upon initialization.
Reset the codec upon initialization to clear out anything that may have
been setup on a previous boot into Windows, or in case of an improper
shutdown.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20201210160658.461739-2-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-12-11 09:52:34 +01:00
Connor McAdams
7079f785b5 ALSA: hda/ca0132 - Change Input Source enum strings.
Change the Input Source enumerated control's strings to make it play
nice with pulseaudio.

Fixes: 7cb9d94c05 ("ALSA: hda/ca0132: add alt_select_in/out for R3Di + SBZ")
Cc: <stable@kernel.org>
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20201208195223.424753-2-conmanx360@gmail.com
Link: https://lore.kernel.org/r/20201210173550.2968-2-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-12-10 19:57:01 +01:00
Connor McAdams
c697ba85a9 ALSA: hda/ca0132 - Fix AE-5 rear headphone pincfg.
The Windows driver sets the pincfg for the AE-5's rear-headphone to
report as a microphone. This causes issues with Pulseaudio mistakenly
believing there is no headphone plugged in. In Linux, we should instead
set it to be a headphone.

Fixes: a6b0961b39 ("ALSA: hda/ca0132 - fix AE-5 pincfg")
Cc: <stable@kernel.org>
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20201208195223.424753-1-conmanx360@gmail.com
Link: https://lore.kernel.org/r/20201210173550.2968-1-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-12-10 19:56:38 +01:00
Takashi Iwai
faba002e5f ALSA: hda/ca0132: Move unsol callback setups to parser
The setup of unsolicited event callbacks should be done only once at
the parser phase, not in the init phase that is called multiple times
at each resume.

This patch moves the unsol setup code in ca0132 codec driver to the
more appropriate place.

Reported-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200930113008.9307-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-11-28 09:42:51 +01:00
Takashi Iwai
551310e735 ALSA: hda/ca0132: Fix compile warning without PCI
CONFIG_PCI=n leads to a compile warning like:
  sound/pci/hda/patch_ca0132.c:8214:10: warning: no case matching constant switch condition '0'
due to the missed handling of QUIRK_NONE in ca0132_mmio_init().
Fix it.

Fixes: bf2aa9ccc8 ("ALSA: hda/ca0132 - Cleanup ca0132_mmio_init function.")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20201119120404.16833-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-11-19 13:04:43 +01:00
Colin Ian King
9ce88a13b3 ALSA: hda/ca0132: make some const arrays static, makes object smaller
Don't populate const arrays on the stack but instead make them
static. Makes the object code smaller by 57 bytes.

Before:
   text	   data	    bss	    dec	    hex	filename
 173256	  38016	    192	 211464	  33a08	sound/pci/hda/patch_ca0132.o

After:
   text	   data	    bss	    dec	    hex	filename
 172879	  38336	    192	 211407	  339cf	sound/pci/hda/patch_ca0132.o

(gcc version 10.2.0)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20201016224913.687724-1-colin.king@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-10-17 09:58:59 +02:00
Julia Lawall
46394db441 ALSA: hda: use semicolons rather than commas to separate statements
Replace commas with semicolons.  What is done is essentially described by
the following Coccinelle semantic patch (http://coccinelle.lip6.fr/):

// <smpl>
@@ expression e1,e2; @@
e1
-,
+;
e2
... when any
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Link: https://lore.kernel.org/r/1602407979-29038-3-git-send-email-Julia.Lawall@inria.fr
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-10-12 08:51:19 +02:00
Connor McAdams
685a04a537 ALSA: hda/ca0132 - Add AE-7 exit commands.
Add exit commands for the AE-7.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-21-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:29:31 +02:00
Connor McAdams
24a28eaeb2 ALSA: hda/ca0132 - Add AE-7 custom controls.
Add headphone gain and DAC filter controls, which use the same commands
as the AE-5. Also, change input source enumerated control item count to
exclude front microphone.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-20-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:29:19 +02:00
Connor McAdams
ed93f9750c ALSA: hda/ca0132 - Add AE-7 microphone selection commands.
Add AE-7 quirk data for setting of microphone. The AE-7 has no front
panel connector, so only rear-mic/line-in have new commands.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-19-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:29:06 +02:00
Connor McAdams
91b94a933f ALSA: hda/ca0132 - Add output selection for SoundBlaster AE-7.
Add output selection quirk table information for SoundBlaster AE-7, and
slightly modify the AE-5's ca0113 command table to accommodate the AE-7.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-18-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:28:51 +02:00
Connor McAdams
e5b2188888 ALSA: hda/ca0132 - Add DSP setup functions for AE-7.
Add DSP setup functions for the Sound Blaster AE-7 post DSP download.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-17-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:28:36 +02:00
Connor McAdams
cfa736e2f0 ALSA: hda/ca0132 - Add init data for SoundBlaster AE-7.
Add initialization data for the SoundBlaster AE-7 card.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-16-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:28:17 +02:00
Connor McAdams
77bdbae904 ALSA: hda/ca0132 - Add pre-init function for SoundBlaster AE-7.
Add pre DSP initialization function for the AE-7.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-15-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:28:13 +02:00
Connor McAdams
4e356d56df ALSA: hda/ca0132 - Add ca0132_mmio_init data for SoundBlaster AE-7.
Modify the AE-5 ca0132_mmio_init function to add AE-7 specific writes.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-14-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:28:12 +02:00
Connor McAdams
76d257d67f ALSA: hda/ca0132 - Set AE-7 bools and select mixer.
Set the boolean values used for desktop cards, and select the desktop
mixer.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-13-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:28:12 +02:00
Connor McAdams
a35e37a3a2 ALSA: hda/ca0132 - Add SoundBlaster AE-7 pincfg.
Add AE-7 pincfg, based on the values set within Windows.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-12-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:26:09 +02:00
Connor McAdams
620f08eea6 ALSA: hda/ca0132 - Add new quirk ID for SoundBlaster AE-7.
Add a new PCI subsystem ID for the SoundBlaster AE-7 card.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-11-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:25:58 +02:00
Connor McAdams
b7a8b9e8e7 ALSA: hda/ca0132 - Fix Recon3D Center/LFE output.
Properly set the GPIO pin to un-mute the Center/LFE channel on the
Recon3D.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-10-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:25:43 +02:00
Connor McAdams
def3f0a5c7 ALSA: hda/ca0132 - Add quirk output selection structures.
Add structures containing the changes that need to happen on output
selection for each quirk. This should streamline the addition of new
quirks.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-9-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:25:26 +02:00
Connor McAdams
8e00dc7ced ALSA: hda/ca0132 - Clean up ca0132_alt_out_select.
Remove the output structures that were in use before and instead set the
DSP commands line by line. Now that the commands use is known, it makes
the functionality more clear this way.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-8-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:25:09 +02:00
Connor McAdams
ed8156c86f ALSA: hda/ca0132 - Remove surround output selection.
Remove the surround output selection and merge it with the speaker
output selection. Now that the extra commands that were being run on
surround output setting are known, there's no need to have it be
separate.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-7-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:24:47 +02:00
Connor McAdams
f49b3063ad ALSA: hda/ca0132 - Add bass redirection controls.
Add bass redirection controls for surround outputs. This uses the DSP to
redirect audio below the bass redirection crossover frequency to the LFE
channel from the front/rear L/R speakers. This only goes into effect if
the speakers aren't set as full range, and only if the surround
configuration has an LFE channel.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-6-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:24:19 +02:00
Connor McAdams
670c5f484a ALSA: hda/ca0132 - Add full-range speaker selection controls.
Add functions for setting full-range speakers and controls to
enable/disable the setting. Setting a speaker to full-range means that
the channels won't have their bass redirected to the LFE channel.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-5-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:23:58 +02:00
Connor McAdams
01464a566e ALSA: hda/ca0132 - Add surround channel config control.
Add a surround channel configuration enumeration control. Setting up
different channel configurations allows the DSP to upmix stereo audio
into multi-channel audio, and allows for redirection of bass to a
subwoofer.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-4-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:23:28 +02:00
Connor McAdams
896e361e82 ALSA: hda/ca0132 - Add speaker tuning initialization commands.
Add speaker tuning initialization DSP commands, and also define
previously unknown DSP command values.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-3-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:23:11 +02:00
Connor McAdams
bf2aa9ccc8 ALSA: hda/ca0132 - Cleanup ca0132_mmio_init function.
Cleanup the ca0132_mmio_init function, separating into two separate
functions, one for Sound Blaster Z/ZxR/Recon3D, and another for the
AE-5.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20200825201040.30339-2-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-26 10:22:57 +02:00
Connor McAdams
7fe3530427 ALSA: hda/ca0132 - Fix AE-5 microphone selection commands.
The ca0113 command had the wrong group_id, 0x48 when it should've been
0x30. The front microphone selection should now work.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200803002928.8638-3-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-03 08:12:17 +02:00
Connor McAdams
cc5edb1bd3 ALSA: hda/ca0132 - Add new quirk ID for Recon3D.
Add a new quirk ID for the Recon3D, as tested by me.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200803002928.8638-2-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-03 08:12:02 +02:00
Connor McAdams
a00dc409de ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value.
When the ZxR headphone gain control was added, the ca0132_switch_get
function was not updated, which meant that the changes to the control
state were not saved when entering/exiting alsamixer.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200803002928.8638-1-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-03 08:11:40 +02:00
Takashi Iwai
9ab0cb309e ALSA: Replace the word "slave" in vmaster API
Follow the recent inclusive terminology guidelines and replace the
word "slave" in vmaster API.  I chose the word "follower" at this time
since it seems fitting for the purpose.

Note that the word "master" is kept in API, since it refers rather to
audio master volume control.

Also, while we're at it, a typo in comments is corrected, too.

Link: https://lore.kernel.org/r/20200717154517.27599-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-20 10:10:47 +02:00
Takashi Iwai
aa21c3d4b9 Merge branch 'for-next' into for-linus 2020-03-30 09:46:51 +02:00
Geoffrey Allott
e9097e47e3 ALSA: hda/ca0132 - Add Recon3Di quirk to handle integrated sound on EVGA X99 Classified motherboard
I have a system which has an EVGA X99 Classified motherboard. The pin
assignments for the HD Audio controller are not correct under Linux.
Windows 10 works fine and informs me that it's using the Recon3Di
driver, and on Linux, `cat
/sys/class/sound/card0/device/subsystem_{vendor,device}` yields

0x3842
0x1038

This patch adds a corresponding entry to the quirk list.

Signed-off-by: Geoffrey Allott <geoffrey@allott.email>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/a6cd56b678c00ce2db3685e4278919f2584f8244.camel@allott.email
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-03-19 17:02:55 +01:00