Merge branch 'for-linus' into for-next
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Коммит
7b48b3b226
|
@ -173,7 +173,11 @@ static inline void snd_compr_drain_notify(struct snd_compr_stream *stream)
|
|||
if (snd_BUG_ON(!stream))
|
||||
return;
|
||||
|
||||
if (stream->direction == SND_COMPRESS_PLAYBACK)
|
||||
stream->runtime->state = SNDRV_PCM_STATE_SETUP;
|
||||
else
|
||||
stream->runtime->state = SNDRV_PCM_STATE_PREPARED;
|
||||
|
||||
wake_up(&stream->runtime->sleep);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ struct hda_bus {
|
|||
unsigned int response_reset:1; /* controller was reset */
|
||||
unsigned int in_reset:1; /* during reset operation */
|
||||
unsigned int no_response_fallback:1; /* don't fallback at RIRB error */
|
||||
unsigned int bus_probing :1; /* during probing process */
|
||||
|
||||
int primary_dig_out_type; /* primary digital out PCM type */
|
||||
unsigned int mixer_assigned; /* codec addr for mixer name */
|
||||
|
|
|
@ -115,7 +115,8 @@ static int hda_codec_driver_probe(struct device *dev)
|
|||
err = snd_hda_codec_build_controls(codec);
|
||||
if (err < 0)
|
||||
goto error_module;
|
||||
if (codec->card->registered) {
|
||||
/* only register after the bus probe finished; otherwise it's racy */
|
||||
if (!codec->bus->bus_probing && codec->card->registered) {
|
||||
err = snd_card_register(codec->card);
|
||||
if (err < 0)
|
||||
goto error_module;
|
||||
|
|
|
@ -2185,6 +2185,7 @@ static int azx_probe_continue(struct azx *chip)
|
|||
int dev = chip->dev_index;
|
||||
int err;
|
||||
|
||||
to_hda_bus(bus)->bus_probing = 1;
|
||||
hda->probe_continued = 1;
|
||||
|
||||
/* bind with i915 if needed */
|
||||
|
@ -2269,6 +2270,7 @@ out_free:
|
|||
if (err < 0)
|
||||
hda->init_failed = 1;
|
||||
complete_all(&hda->probe_wait);
|
||||
to_hda_bus(bus)->bus_probing = 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -8451,8 +8451,10 @@ static void ca0132_free(struct hda_codec *codec)
|
|||
ca0132_exit_chip(codec);
|
||||
|
||||
snd_hda_power_down(codec);
|
||||
if (IS_ENABLED(CONFIG_PCI) && spec->mem_base)
|
||||
#ifdef CONFIG_PCI
|
||||
if (spec->mem_base)
|
||||
pci_iounmap(codec->bus->pci, spec->mem_base);
|
||||
#endif
|
||||
kfree(spec->spec_init_verbs);
|
||||
kfree(codec->spec);
|
||||
}
|
||||
|
|
|
@ -924,6 +924,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
|
|||
SND_PCI_QUIRK(0x103c, 0x807C, "HP EliteBook 820 G3", CXT_FIXUP_HP_DOCK),
|
||||
SND_PCI_QUIRK(0x103c, 0x80FD, "HP ProBook 640 G2", CXT_FIXUP_HP_DOCK),
|
||||
SND_PCI_QUIRK(0x103c, 0x828c, "HP EliteBook 840 G4", CXT_FIXUP_HP_DOCK),
|
||||
SND_PCI_QUIRK(0x103c, 0x83b2, "HP EliteBook 840 G5", CXT_FIXUP_HP_DOCK),
|
||||
SND_PCI_QUIRK(0x103c, 0x83b3, "HP EliteBook 830 G5", CXT_FIXUP_HP_DOCK),
|
||||
SND_PCI_QUIRK(0x103c, 0x83d3, "HP ProBook 640 G4", CXT_FIXUP_HP_DOCK),
|
||||
SND_PCI_QUIRK(0x103c, 0x8174, "HP Spectre x360", CXT_FIXUP_HP_SPECTRE),
|
||||
|
|
|
@ -515,6 +515,15 @@ static void alc_auto_init_amp(struct hda_codec *codec, int type)
|
|||
}
|
||||
}
|
||||
|
||||
/* get a primary headphone pin if available */
|
||||
static hda_nid_t alc_get_hp_pin(struct alc_spec *spec)
|
||||
{
|
||||
if (spec->gen.autocfg.hp_pins[0])
|
||||
return spec->gen.autocfg.hp_pins[0];
|
||||
if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
|
||||
return spec->gen.autocfg.line_out_pins[0];
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Realtek SSID verification
|
||||
|
@ -725,9 +734,7 @@ do_sku:
|
|||
* 15 : 1 --> enable the function "Mute internal speaker
|
||||
* when the external headphone out jack is plugged"
|
||||
*/
|
||||
if (!spec->gen.autocfg.hp_pins[0] &&
|
||||
!(spec->gen.autocfg.line_out_pins[0] &&
|
||||
spec->gen.autocfg.line_out_type == AUTO_PIN_HP_OUT)) {
|
||||
if (!alc_get_hp_pin(spec)) {
|
||||
hda_nid_t nid;
|
||||
tmp = (ass >> 11) & 0x3; /* HP to chassis */
|
||||
nid = ports[tmp];
|
||||
|
@ -2959,7 +2966,7 @@ static void alc282_restore_default_value(struct hda_codec *codec)
|
|||
static void alc282_init(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
hda_nid_t hp_pin = alc_get_hp_pin(spec);
|
||||
bool hp_pin_sense;
|
||||
int coef78;
|
||||
|
||||
|
@ -2996,7 +3003,7 @@ static void alc282_init(struct hda_codec *codec)
|
|||
static void alc282_shutup(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
hda_nid_t hp_pin = alc_get_hp_pin(spec);
|
||||
bool hp_pin_sense;
|
||||
int coef78;
|
||||
|
||||
|
@ -3074,14 +3081,9 @@ static void alc283_restore_default_value(struct hda_codec *codec)
|
|||
static void alc283_init(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
hda_nid_t hp_pin = alc_get_hp_pin(spec);
|
||||
bool hp_pin_sense;
|
||||
|
||||
if (!spec->gen.autocfg.hp_outs) {
|
||||
if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
|
||||
hp_pin = spec->gen.autocfg.line_out_pins[0];
|
||||
}
|
||||
|
||||
alc283_restore_default_value(codec);
|
||||
|
||||
if (!hp_pin)
|
||||
|
@ -3115,14 +3117,9 @@ static void alc283_init(struct hda_codec *codec)
|
|||
static void alc283_shutup(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
hda_nid_t hp_pin = alc_get_hp_pin(spec);
|
||||
bool hp_pin_sense;
|
||||
|
||||
if (!spec->gen.autocfg.hp_outs) {
|
||||
if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
|
||||
hp_pin = spec->gen.autocfg.line_out_pins[0];
|
||||
}
|
||||
|
||||
if (!hp_pin) {
|
||||
alc269_shutup(codec);
|
||||
return;
|
||||
|
@ -3156,7 +3153,7 @@ static void alc283_shutup(struct hda_codec *codec)
|
|||
static void alc256_init(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
hda_nid_t hp_pin = alc_get_hp_pin(spec);
|
||||
bool hp_pin_sense;
|
||||
|
||||
if (!hp_pin)
|
||||
|
@ -3192,7 +3189,7 @@ static void alc256_init(struct hda_codec *codec)
|
|||
static void alc256_shutup(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
hda_nid_t hp_pin = alc_get_hp_pin(spec);
|
||||
bool hp_pin_sense;
|
||||
|
||||
if (!hp_pin) {
|
||||
|
@ -3228,7 +3225,7 @@ static void alc256_shutup(struct hda_codec *codec)
|
|||
static void alc225_init(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
hda_nid_t hp_pin = alc_get_hp_pin(spec);
|
||||
bool hp1_pin_sense, hp2_pin_sense;
|
||||
|
||||
if (!hp_pin)
|
||||
|
@ -3271,7 +3268,7 @@ static void alc225_init(struct hda_codec *codec)
|
|||
static void alc225_shutup(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
hda_nid_t hp_pin = alc_get_hp_pin(spec);
|
||||
bool hp1_pin_sense, hp2_pin_sense;
|
||||
|
||||
if (!hp_pin) {
|
||||
|
@ -3315,7 +3312,7 @@ static void alc225_shutup(struct hda_codec *codec)
|
|||
static void alc_default_init(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
hda_nid_t hp_pin = alc_get_hp_pin(spec);
|
||||
bool hp_pin_sense;
|
||||
|
||||
if (!hp_pin)
|
||||
|
@ -3344,7 +3341,7 @@ static void alc_default_init(struct hda_codec *codec)
|
|||
static void alc_default_shutup(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
hda_nid_t hp_pin = alc_get_hp_pin(spec);
|
||||
bool hp_pin_sense;
|
||||
|
||||
if (!hp_pin) {
|
||||
|
@ -3376,7 +3373,7 @@ static void alc_default_shutup(struct hda_codec *codec)
|
|||
static void alc294_hp_init(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
hda_nid_t hp_pin = alc_get_hp_pin(spec);
|
||||
int i, val;
|
||||
|
||||
if (!hp_pin)
|
||||
|
@ -4782,7 +4779,7 @@ static void alc_update_headset_mode(struct hda_codec *codec)
|
|||
struct alc_spec *spec = codec->spec;
|
||||
|
||||
hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]];
|
||||
hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
hda_nid_t hp_pin = alc_get_hp_pin(spec);
|
||||
|
||||
int new_headset_mode;
|
||||
|
||||
|
@ -5061,7 +5058,7 @@ static void alc_fixup_tpt470_dock(struct hda_codec *codec,
|
|||
static void alc_shutup_dell_xps13(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
int hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
int hp_pin = alc_get_hp_pin(spec);
|
||||
|
||||
/* Prevent pop noises when headphones are plugged in */
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
|
@ -5154,7 +5151,7 @@ static void alc271_hp_gate_mic_jack(struct hda_codec *codec,
|
|||
|
||||
if (action == HDA_FIXUP_ACT_PROBE) {
|
||||
int mic_pin = find_ext_mic_pin(codec);
|
||||
int hp_pin = spec->gen.autocfg.hp_pins[0];
|
||||
int hp_pin = alc_get_hp_pin(spec);
|
||||
|
||||
if (snd_BUG_ON(!mic_pin || !hp_pin))
|
||||
return;
|
||||
|
@ -5636,6 +5633,7 @@ enum {
|
|||
ALC294_FIXUP_ASUS_HEADSET_MIC,
|
||||
ALC294_FIXUP_ASUS_SPK,
|
||||
ALC225_FIXUP_HEADSET_JACK,
|
||||
ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
|
||||
};
|
||||
|
||||
static const struct hda_fixup alc269_fixups[] = {
|
||||
|
@ -6582,6 +6580,15 @@ static const struct hda_fixup alc269_fixups[] = {
|
|||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc_fixup_headset_jack,
|
||||
},
|
||||
[ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
|
||||
.type = HDA_FIXUP_PINS,
|
||||
.v.pins = (const struct hda_pintbl[]) {
|
||||
{ 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
|
||||
{ }
|
||||
},
|
||||
.chained = true,
|
||||
.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
|
@ -6760,6 +6767,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
|||
SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1558, 0x1325, "System76 Darter Pro (darp5)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
|
||||
SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
|
||||
|
|
|
@ -700,6 +700,7 @@ static int i2s_hw_params(struct snd_pcm_substream *substream,
|
|||
{
|
||||
struct i2s_dai *i2s = to_info(dai);
|
||||
u32 mod, mask = 0, val = 0;
|
||||
struct clk *rclksrc;
|
||||
unsigned long flags;
|
||||
|
||||
WARN_ON(!pm_runtime_active(dai->dev));
|
||||
|
@ -782,6 +783,10 @@ static int i2s_hw_params(struct snd_pcm_substream *substream,
|
|||
|
||||
i2s->frmclk = params_rate(params);
|
||||
|
||||
rclksrc = i2s->clk_table[CLK_I2S_RCLK_SRC];
|
||||
if (rclksrc && !IS_ERR(rclksrc))
|
||||
i2s->rclk_srcrate = clk_get_rate(rclksrc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -886,11 +891,6 @@ static int config_setup(struct i2s_dai *i2s)
|
|||
return 0;
|
||||
|
||||
if (!(i2s->quirks & QUIRK_NO_MUXPSR)) {
|
||||
struct clk *rclksrc = i2s->clk_table[CLK_I2S_RCLK_SRC];
|
||||
|
||||
if (rclksrc && !IS_ERR(rclksrc))
|
||||
i2s->rclk_srcrate = clk_get_rate(rclksrc);
|
||||
|
||||
psr = i2s->rclk_srcrate / i2s->frmclk / rfs;
|
||||
writel(((psr - 1) << 8) | PSR_PSREN, i2s->addr + I2SPSR);
|
||||
dev_dbg(&i2s->pdev->dev,
|
||||
|
|
|
@ -286,7 +286,7 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,
|
|||
if (rsnd_ssi_is_multi_slave(mod, io))
|
||||
return 0;
|
||||
|
||||
if (ssi->usrcnt > 1) {
|
||||
if (ssi->usrcnt > 0) {
|
||||
if (ssi->rate != rate) {
|
||||
dev_err(dev, "SSI parent/child should use same rate\n");
|
||||
return -EINVAL;
|
||||
|
|
|
@ -79,7 +79,7 @@ static int rsnd_ssiu_init(struct rsnd_mod *mod,
|
|||
break;
|
||||
case 9:
|
||||
for (i = 0; i < 4; i++)
|
||||
rsnd_mod_write(mod, SSI_SYS_STATUS((i * 2) + 1), 0xf << (id * 4));
|
||||
rsnd_mod_write(mod, SSI_SYS_STATUS((i * 2) + 1), 0xf << 4);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -314,6 +314,9 @@ static int search_roland_implicit_fb(struct usb_device *dev, int ifnum,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Setup an implicit feedback endpoint from a quirk. Returns 0 if no quirk
|
||||
* applies. Returns 1 if a quirk was found.
|
||||
*/
|
||||
static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs,
|
||||
struct usb_device *dev,
|
||||
struct usb_interface_descriptor *altsd,
|
||||
|
@ -384,7 +387,7 @@ add_sync_ep:
|
|||
|
||||
subs->data_endpoint->sync_master = subs->sync_endpoint;
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int set_sync_endpoint(struct snd_usb_substream *subs,
|
||||
|
@ -423,6 +426,10 @@ static int set_sync_endpoint(struct snd_usb_substream *subs,
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
/* endpoint set by quirk */
|
||||
if (err > 0)
|
||||
return 0;
|
||||
|
||||
if (altsd->bNumEndpoints < 2)
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -1553,6 +1553,7 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
|
|||
case 0x20b1: /* XMOS based devices */
|
||||
case 0x152a: /* Thesycon devices */
|
||||
case 0x25ce: /* Mytek devices */
|
||||
case 0x2ab6: /* T+A devices */
|
||||
if (fp->dsd_raw)
|
||||
return SNDRV_PCM_FMTBIT_DSD_U32_BE;
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче