Commit 6f6ebb98 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'sound-fix-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A collection of small fixes for 5.19 merge window. Nothing particular
  stands out, as most changes are device-specific fixes and quirks"

* tag 'sound-fix-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  selftests: alsa: Handle pkg-config failure more gracefully
  ALSA: usb-audio: Optimize TEAC clock quirk
  ASoC: da7219: cancel AAD related work earlier for jack removal
  ASoC: da7219: Fix pole orientation detection on certain headsets
  ASoC: Intel: avs: Fix build error on arc, m68k and sparc
  ALSA: hda/realtek - Fix microphone noise on ASUS TUF B550M-PLUS
  ALSA: hda/via: Delete does not require return
  ALSA: hda/realtek: Enable 4-speaker output for Dell XPS 15 9520 laptop
  ASoC: Intel: common: fix typo for tplg naming
  ALSA: usb-audio: Cancel pending work at closing a MIDI substream
  ALSA: usb-audio: Add mixer mapping for Gigabyte B450/550 Mobos
  ASoC: rt5640: Do not manipulate pin "Platform Clock" if the "Platform Clock" is not in the DAPM
  ASoC: SOF: amd: Fixed Build error
  ASoC: fsl_sai: Fix FSL_SAI_xDR/xFR definition
  ASoC: soc-pcm: fix BE transition for TRIGGER_START
