Skip to content

Commit c09e28c

Browse files
committed
Merge branch 'for-linus' into for-next
Back-merge of 5.11 devel branch for more works on USB-audio. Signed-off-by: Takashi Iwai <[email protected]>
2 parents 915183b + 532a208 commit c09e28c

File tree

20 files changed

+327
-157
lines changed

20 files changed

+327
-157
lines changed

Documentation/sound/alsa-configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,7 @@ Module for Digigram miXart8 sound cards.
15011501

15021502
This module supports multiple cards.
15031503
Note: One miXart8 board will be represented as 4 alsa cards.
1504-
See MIXART.txt for details.
1504+
See Documentation/sound/cards/mixart.rst for details.
15051505

15061506
When the driver is compiled as a module and the hotplug firmware
15071507
is supported, the firmware data is loaded via hotplug automatically.

drivers/clk/tegra/clk-tegra30.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,6 +1256,8 @@ static struct tegra_clk_init_table init_table[] __initdata = {
12561256
{ TEGRA30_CLK_I2S3_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 },
12571257
{ TEGRA30_CLK_I2S4_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 },
12581258
{ TEGRA30_CLK_VIMCLK_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 },
1259+
{ TEGRA30_CLK_HDA, TEGRA30_CLK_PLL_P, 102000000, 0 },
1260+
{ TEGRA30_CLK_HDA2CODEC_2X, TEGRA30_CLK_PLL_P, 48000000, 0 },
12591261
/* must be the last entry */
12601262
{ TEGRA30_CLK_CLK_MAX, TEGRA30_CLK_CLK_MAX, 0, 0 },
12611263
};

sound/core/seq/oss/seq_oss_synth.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,8 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in
611611

612612
if (info->is_midi) {
613613
struct midi_info minf;
614-
snd_seq_oss_midi_make_info(dp, info->midi_mapped, &minf);
614+
if (snd_seq_oss_midi_make_info(dp, info->midi_mapped, &minf))
615+
return -ENXIO;
615616
inf->synth_type = SYNTH_TYPE_MIDI;
616617
inf->synth_subtype = 0;
617618
inf->nr_voices = 16;

sound/firewire/fireface/ff-transaction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static void transmit_midi_msg(struct snd_ff *ff, unsigned int port)
8888

8989
/* Set interval to next transaction. */
9090
ff->next_ktime[port] = ktime_add_ns(ktime_get(),
91-
ff->rx_bytes[port] * 8 * NSEC_PER_SEC / 31250);
91+
ff->rx_bytes[port] * 8 * (NSEC_PER_SEC / 31250));
9292

9393
if (quad_count == 1)
9494
tcode = TCODE_WRITE_QUADLET_REQUEST;

sound/firewire/tascam/tascam-transaction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static void midi_port_work(struct work_struct *work)
209209

210210
/* Set interval to next transaction. */
211211
port->next_ktime = ktime_add_ns(ktime_get(),
212-
port->consume_bytes * 8 * NSEC_PER_SEC / 31250);
212+
port->consume_bytes * 8 * (NSEC_PER_SEC / 31250));
213213

214214
/* Start this transaction. */
215215
port->idling = false;

sound/pci/hda/hda_intel.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2480,6 +2480,9 @@ static const struct pci_device_id azx_ids[] = {
24802480
/* CometLake-S */
24812481
{ PCI_DEVICE(0x8086, 0xa3f0),
24822482
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
2483+
/* CometLake-R */
2484+
{ PCI_DEVICE(0x8086, 0xf0c8),
2485+
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
24832486
/* Icelake */
24842487
{ PCI_DEVICE(0x8086, 0x34c8),
24852488
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
@@ -2503,6 +2506,9 @@ static const struct pci_device_id azx_ids[] = {
25032506
/* Alderlake-S */
25042507
{ PCI_DEVICE(0x8086, 0x7ad0),
25052508
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
2509+
/* Alderlake-P */
2510+
{ PCI_DEVICE(0x8086, 0x51c8),
2511+
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
25062512
/* Elkhart Lake */
25072513
{ PCI_DEVICE(0x8086, 0x4b55),
25082514
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
@@ -2594,7 +2600,8 @@ static const struct pci_device_id azx_ids[] = {
25942600
.driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_AMD_SB },
25952601
/* ATI HDMI */
25962602
{ PCI_DEVICE(0x1002, 0x0002),
2597-
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
2603+
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS |
2604+
AZX_DCAPS_PM_RUNTIME },
25982605
{ PCI_DEVICE(0x1002, 0x1308),
25992606
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
26002607
{ PCI_DEVICE(0x1002, 0x157a),
@@ -2656,9 +2663,11 @@ static const struct pci_device_id azx_ids[] = {
26562663
{ PCI_DEVICE(0x1002, 0xaab0),
26572664
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
26582665
{ PCI_DEVICE(0x1002, 0xaac0),
2659-
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
2666+
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS |
2667+
AZX_DCAPS_PM_RUNTIME },
26602668
{ PCI_DEVICE(0x1002, 0xaac8),
2661-
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
2669+
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS |
2670+
AZX_DCAPS_PM_RUNTIME },
26622671
{ PCI_DEVICE(0x1002, 0xaad8),
26632672
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS |
26642673
AZX_DCAPS_PM_RUNTIME },

sound/pci/hda/hda_tegra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ static int hda_tegra_first_init(struct azx *chip, struct platform_device *pdev)
388388
* in powers of 2, next available ratio is 16 which can be
389389
* used as a limiting factor here.
390390
*/
391-
if (of_device_is_compatible(np, "nvidia,tegra194-hda"))
391+
if (of_device_is_compatible(np, "nvidia,tegra30-hda"))
392392
chip->bus.core.sdo_limit = 16;
393393

394394
/* codec detection */

sound/pci/hda/patch_hdmi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4346,6 +4346,7 @@ HDA_CODEC_ENTRY(0x8086280f, "Icelake HDMI", patch_i915_icl_hdmi),
43464346
HDA_CODEC_ENTRY(0x80862812, "Tigerlake HDMI", patch_i915_tgl_hdmi),
43474347
HDA_CODEC_ENTRY(0x80862814, "DG1 HDMI", patch_i915_tgl_hdmi),
43484348
HDA_CODEC_ENTRY(0x80862815, "Alderlake HDMI", patch_i915_tgl_hdmi),
4349+
HDA_CODEC_ENTRY(0x8086281c, "Alderlake-P HDMI", patch_i915_tgl_hdmi),
43494350
HDA_CODEC_ENTRY(0x80862816, "Rocketlake HDMI", patch_i915_tgl_hdmi),
43504351
HDA_CODEC_ENTRY(0x8086281a, "Jasperlake HDMI", patch_i915_icl_hdmi),
43514352
HDA_CODEC_ENTRY(0x8086281b, "Elkhartlake HDMI", patch_i915_icl_hdmi),

sound/pci/hda/patch_realtek.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6371,6 +6371,7 @@ enum {
63716371
ALC256_FIXUP_HP_HEADSET_MIC,
63726372
ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
63736373
ALC282_FIXUP_ACER_DISABLE_LINEOUT,
6374+
ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
63746375
};
63756376

63766377
static const struct hda_fixup alc269_fixups[] = {
@@ -7808,6 +7809,12 @@ static const struct hda_fixup alc269_fixups[] = {
78087809
.chained = true,
78097810
.chain_id = ALC269_FIXUP_HEADSET_MODE
78107811
},
7812+
[ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST] = {
7813+
.type = HDA_FIXUP_FUNC,
7814+
.v.func = alc269_fixup_limit_int_mic_boost,
7815+
.chained = true,
7816+
.chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
7817+
},
78117818
};
78127819

78137820
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -7826,6 +7833,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
78267833
SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
78277834
SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC),
78287835
SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK),
7836+
SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST),
78297837
SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
78307838
SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
78317839
SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK),

sound/pci/hda/patch_via.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec)
113113
spec->codec_type = VT1708S;
114114
spec->gen.indep_hp = 1;
115115
spec->gen.keep_eapd_on = 1;
116+
spec->gen.dac_min_mute = 1;
116117
spec->gen.pcm_playback_hook = via_playback_pcm_hook;
117118
spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO;
118119
codec->power_save_node = 1;

sound/usb/card.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,8 @@ lookup_device_name(u32 id)
450450
static void snd_usb_audio_free(struct snd_card *card)
451451
{
452452
struct snd_usb_audio *chip = card->private_data;
453-
struct snd_usb_endpoint *ep, *n;
454453

455-
list_for_each_entry_safe(ep, n, &chip->ep_list, list)
456-
snd_usb_endpoint_free(ep);
454+
snd_usb_endpoint_free_all(chip);
457455

458456
mutex_destroy(&chip->mutex);
459457
if (!atomic_read(&chip->shutdown))
@@ -610,6 +608,7 @@ static int snd_usb_audio_create(struct usb_interface *intf,
610608
chip->usb_id = usb_id;
611609
INIT_LIST_HEAD(&chip->pcm_list);
612610
INIT_LIST_HEAD(&chip->ep_list);
611+
INIT_LIST_HEAD(&chip->iface_ref_list);
613612
INIT_LIST_HEAD(&chip->midi_list);
614613
INIT_LIST_HEAD(&chip->mixer_list);
615614

sound/usb/card.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ struct audioformat {
1818
unsigned int frame_size; /* samples per frame for non-audio */
1919
unsigned char iface; /* interface number */
2020
unsigned char altsetting; /* corresponding alternate setting */
21+
unsigned char ep_idx; /* endpoint array index */
2122
unsigned char altset_idx; /* array index of altenate setting */
2223
unsigned char attributes; /* corresponding attributes of cs endpoint */
2324
unsigned char endpoint; /* endpoint */
@@ -42,6 +43,7 @@ struct audioformat {
4243
};
4344

4445
struct snd_usb_substream;
46+
struct snd_usb_iface_ref;
4547
struct snd_usb_endpoint;
4648
struct snd_usb_power_domain;
4749

@@ -58,6 +60,7 @@ struct snd_urb_ctx {
5860

5961
struct snd_usb_endpoint {
6062
struct snd_usb_audio *chip;
63+
struct snd_usb_iface_ref *iface_ref;
6164

6265
int opened; /* open refcount; protect with chip->mutex */
6366
atomic_t running; /* running status */

sound/usb/clock.c

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -485,18 +485,9 @@ static int set_sample_rate_v1(struct snd_usb_audio *chip,
485485
const struct audioformat *fmt, int rate)
486486
{
487487
struct usb_device *dev = chip->dev;
488-
struct usb_host_interface *alts;
489-
unsigned int ep;
490488
unsigned char data[3];
491489
int err, crate;
492490

493-
alts = snd_usb_get_host_interface(chip, fmt->iface, fmt->altsetting);
494-
if (!alts)
495-
return -EINVAL;
496-
if (get_iface_desc(alts)->bNumEndpoints < 1)
497-
return -EINVAL;
498-
ep = get_endpoint(alts, 0)->bEndpointAddress;
499-
500491
/* if endpoint doesn't have sampling rate control, bail out */
501492
if (!(fmt->attributes & UAC_EP_CS_ATTR_SAMPLE_RATE))
502493
return 0;
@@ -506,11 +497,11 @@ static int set_sample_rate_v1(struct snd_usb_audio *chip,
506497
data[2] = rate >> 16;
507498
err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC_SET_CUR,
508499
USB_TYPE_CLASS | USB_RECIP_ENDPOINT | USB_DIR_OUT,
509-
UAC_EP_CS_ATTR_SAMPLE_RATE << 8, ep,
510-
data, sizeof(data));
500+
UAC_EP_CS_ATTR_SAMPLE_RATE << 8,
501+
fmt->endpoint, data, sizeof(data));
511502
if (err < 0) {
512503
dev_err(&dev->dev, "%d:%d: cannot set freq %d to ep %#x\n",
513-
fmt->iface, fmt->altsetting, rate, ep);
504+
fmt->iface, fmt->altsetting, rate, fmt->endpoint);
514505
return err;
515506
}
516507

@@ -524,11 +515,11 @@ static int set_sample_rate_v1(struct snd_usb_audio *chip,
524515

525516
err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC_GET_CUR,
526517
USB_TYPE_CLASS | USB_RECIP_ENDPOINT | USB_DIR_IN,
527-
UAC_EP_CS_ATTR_SAMPLE_RATE << 8, ep,
528-
data, sizeof(data));
518+
UAC_EP_CS_ATTR_SAMPLE_RATE << 8,
519+
fmt->endpoint, data, sizeof(data));
529520
if (err < 0) {
530521
dev_err(&dev->dev, "%d:%d: cannot get freq at ep %#x\n",
531-
fmt->iface, fmt->altsetting, ep);
522+
fmt->iface, fmt->altsetting, fmt->endpoint);
532523
chip->sample_rate_read_error++;
533524
return 0; /* some devices don't support reading */
534525
}

0 commit comments

Comments
 (0)