Merge tag 'sound-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "No dramatic changes are found in this development cycle, but as usual, many commits are applied in a wide range of drivers. Most of big changes are in ASoC, where a few bits of framework work and quite a lot of cleanups and improvements to existing code have been done. The rest are usual stuff, a few HD-audio and USB-audio quirks and fixes, as well as the drop of kthread usages in the whole subsystem. Below are some highlights: ASoC: - support for stereo DAPM controls - some initial work on the of-graph sound card - regmap conversions of the remaining AC'97 drivers - a new version of the topology ABI; this should be backward compatible - updates / cleanups of rsnd, sunxi, sti, nau8825, samsung, arizona, Intel skylake, atom-sst - new drivers for Cirrus Logic CS42L42, Qualcomm MSM8916-WCD, and Realtek RT5665 USB-audio: - yet another race fix at disconnection - tolerated packet size calculation for some Android devices - quirks for Axe-Fx II, QuickCam, TEAC 501/503 HD-audio: - improvement of Dell pin fixup mapping - quirks for HP Z1 Gen3, Alienware 15 R2 2016 and ALC622 headset mic Misc: - replace all kthread usages with simple works" * tag 'sound-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (296 commits) ALSA: hiface: Fix M2Tech hiFace driver sampling rate change ALSA: usb-audio: Eliminate noise at the start of DSD playback. ALSA: usb-audio: Add native DSD support for TEAC 501/503 DAC ASoC: wm_adsp: wm_adsp_buf_alloc should use kfree in error path ASoC: topology: avoid uninitialized kcontrol_type ALSA: usb-audio: Add QuickCam Communicate Deluxe/S7500 to volume_control_quirks ALSA: usb-audio: add implicit fb quirk for Axe-Fx II ASoC: zte: spdif: correct ZX_SPDIF_CLK_RAT define ASoC: zte: spdif and i2s drivers are not zx296702 specific ASoC: rsnd: setup BRGCKR/BRRA/BRRB when starting ASoC: rsnd: enable/disable ADG when suspend/resume timing ASoC: rsnd: tidyup ssi->usrcnt counter check in hw_params ALSA: cs46xx: add a new line ASoC: Intel: update bxt_da7219_max98357a to support quad ch dmic capture ASoC: nau8825: disable sinc filter for high THD of ADC ALSA: usb-audio: more tolerant packetsize ALSA: usb-audio: avoid setting of sample rate multiple times on bus ASoC: cs35l34: Simplify the logic to set CS35L34_MCLK_CTL setting ALSA: hda - Gate the mic jack on HP Z1 Gen3 AiO ALSA: hda: when comparing pin configurations, ignore assoc in addition to seq ...
This commit is contained in:
@@ -1907,7 +1907,7 @@ static int ac97_reset_wait(struct snd_ac97 *ac97, int timeout, int with_modem)
|
||||
* write). The other callbacks, wait and reset, are not mandatory.
|
||||
*
|
||||
* The clock is set to 48000. If another clock is needed, set
|
||||
* (*rbus)->clock manually.
|
||||
* ``(*rbus)->clock`` manually.
|
||||
*
|
||||
* The AC97 bus instance is registered as a low-level device, so you don't
|
||||
* have to release it manually.
|
||||
|
@@ -84,7 +84,7 @@ MODULE_DESCRIPTION("Avance Logic ALS4000");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_SUPPORTED_DEVICE("{{Avance Logic,ALS4000}}");
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
#define SUPPORT_JOYSTICK 1
|
||||
#endif
|
||||
|
||||
|
@@ -36,7 +36,7 @@
|
||||
#include <linux/gameport.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
|
||||
#define VORTEX_GAME_DWAIT 20 /* 20 ms */
|
||||
|
||||
|
@@ -212,7 +212,7 @@ MODULE_DESCRIPTION("Aztech AZF3328 (PCI168)");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_SUPPORTED_DEVICE("{{Aztech,AZF3328}}");
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
#define SUPPORT_GAMEPORT 1
|
||||
#endif
|
||||
|
||||
|
@@ -48,7 +48,7 @@ MODULE_SUPPORTED_DEVICE("{{C-Media,CMI8738},"
|
||||
"{C-Media,CMI8338A},"
|
||||
"{C-Media,CMI8338B}}");
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
#define SUPPORT_JOYSTICK 1
|
||||
#endif
|
||||
|
||||
|
@@ -1194,7 +1194,7 @@ static void snd_cs4281_proc_init(struct cs4281 *chip)
|
||||
* joystick support
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
|
||||
static void snd_cs4281_gameport_trigger(struct gameport *gameport)
|
||||
{
|
||||
|
@@ -2718,7 +2718,7 @@ int snd_cs46xx_midi(struct snd_cs46xx *chip, int device)
|
||||
* gameport interface
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
|
||||
static void snd_cs46xx_gameport_trigger(struct gameport *gameport)
|
||||
{
|
||||
|
@@ -107,7 +107,8 @@ static int shadow_and_reallocate_code (struct snd_cs46xx * chip, u32 * data, u32
|
||||
|
||||
dev_dbg(chip->card->dev,
|
||||
"handle_wideop:[2] %05x:%05x addr %04x\n",
|
||||
hival, loval, address); nreallocated++;
|
||||
hival, loval, address);
|
||||
nreallocated++;
|
||||
} /* wide_opcodes[j] == wide_op */
|
||||
} /* for */
|
||||
} /* mod_type == 0 ... */
|
||||
|
@@ -135,7 +135,7 @@ static int load_asic(struct echoaudio *chip)
|
||||
err = load_asic_generic(chip, DSP_FNC_LOAD_LAYLA24_EXTERNAL_ASIC,
|
||||
FW_LAYLA24_2S_ASIC);
|
||||
if (err < 0)
|
||||
return false;
|
||||
return err;
|
||||
|
||||
/* Now give the external ASIC a little time to set up */
|
||||
mdelay(10);
|
||||
|
@@ -37,7 +37,7 @@ MODULE_LICENSE("GPL");
|
||||
MODULE_SUPPORTED_DEVICE("{{Creative Labs,SB Live!/PCI512/E-mu APS},"
|
||||
"{Creative Labs,SB Audigy}}");
|
||||
|
||||
#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_SND_SEQUENCER)
|
||||
#define ENABLE_SYNTH
|
||||
#include <sound/emu10k1_synth.h>
|
||||
#endif
|
||||
@@ -194,6 +194,9 @@ static int snd_card_emu10k1_probe(struct pci_dev *pci,
|
||||
if ((err = snd_card_register(card)) < 0)
|
||||
goto error;
|
||||
|
||||
if (emu->card_capabilities->emu_model)
|
||||
schedule_delayed_work(&emu->emu1010.firmware_work, 0);
|
||||
|
||||
pci_set_drvdata(pci, card);
|
||||
dev++;
|
||||
return 0;
|
||||
@@ -219,6 +222,8 @@ static int snd_emu10k1_suspend(struct device *dev)
|
||||
|
||||
emu->suspend = 1;
|
||||
|
||||
cancel_delayed_work_sync(&emu->emu1010.firmware_work);
|
||||
|
||||
snd_pcm_suspend_all(emu->pcm);
|
||||
snd_pcm_suspend_all(emu->pcm_mic);
|
||||
snd_pcm_suspend_all(emu->pcm_efx);
|
||||
@@ -252,6 +257,10 @@ static int snd_emu10k1_resume(struct device *dev)
|
||||
emu->suspend = 0;
|
||||
|
||||
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
|
||||
|
||||
if (emu->card_capabilities->emu_model)
|
||||
schedule_delayed_work(&emu->emu1010.firmware_work, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -32,7 +32,6 @@
|
||||
*/
|
||||
|
||||
#include <linux/sched.h>
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
@@ -662,7 +661,7 @@ static int snd_emu10k1_cardbus_init(struct snd_emu10k1 *emu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_emu1010_load_firmware(struct snd_emu10k1 *emu,
|
||||
static int snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu,
|
||||
const struct firmware *fw_entry)
|
||||
{
|
||||
int n, i;
|
||||
@@ -708,98 +707,104 @@ static int snd_emu1010_load_firmware(struct snd_emu10k1 *emu,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int emu1010_firmware_thread(void *data)
|
||||
/* firmware file names, per model, init-fw and dock-fw (optional) */
|
||||
static const char * const firmware_names[5][2] = {
|
||||
[EMU_MODEL_EMU1010] = {
|
||||
HANA_FILENAME, DOCK_FILENAME
|
||||
},
|
||||
[EMU_MODEL_EMU1010B] = {
|
||||
EMU1010B_FILENAME, MICRO_DOCK_FILENAME
|
||||
},
|
||||
[EMU_MODEL_EMU1616] = {
|
||||
EMU1010_NOTEBOOK_FILENAME, MICRO_DOCK_FILENAME
|
||||
},
|
||||
[EMU_MODEL_EMU0404] = {
|
||||
EMU0404_FILENAME, NULL
|
||||
},
|
||||
};
|
||||
|
||||
static int snd_emu1010_load_firmware(struct snd_emu10k1 *emu, int dock,
|
||||
const struct firmware **fw)
|
||||
{
|
||||
struct snd_emu10k1 *emu = data;
|
||||
u32 tmp, tmp2, reg;
|
||||
u32 last_reg = 0;
|
||||
const char *filename;
|
||||
int err;
|
||||
|
||||
for (;;) {
|
||||
/* Delay to allow Audio Dock to settle */
|
||||
msleep_interruptible(1000);
|
||||
if (kthread_should_stop())
|
||||
break;
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
if (emu->suspend)
|
||||
continue;
|
||||
#endif
|
||||
snd_emu1010_fpga_read(emu, EMU_HANA_IRQ_STATUS, &tmp); /* IRQ Status */
|
||||
snd_emu1010_fpga_read(emu, EMU_HANA_OPTION_CARDS, ®); /* OPTIONS: Which cards are attached to the EMU */
|
||||
if (reg & EMU_HANA_OPTION_DOCK_OFFLINE) {
|
||||
/* Audio Dock attached */
|
||||
/* Return to Audio Dock programming mode */
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: Loading Audio Dock Firmware\n");
|
||||
snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, EMU_HANA_FPGA_CONFIG_AUDIODOCK);
|
||||
|
||||
if (!emu->dock_fw) {
|
||||
const char *filename = NULL;
|
||||
switch (emu->card_capabilities->emu_model) {
|
||||
case EMU_MODEL_EMU1010:
|
||||
filename = DOCK_FILENAME;
|
||||
break;
|
||||
case EMU_MODEL_EMU1010B:
|
||||
filename = MICRO_DOCK_FILENAME;
|
||||
break;
|
||||
case EMU_MODEL_EMU1616:
|
||||
filename = MICRO_DOCK_FILENAME;
|
||||
break;
|
||||
}
|
||||
if (filename) {
|
||||
err = request_firmware(&emu->dock_fw,
|
||||
filename,
|
||||
&emu->pci->dev);
|
||||
if (err)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (emu->dock_fw) {
|
||||
err = snd_emu1010_load_firmware(emu, emu->dock_fw);
|
||||
if (err)
|
||||
continue;
|
||||
}
|
||||
|
||||
snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, 0);
|
||||
snd_emu1010_fpga_read(emu, EMU_HANA_IRQ_STATUS, ®);
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: EMU_HANA+DOCK_IRQ_STATUS = 0x%x\n",
|
||||
reg);
|
||||
/* ID, should read & 0x7f = 0x55 when FPGA programmed. */
|
||||
snd_emu1010_fpga_read(emu, EMU_HANA_ID, ®);
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: EMU_HANA+DOCK_ID = 0x%x\n", reg);
|
||||
if ((reg & 0x1f) != 0x15) {
|
||||
/* FPGA failed to be programmed */
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: Loading Audio Dock Firmware file failed, reg = 0x%x\n",
|
||||
reg);
|
||||
continue;
|
||||
}
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: Audio Dock Firmware loaded\n");
|
||||
snd_emu1010_fpga_read(emu, EMU_DOCK_MAJOR_REV, &tmp);
|
||||
snd_emu1010_fpga_read(emu, EMU_DOCK_MINOR_REV, &tmp2);
|
||||
dev_info(emu->card->dev, "Audio Dock ver: %u.%u\n",
|
||||
tmp, tmp2);
|
||||
/* Sync clocking between 1010 and Dock */
|
||||
/* Allow DLL to settle */
|
||||
msleep(10);
|
||||
/* Unmute all. Default is muted after a firmware load */
|
||||
snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE);
|
||||
} else if (!reg && last_reg) {
|
||||
/* Audio Dock removed */
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: Audio Dock detached\n");
|
||||
/* Unmute all */
|
||||
snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE);
|
||||
}
|
||||
|
||||
last_reg = reg;
|
||||
if (!*fw) {
|
||||
filename = firmware_names[emu->card_capabilities->emu_model][dock];
|
||||
if (!filename)
|
||||
return 0;
|
||||
err = request_firmware(fw, filename, &emu->pci->dev);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
dev_info(emu->card->dev, "emu1010: firmware thread stopping\n");
|
||||
return 0;
|
||||
|
||||
return snd_emu1010_load_firmware_entry(emu, *fw);
|
||||
}
|
||||
|
||||
static void emu1010_firmware_work(struct work_struct *work)
|
||||
{
|
||||
struct snd_emu10k1 *emu;
|
||||
u32 tmp, tmp2, reg;
|
||||
int err;
|
||||
|
||||
emu = container_of(work, struct snd_emu10k1,
|
||||
emu1010.firmware_work.work);
|
||||
if (emu->card->shutdown)
|
||||
return;
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
if (emu->suspend)
|
||||
return;
|
||||
#endif
|
||||
snd_emu1010_fpga_read(emu, EMU_HANA_IRQ_STATUS, &tmp); /* IRQ Status */
|
||||
snd_emu1010_fpga_read(emu, EMU_HANA_OPTION_CARDS, ®); /* OPTIONS: Which cards are attached to the EMU */
|
||||
if (reg & EMU_HANA_OPTION_DOCK_OFFLINE) {
|
||||
/* Audio Dock attached */
|
||||
/* Return to Audio Dock programming mode */
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: Loading Audio Dock Firmware\n");
|
||||
snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG,
|
||||
EMU_HANA_FPGA_CONFIG_AUDIODOCK);
|
||||
err = snd_emu1010_load_firmware(emu, 1, &emu->dock_fw);
|
||||
if (err < 0)
|
||||
goto next;
|
||||
|
||||
snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, 0);
|
||||
snd_emu1010_fpga_read(emu, EMU_HANA_IRQ_STATUS, &tmp);
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: EMU_HANA+DOCK_IRQ_STATUS = 0x%x\n", tmp);
|
||||
/* ID, should read & 0x7f = 0x55 when FPGA programmed. */
|
||||
snd_emu1010_fpga_read(emu, EMU_HANA_ID, &tmp);
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: EMU_HANA+DOCK_ID = 0x%x\n", tmp);
|
||||
if ((tmp & 0x1f) != 0x15) {
|
||||
/* FPGA failed to be programmed */
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: Loading Audio Dock Firmware file failed, reg = 0x%x\n",
|
||||
tmp);
|
||||
goto next;
|
||||
}
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: Audio Dock Firmware loaded\n");
|
||||
snd_emu1010_fpga_read(emu, EMU_DOCK_MAJOR_REV, &tmp);
|
||||
snd_emu1010_fpga_read(emu, EMU_DOCK_MINOR_REV, &tmp2);
|
||||
dev_info(emu->card->dev, "Audio Dock ver: %u.%u\n", tmp, tmp2);
|
||||
/* Sync clocking between 1010 and Dock */
|
||||
/* Allow DLL to settle */
|
||||
msleep(10);
|
||||
/* Unmute all. Default is muted after a firmware load */
|
||||
snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE);
|
||||
} else if (!reg && emu->emu1010.last_reg) {
|
||||
/* Audio Dock removed */
|
||||
dev_info(emu->card->dev, "emu1010: Audio Dock detached\n");
|
||||
/* Unmute all */
|
||||
snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE);
|
||||
}
|
||||
|
||||
next:
|
||||
emu->emu1010.last_reg = reg;
|
||||
if (!emu->card->shutdown)
|
||||
schedule_delayed_work(&emu->emu1010.firmware_work,
|
||||
msecs_to_jiffies(1000));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -881,39 +886,8 @@ static int snd_emu10k1_emu1010_init(struct snd_emu10k1 *emu)
|
||||
}
|
||||
dev_info(emu->card->dev, "emu1010: EMU_HANA_ID = 0x%x\n", reg);
|
||||
|
||||
if (!emu->firmware) {
|
||||
const char *filename;
|
||||
switch (emu->card_capabilities->emu_model) {
|
||||
case EMU_MODEL_EMU1010:
|
||||
filename = HANA_FILENAME;
|
||||
break;
|
||||
case EMU_MODEL_EMU1010B:
|
||||
filename = EMU1010B_FILENAME;
|
||||
break;
|
||||
case EMU_MODEL_EMU1616:
|
||||
filename = EMU1010_NOTEBOOK_FILENAME;
|
||||
break;
|
||||
case EMU_MODEL_EMU0404:
|
||||
filename = EMU0404_FILENAME;
|
||||
break;
|
||||
default:
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
err = request_firmware(&emu->firmware, filename, &emu->pci->dev);
|
||||
if (err != 0) {
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: firmware: %s not found. Err = %d\n",
|
||||
filename, err);
|
||||
return err;
|
||||
}
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: firmware file = %s, size = 0x%zx\n",
|
||||
filename, emu->firmware->size);
|
||||
}
|
||||
|
||||
err = snd_emu1010_load_firmware(emu, emu->firmware);
|
||||
if (err != 0) {
|
||||
err = snd_emu1010_load_firmware(emu, 0, &emu->firmware);
|
||||
if (err < 0) {
|
||||
dev_info(emu->card->dev, "emu1010: Loading Firmware failed\n");
|
||||
return err;
|
||||
}
|
||||
@@ -1136,22 +1110,6 @@ static int snd_emu10k1_emu1010_init(struct snd_emu10k1 *emu)
|
||||
snd_emu1010_fpga_read(emu, EMU_HANA_SPDIF_MODE, &tmp);
|
||||
snd_emu1010_fpga_write(emu, EMU_HANA_SPDIF_MODE, 0x10); /* SPDIF Format spdif (or 0x11 for aes/ebu) */
|
||||
|
||||
/* Start Micro/Audio Dock firmware loader thread */
|
||||
if (!emu->emu1010.firmware_thread) {
|
||||
emu->emu1010.firmware_thread =
|
||||
kthread_create(emu1010_firmware_thread, emu,
|
||||
"emu1010_firmware");
|
||||
if (IS_ERR(emu->emu1010.firmware_thread)) {
|
||||
err = PTR_ERR(emu->emu1010.firmware_thread);
|
||||
emu->emu1010.firmware_thread = NULL;
|
||||
dev_info(emu->card->dev,
|
||||
"emu1010: Creating thread failed\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
wake_up_process(emu->emu1010.firmware_thread);
|
||||
}
|
||||
|
||||
#if 0
|
||||
snd_emu1010_fpga_link_dst_src_write(emu,
|
||||
EMU_DST_HAMOA_DAC_LEFT1, EMU_SRC_ALICE_EMU32B + 2); /* ALICE2 bus 0xa2 */
|
||||
@@ -1309,8 +1267,7 @@ static int snd_emu10k1_free(struct snd_emu10k1 *emu)
|
||||
/* Disable 48Volt power to Audio Dock */
|
||||
snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_PWR, 0);
|
||||
}
|
||||
if (emu->emu1010.firmware_thread)
|
||||
kthread_stop(emu->emu1010.firmware_thread);
|
||||
cancel_delayed_work_sync(&emu->emu1010.firmware_work);
|
||||
release_firmware(emu->firmware);
|
||||
release_firmware(emu->dock_fw);
|
||||
if (emu->irq >= 0)
|
||||
@@ -1852,6 +1809,7 @@ int snd_emu10k1_create(struct snd_card *card,
|
||||
emu->irq = -1;
|
||||
emu->synth = NULL;
|
||||
emu->get_synth_voice = NULL;
|
||||
INIT_DELAYED_WORK(&emu->emu1010.firmware_work, emu1010_firmware_work);
|
||||
/* read revision & serial */
|
||||
emu->revision = pci->revision;
|
||||
pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &emu->serial);
|
||||
|
@@ -79,7 +79,7 @@ MODULE_SUPPORTED_DEVICE("{{Ensoniq,AudioPCI ES1371/73},"
|
||||
"{Ectiva,EV1938}}");
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
#define SUPPORT_JOYSTICK
|
||||
#endif
|
||||
|
||||
|
@@ -72,7 +72,7 @@ MODULE_SUPPORTED_DEVICE("{{ESS,ES1938},"
|
||||
"{ESS,ES1969},"
|
||||
"{TerraTec,128i PCI}}");
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
#define SUPPORT_JOYSTICK 1
|
||||
#endif
|
||||
|
||||
|
@@ -126,7 +126,7 @@ MODULE_SUPPORTED_DEVICE("{{ESS,Maestro 2e},"
|
||||
"{ESS,Maestro 1},"
|
||||
"{TerraTec,DMX}}");
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
#define SUPPORT_JOYSTICK 1
|
||||
#endif
|
||||
|
||||
|
@@ -884,6 +884,8 @@ void snd_hda_apply_fixup(struct hda_codec *codec, int action)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hda_apply_fixup);
|
||||
|
||||
#define IGNORE_SEQ_ASSOC (~(AC_DEFCFG_SEQUENCE | AC_DEFCFG_DEF_ASSOC))
|
||||
|
||||
static bool pin_config_match(struct hda_codec *codec,
|
||||
const struct hda_pintbl *pins)
|
||||
{
|
||||
@@ -901,7 +903,7 @@ static bool pin_config_match(struct hda_codec *codec,
|
||||
for (; t_pins->nid; t_pins++) {
|
||||
if (t_pins->nid == nid) {
|
||||
found = 1;
|
||||
if (t_pins->val == cfg)
|
||||
if ((t_pins->val & IGNORE_SEQ_ASSOC) == (cfg & IGNORE_SEQ_ASSOC))
|
||||
break;
|
||||
else if ((cfg & 0xf0000000) == 0x40000000 && (t_pins->val & 0xf0000000) == 0x40000000)
|
||||
break;
|
||||
|
@@ -780,6 +780,7 @@ static const struct hda_pintbl alienware_pincfgs[] = {
|
||||
static const struct snd_pci_quirk ca0132_quirks[] = {
|
||||
SND_PCI_QUIRK(0x1028, 0x0685, "Alienware 15 2015", QUIRK_ALIENWARE),
|
||||
SND_PCI_QUIRK(0x1028, 0x0688, "Alienware 17 2015", QUIRK_ALIENWARE),
|
||||
SND_PCI_QUIRK(0x1028, 0x0708, "Alienware 15 R2 2016", QUIRK_ALIENWARE),
|
||||
{}
|
||||
};
|
||||
|
||||
|
@@ -262,6 +262,7 @@ enum {
|
||||
CXT_FIXUP_CAP_MIX_AMP_5047,
|
||||
CXT_FIXUP_MUTE_LED_EAPD,
|
||||
CXT_FIXUP_HP_SPECTRE,
|
||||
CXT_FIXUP_HP_GATE_MIC,
|
||||
};
|
||||
|
||||
/* for hda_fixup_thinkpad_acpi() */
|
||||
@@ -633,6 +634,17 @@ static void cxt_fixup_cap_mix_amp_5047(struct hda_codec *codec,
|
||||
(1 << AC_AMPCAP_MUTE_SHIFT));
|
||||
}
|
||||
|
||||
static void cxt_fixup_hp_gate_mic_jack(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix,
|
||||
int action)
|
||||
{
|
||||
/* the mic pin (0x19) doesn't give an unsolicited event;
|
||||
* probe the mic pin together with the headphone pin (0x16)
|
||||
*/
|
||||
if (action == HDA_FIXUP_ACT_PROBE)
|
||||
snd_hda_jack_set_gating_jack(codec, 0x19, 0x16);
|
||||
}
|
||||
|
||||
/* ThinkPad X200 & co with cxt5051 */
|
||||
static const struct hda_pintbl cxt_pincfg_lenovo_x200[] = {
|
||||
{ 0x16, 0x042140ff }, /* HP (seq# overridden) */
|
||||
@@ -774,6 +786,10 @@ static const struct hda_fixup cxt_fixups[] = {
|
||||
{ }
|
||||
}
|
||||
},
|
||||
[CXT_FIXUP_HP_GATE_MIC] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = cxt_fixup_hp_gate_mic_jack,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk cxt5045_fixups[] = {
|
||||
@@ -824,6 +840,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
|
||||
SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_ASPIRE_DMIC),
|
||||
SND_PCI_QUIRK(0x1025, 0x054f, "Acer Aspire 4830T", CXT_FIXUP_ASPIRE_DMIC),
|
||||
SND_PCI_QUIRK(0x103c, 0x8174, "HP Spectre x360", CXT_FIXUP_HP_SPECTRE),
|
||||
SND_PCI_QUIRK(0x103c, 0x8115, "HP Z1 Gen3", CXT_FIXUP_HP_GATE_MIC),
|
||||
SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN),
|
||||
SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO),
|
||||
SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
|
||||
|
@@ -420,7 +420,7 @@ static void alc_auto_setup_eapd(struct hda_codec *codec, bool on)
|
||||
}
|
||||
|
||||
/* generic shutup callback;
|
||||
* just turning off EPAD and a little pause for avoiding pop-noise
|
||||
* just turning off EAPD and a little pause for avoiding pop-noise
|
||||
*/
|
||||
static void alc_eapd_shutup(struct hda_codec *codec)
|
||||
{
|
||||
@@ -5917,6 +5917,9 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
|
||||
{0x12, 0x90a60180},
|
||||
{0x14, 0x90170120},
|
||||
{0x21, 0x02211030}),
|
||||
SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
|
||||
{0x1b, 0x01011020},
|
||||
{0x21, 0x02211010}),
|
||||
SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
|
||||
{0x12, 0x90a60160},
|
||||
{0x14, 0x90170120},
|
||||
@@ -6561,6 +6564,30 @@ static void alc662_fixup_led_gpio1(struct hda_codec *codec,
|
||||
}
|
||||
}
|
||||
|
||||
static void alc662_usi_automute_hook(struct hda_codec *codec,
|
||||
struct hda_jack_callback *jack)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
int vref;
|
||||
msleep(200);
|
||||
snd_hda_gen_hp_automute(codec, jack);
|
||||
|
||||
vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
|
||||
msleep(100);
|
||||
snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
|
||||
vref);
|
||||
}
|
||||
|
||||
static void alc662_fixup_usi_headset_mic(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix, int action)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
|
||||
spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
|
||||
spec->gen.hp_automute_hook = alc662_usi_automute_hook;
|
||||
}
|
||||
}
|
||||
|
||||
static struct coef_fw alc668_coefs[] = {
|
||||
WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
|
||||
WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
|
||||
@@ -6626,6 +6653,8 @@ enum {
|
||||
ALC891_FIXUP_DELL_MIC_NO_PRESENCE,
|
||||
ALC662_FIXUP_ACER_VERITON,
|
||||
ALC892_FIXUP_ASROCK_MOBO,
|
||||
ALC662_FIXUP_USI_FUNC,
|
||||
ALC662_FIXUP_USI_HEADSET_MODE,
|
||||
};
|
||||
|
||||
static const struct hda_fixup alc662_fixups[] = {
|
||||
@@ -6910,6 +6939,20 @@ static const struct hda_fixup alc662_fixups[] = {
|
||||
{ }
|
||||
}
|
||||
},
|
||||
[ALC662_FIXUP_USI_FUNC] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc662_fixup_usi_headset_mic,
|
||||
},
|
||||
[ALC662_FIXUP_USI_HEADSET_MODE] = {
|
||||
.type = HDA_FIXUP_PINS,
|
||||
.v.pins = (const struct hda_pintbl[]) {
|
||||
{ 0x19, 0x02a1913c }, /* use as headset mic, without its own jack detect */
|
||||
{ 0x18, 0x01a1903d },
|
||||
{ }
|
||||
},
|
||||
.chained = true,
|
||||
.chain_id = ALC662_FIXUP_USI_FUNC
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc662_fixup_tbl[] = {
|
||||
@@ -6945,6 +6988,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
|
||||
SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2),
|
||||
SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
|
||||
SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE),
|
||||
SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
|
||||
SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),
|
||||
|
@@ -110,7 +110,7 @@
|
||||
#include <sound/opl3.h>
|
||||
#include <sound/initval.h>
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
#define SUPPORT_JOYSTICK 1
|
||||
#endif
|
||||
|
||||
|
@@ -45,7 +45,7 @@ MODULE_DESCRIPTION("S3 SonicVibes PCI");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_SUPPORTED_DEVICE("{{S3,SonicVibes PCI}}");
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
#define SUPPORT_JOYSTICK 1
|
||||
#endif
|
||||
|
||||
|
@@ -3120,7 +3120,7 @@ static int snd_trident_mixer(struct snd_trident *trident, int pcm_spdif_device)
|
||||
* gameport interface
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
|
||||
static unsigned char snd_trident_gameport_read(struct gameport *gameport)
|
||||
{
|
||||
|
@@ -72,7 +72,7 @@ MODULE_DESCRIPTION("VIA VT82xx audio");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_SUPPORTED_DEVICE("{{VIA,VT82C686A/B/C,pci},{VIA,VT8233A/C,8235}}");
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
#define SUPPORT_JOYSTICK 1
|
||||
#endif
|
||||
|
||||
|
@@ -176,7 +176,7 @@
|
||||
#define YMFPCI_LEGACY2_IMOD (1 << 15) /* legacy IRQ mode */
|
||||
/* SIEN:IMOD 0:0 = legacy irq, 0:1 = INTA, 1:0 = serialized IRQ */
|
||||
|
||||
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
|
||||
#if IS_REACHABLE(CONFIG_GAMEPORT)
|
||||
#define SUPPORT_JOYSTICK
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user