parents ab18b7b3 672362cb
...@@ -1981,6 +1981,7 @@ enum { ...@@ -1981,6 +1981,7 @@ enum {
ALC1220_FIXUP_CLEVO_PB51ED_PINS, ALC1220_FIXUP_CLEVO_PB51ED_PINS,
ALC887_FIXUP_ASUS_AUDIO, ALC887_FIXUP_ASUS_AUDIO,
ALC887_FIXUP_ASUS_HMIC, ALC887_FIXUP_ASUS_HMIC,
ALCS1200A_FIXUP_MIC_VREF,
}; };
static void alc889_fixup_coef(struct hda_codec *codec, static void alc889_fixup_coef(struct hda_codec *codec,
...@@ -2526,6 +2527,14 @@ static const struct hda_fixup alc882_fixups[] = { ...@@ -2526,6 +2527,14 @@ static const struct hda_fixup alc882_fixups[] = {
.chained = true, .chained = true,
.chain_id = ALC887_FIXUP_ASUS_AUDIO, .chain_id = ALC887_FIXUP_ASUS_AUDIO,
}, },
[ALCS1200A_FIXUP_MIC_VREF] = {
.type = HDA_FIXUP_PINCTLS,
.v.pins = (const struct hda_pintbl[]) {
{ 0x18, PIN_VREF50 }, /* rear mic */
{ 0x19, PIN_VREF50 }, /* front mic */
{}
}
},
}; };
static const struct snd_pci_quirk alc882_fixup_tbl[] = { static const struct snd_pci_quirk alc882_fixup_tbl[] = {
...@@ -2563,6 +2572,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { ...@@ -2563,6 +2572,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601),
SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS), SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS),
SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3), SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3),
SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF),
SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP), SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP),
SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP), SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP),
SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),
...@@ -8905,6 +8915,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { ...@@ -8905,6 +8915,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK), SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
......
...@@ -449,8 +449,6 @@ static void vt1708_set_pinconfig_connect(struct hda_codec *codec, hda_nid_t nid) ...@@ -449,8 +449,6 @@ static void vt1708_set_pinconfig_connect(struct hda_codec *codec, hda_nid_t nid)
def_conf = def_conf & (~(AC_JACK_PORT_BOTH << 30)); def_conf = def_conf & (~(AC_JACK_PORT_BOTH << 30));
snd_hda_codec_set_pincfg(codec, nid, def_conf); snd_hda_codec_set_pincfg(codec, nid, def_conf);
} }
return;
} }
static int vt1708_jack_detect_get(struct snd_kcontrol *kcontrol, static int vt1708_jack_detect_get(struct snd_kcontrol *kcontrol,
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/module.h>
#include "amd.h" #include "amd.h"
#include "../mach-config.h" #include "../mach-config.h"
......
...@@ -60,6 +60,9 @@ static void da7219_aad_btn_det_work(struct work_struct *work) ...@@ -60,6 +60,9 @@ static void da7219_aad_btn_det_work(struct work_struct *work)
bool micbias_up = false; bool micbias_up = false;
int retries = 0; int retries = 0;
/* Disable ground switch */
snd_soc_component_update_bits(component, 0xFB, 0x01, 0x00);
/* Drive headphones/lineout */ /* Drive headphones/lineout */
snd_soc_component_update_bits(component, DA7219_HP_L_CTRL, snd_soc_component_update_bits(component, DA7219_HP_L_CTRL,
DA7219_HP_L_AMP_OE_MASK, DA7219_HP_L_AMP_OE_MASK,
...@@ -153,6 +156,9 @@ static void da7219_aad_hptest_work(struct work_struct *work) ...@@ -153,6 +156,9 @@ static void da7219_aad_hptest_work(struct work_struct *work)
tonegen_freq_hptest = cpu_to_le16(DA7219_AAD_HPTEST_RAMP_FREQ_INT_OSC); tonegen_freq_hptest = cpu_to_le16(DA7219_AAD_HPTEST_RAMP_FREQ_INT_OSC);
} }
/* Disable ground switch */
snd_soc_component_update_bits(component, 0xFB, 0x01, 0x00);
/* Ensure gain ramping at fastest rate */ /* Ensure gain ramping at fastest rate */
gain_ramp_ctrl = snd_soc_component_read(component, DA7219_GAIN_RAMP_CTRL); gain_ramp_ctrl = snd_soc_component_read(component, DA7219_GAIN_RAMP_CTRL);
snd_soc_component_write(component, DA7219_GAIN_RAMP_CTRL, DA7219_GAIN_RAMP_RATE_X8); snd_soc_component_write(component, DA7219_GAIN_RAMP_CTRL, DA7219_GAIN_RAMP_RATE_X8);
...@@ -428,6 +434,10 @@ static irqreturn_t da7219_aad_irq_thread(int irq, void *data) ...@@ -428,6 +434,10 @@ static irqreturn_t da7219_aad_irq_thread(int irq, void *data)
mask |= DA7219_AAD_REPORT_ALL_MASK; mask |= DA7219_AAD_REPORT_ALL_MASK;
da7219_aad->jack_inserted = false; da7219_aad->jack_inserted = false;
/* Cancel any pending work */
cancel_work_sync(&da7219_aad->btn_det_work);
cancel_work_sync(&da7219_aad->hptest_work);
/* Un-drive headphones/lineout */ /* Un-drive headphones/lineout */
snd_soc_component_update_bits(component, DA7219_HP_R_CTRL, snd_soc_component_update_bits(component, DA7219_HP_R_CTRL,
DA7219_HP_R_AMP_OE_MASK, 0); DA7219_HP_R_AMP_OE_MASK, 0);
...@@ -444,9 +454,8 @@ static irqreturn_t da7219_aad_irq_thread(int irq, void *data) ...@@ -444,9 +454,8 @@ static irqreturn_t da7219_aad_irq_thread(int irq, void *data)
snd_soc_dapm_disable_pin(dapm, "Mic Bias"); snd_soc_dapm_disable_pin(dapm, "Mic Bias");
snd_soc_dapm_sync(dapm); snd_soc_dapm_sync(dapm);
/* Cancel any pending work */ /* Enable ground switch */
cancel_work_sync(&da7219_aad->btn_det_work); snd_soc_component_update_bits(component, 0xFB, 0x01, 0x01);
cancel_work_sync(&da7219_aad->hptest_work);
} }
} }
...@@ -899,6 +908,9 @@ int da7219_aad_init(struct snd_soc_component *component) ...@@ -899,6 +908,9 @@ int da7219_aad_init(struct snd_soc_component *component)
snd_soc_component_update_bits(component, DA7219_ACCDET_CONFIG_1, snd_soc_component_update_bits(component, DA7219_ACCDET_CONFIG_1,
DA7219_BUTTON_CONFIG_MASK, 0); DA7219_BUTTON_CONFIG_MASK, 0);
/* Enable ground switch */
snd_soc_component_update_bits(component, 0xFB, 0x01, 0x01);
INIT_WORK(&da7219_aad->btn_det_work, da7219_aad_btn_det_work); INIT_WORK(&da7219_aad->btn_det_work, da7219_aad_btn_det_work);
INIT_WORK(&da7219_aad->hptest_work, da7219_aad_hptest_work); INIT_WORK(&da7219_aad->hptest_work, da7219_aad_hptest_work);
......
...@@ -2094,12 +2094,14 @@ EXPORT_SYMBOL_GPL(rt5640_sel_asrc_clk_src); ...@@ -2094,12 +2094,14 @@ EXPORT_SYMBOL_GPL(rt5640_sel_asrc_clk_src);
void rt5640_enable_micbias1_for_ovcd(struct snd_soc_component *component) void rt5640_enable_micbias1_for_ovcd(struct snd_soc_component *component)
{ {
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
struct rt5640_priv *rt5640 = snd_soc_component_get_drvdata(component);
snd_soc_dapm_mutex_lock(dapm); snd_soc_dapm_mutex_lock(dapm);
snd_soc_dapm_force_enable_pin_unlocked(dapm, "LDO2"); snd_soc_dapm_force_enable_pin_unlocked(dapm, "LDO2");
snd_soc_dapm_force_enable_pin_unlocked(dapm, "MICBIAS1"); snd_soc_dapm_force_enable_pin_unlocked(dapm, "MICBIAS1");
/* OVCD is unreliable when used with RCCLK as sysclk-source */ /* OVCD is unreliable when used with RCCLK as sysclk-source */
snd_soc_dapm_force_enable_pin_unlocked(dapm, "Platform Clock"); if (rt5640->use_platform_clock)
snd_soc_dapm_force_enable_pin_unlocked(dapm, "Platform Clock");
snd_soc_dapm_sync_unlocked(dapm); snd_soc_dapm_sync_unlocked(dapm);
snd_soc_dapm_mutex_unlock(dapm); snd_soc_dapm_mutex_unlock(dapm);
} }
...@@ -2108,9 +2110,11 @@ EXPORT_SYMBOL_GPL(rt5640_enable_micbias1_for_ovcd); ...@@ -2108,9 +2110,11 @@ EXPORT_SYMBOL_GPL(rt5640_enable_micbias1_for_ovcd);
void rt5640_disable_micbias1_for_ovcd(struct snd_soc_component *component) void rt5640_disable_micbias1_for_ovcd(struct snd_soc_component *component)
{ {
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
struct rt5640_priv *rt5640 = snd_soc_component_get_drvdata(component);
snd_soc_dapm_mutex_lock(dapm); snd_soc_dapm_mutex_lock(dapm);
snd_soc_dapm_disable_pin_unlocked(dapm, "Platform Clock"); if (rt5640->use_platform_clock)
snd_soc_dapm_disable_pin_unlocked(dapm, "Platform Clock");
snd_soc_dapm_disable_pin_unlocked(dapm, "MICBIAS1"); snd_soc_dapm_disable_pin_unlocked(dapm, "MICBIAS1");
snd_soc_dapm_disable_pin_unlocked(dapm, "LDO2"); snd_soc_dapm_disable_pin_unlocked(dapm, "LDO2");
snd_soc_dapm_sync_unlocked(dapm); snd_soc_dapm_sync_unlocked(dapm);
...@@ -2535,6 +2539,9 @@ static void rt5640_enable_jack_detect(struct snd_soc_component *component, ...@@ -2535,6 +2539,9 @@ static void rt5640_enable_jack_detect(struct snd_soc_component *component,
rt5640->jd_gpio_irq_requested = true; rt5640->jd_gpio_irq_requested = true;
} }
if (jack_data && jack_data->use_platform_clock)
rt5640->use_platform_clock = jack_data->use_platform_clock;
ret = request_irq(rt5640->irq, rt5640_irq, ret = request_irq(rt5640->irq, rt5640_irq,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
"rt5640", rt5640); "rt5640", rt5640);
......
...@@ -2155,11 +2155,13 @@ struct rt5640_priv { ...@@ -2155,11 +2155,13 @@ struct rt5640_priv {
bool jd_inverted; bool jd_inverted;
unsigned int ovcd_th; unsigned int ovcd_th;
unsigned int ovcd_sf; unsigned int ovcd_sf;
bool use_platform_clock;
}; };
struct rt5640_set_jack_data { struct rt5640_set_jack_data {
int codec_irq_override; int codec_irq_override;
struct gpio_desc *jd_gpio; struct gpio_desc *jd_gpio;
bool use_platform_clock;
}; };
int rt5640_dmic_enable(struct snd_soc_component *component, int rt5640_dmic_enable(struct snd_soc_component *component,
......
...@@ -80,8 +80,8 @@ ...@@ -80,8 +80,8 @@
#define FSL_SAI_xCR3(tx, ofs) (tx ? FSL_SAI_TCR3(ofs) : FSL_SAI_RCR3(ofs)) #define FSL_SAI_xCR3(tx, ofs) (tx ? FSL_SAI_TCR3(ofs) : FSL_SAI_RCR3(ofs))
#define FSL_SAI_xCR4(tx, ofs) (tx ? FSL_SAI_TCR4(ofs) : FSL_SAI_RCR4(ofs)) #define FSL_SAI_xCR4(tx, ofs) (tx ? FSL_SAI_TCR4(ofs) : FSL_SAI_RCR4(ofs))
#define FSL_SAI_xCR5(tx, ofs) (tx ? FSL_SAI_TCR5(ofs) : FSL_SAI_RCR5(ofs)) #define FSL_SAI_xCR5(tx, ofs) (tx ? FSL_SAI_TCR5(ofs) : FSL_SAI_RCR5(ofs))
#define FSL_SAI_xDR(tx, ofs) (tx ? FSL_SAI_TDR(ofs) : FSL_SAI_RDR(ofs)) #define FSL_SAI_xDR0(tx) (tx ? FSL_SAI_TDR0 : FSL_SAI_RDR0)
#define FSL_SAI_xFR(tx, ofs) (tx ? FSL_SAI_TFR(ofs) : FSL_SAI_RFR(ofs)) #define FSL_SAI_xFR0(tx) (tx ? FSL_SAI_TFR0 : FSL_SAI_RFR0)
#define FSL_SAI_xMR(tx) (tx ? FSL_SAI_TMR : FSL_SAI_RMR) #define FSL_SAI_xMR(tx) (tx ? FSL_SAI_TMR : FSL_SAI_RMR)
/* SAI Transmit/Receive Control Register */ /* SAI Transmit/Receive Control Register */
......
...@@ -326,7 +326,8 @@ static int avs_register_i2s_board(struct avs_dev *adev, struct snd_soc_acpi_mach ...@@ -326,7 +326,8 @@ static int avs_register_i2s_board(struct avs_dev *adev, struct snd_soc_acpi_mach
num_ssps = adev->hw_cfg.i2s_caps.ctrl_count; num_ssps = adev->hw_cfg.i2s_caps.ctrl_count;
if (fls(mach->mach_params.i2s_link_mask) > num_ssps) { if (fls(mach->mach_params.i2s_link_mask) > num_ssps) {
dev_err(adev->dev, "Platform supports %d SSPs but board %s requires SSP%ld\n", dev_err(adev->dev, "Platform supports %d SSPs but board %s requires SSP%ld\n",
num_ssps, mach->drv_name, __fls(mach->mach_params.i2s_link_mask)); num_ssps, mach->drv_name,
(unsigned long)__fls(mach->mach_params.i2s_link_mask));
return -ENODEV; return -ENODEV;
} }
......
...@@ -1191,12 +1191,14 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime) ...@@ -1191,12 +1191,14 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
{ {
struct snd_soc_card *card = runtime->card; struct snd_soc_card *card = runtime->card;
struct byt_rt5640_private *priv = snd_soc_card_get_drvdata(card); struct byt_rt5640_private *priv = snd_soc_card_get_drvdata(card);
struct rt5640_set_jack_data *jack_data = &priv->jack_data;
struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component; struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component;
const struct snd_soc_dapm_route *custom_map = NULL; const struct snd_soc_dapm_route *custom_map = NULL;
int num_routes = 0; int num_routes = 0;
int ret; int ret;
card->dapm.idle_bias_off = true; card->dapm.idle_bias_off = true;
jack_data->use_platform_clock = true;
/* Start with RC clk for jack-detect (we disable MCLK below) */ /* Start with RC clk for jack-detect (we disable MCLK below) */
if (byt_rt5640_quirk & BYT_RT5640_MCLK_EN) if (byt_rt5640_quirk & BYT_RT5640_MCLK_EN)
......
...@@ -453,7 +453,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { ...@@ -453,7 +453,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
.drv_name = "adl_mx98360a_nau8825", .drv_name = "adl_mx98360a_nau8825",
.machine_quirk = snd_soc_acpi_codec_list, .machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &adl_max98360a_amp, .quirk_data = &adl_max98360a_amp,
.sof_tplg_filename = "sof-adl-mx98360a-nau8825.tplg", .sof_tplg_filename = "sof-adl-max98360a-nau8825.tplg",
}, },
{ {
.id = "RTL5682", .id = "RTL5682",
......
...@@ -2128,8 +2128,6 @@ int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, ...@@ -2128,8 +2128,6 @@ int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream,
else else
ret = soc_pcm_trigger(be_substream, ret = soc_pcm_trigger(be_substream,
SNDRV_PCM_TRIGGER_START); SNDRV_PCM_TRIGGER_START);
ret = soc_pcm_trigger(be_substream, cmd);
if (ret) { if (ret) {
be->dpcm[stream].be_start--; be->dpcm[stream].be_start--;
goto next; goto next;
......
...@@ -573,10 +573,14 @@ static int set_sample_rate_v2v3(struct snd_usb_audio *chip, ...@@ -573,10 +573,14 @@ static int set_sample_rate_v2v3(struct snd_usb_audio *chip,
} }
/* FIXME - TEAC devices require the immediate interface setup */ /* FIXME - TEAC devices require the immediate interface setup */
if (rate != prev_rate && USB_ID_VENDOR(chip->usb_id) == 0x0644) { if (USB_ID_VENDOR(chip->usb_id) == 0x0644) {
usb_set_interface(chip->dev, fmt->iface, fmt->altsetting); bool cur_base_48k = (rate % 48000 == 0);
if (chip->quirk_flags & QUIRK_FLAG_IFACE_DELAY) bool prev_base_48k = (prev_rate % 48000 == 0);
msleep(50); if (cur_base_48k != prev_base_48k) {
usb_set_interface(chip->dev, fmt->iface, fmt->altsetting);
if (chip->quirk_flags & QUIRK_FLAG_IFACE_DELAY)
msleep(50);
}
} }
validation: validation:
......
...@@ -1145,6 +1145,9 @@ static int snd_usbmidi_output_open(struct snd_rawmidi_substream *substream) ...@@ -1145,6 +1145,9 @@ static int snd_usbmidi_output_open(struct snd_rawmidi_substream *substream)
static int snd_usbmidi_output_close(struct snd_rawmidi_substream *substream) static int snd_usbmidi_output_close(struct snd_rawmidi_substream *substream)
{ {
struct usbmidi_out_port *port = substream->runtime->private_data;
cancel_work_sync(&port->ep->work);
return substream_open(substream, 0, 0); return substream_open(substream, 0, 0);
} }
......
...@@ -439,6 +439,31 @@ static const struct usbmix_name_map msi_mpg_x570s_carbon_max_wifi_alc4080_map[] ...@@ -439,6 +439,31 @@ static const struct usbmix_name_map msi_mpg_x570s_carbon_max_wifi_alc4080_map[]
{} {}
}; };
/* Gigabyte B450/550 Mobo */
static const struct usbmix_name_map gigabyte_b450_map[] = {
{ 24, NULL }, /* OT, IEC958?, disabled */
{ 21, "Speaker" }, /* OT */
{ 29, "Speaker Playback" }, /* FU */
{ 22, "Headphone" }, /* OT */
{ 30, "Headphone Playback" }, /* FU */
{ 11, "Line" }, /* IT */
{ 27, "Line Capture" }, /* FU */
{ 12, "Mic" }, /* IT */
{ 28, "Mic Capture" }, /* FU */
{ 9, "Front Mic" }, /* IT */
{ 25, "Front Mic Capture" }, /* FU */
{}
};
static const struct usbmix_connector_map gigabyte_b450_connector_map[] = {
{ 13, 21 }, /* Speaker */
{ 14, 22 }, /* Headphone */
{ 19, 11 }, /* Line */
{ 20, 12 }, /* Mic */
{ 17, 9 }, /* Front Mic */
{}
};
/* /*
* Control map entries * Control map entries
*/ */
...@@ -581,6 +606,11 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = { ...@@ -581,6 +606,11 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
.map = trx40_mobo_map, .map = trx40_mobo_map,
.connector_map = trx40_mobo_connector_map, .connector_map = trx40_mobo_connector_map,
}, },
{ /* Gigabyte B450/550 Mobo */
.id = USB_ID(0x0414, 0xa00d),
.map = gigabyte_b450_map,
.connector_map = gigabyte_b450_connector_map,
},
{ /* ASUS ROG Zenith II */ { /* ASUS ROG Zenith II */
.id = USB_ID(0x0b05, 0x1916), .id = USB_ID(0x0b05, 0x1916),
.map = asus_rog_map, .map = asus_rog_map,
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
CFLAGS += $(shell pkg-config --cflags alsa) CFLAGS += $(shell pkg-config --cflags alsa)
LDLIBS += $(shell pkg-config --libs alsa) LDLIBS += $(shell pkg-config --libs alsa)
ifeq ($(LDLIBS),)
LDLIBS += -lasound
endif
TEST_GEN_PROGS := mixer-test TEST_GEN_PROGS := mixer-test
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment