Skip to content

Commit b4ecf26

Browse files
committed
Merge tag 'sound-5.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "This became a slightly big pull request, as the accumulated ASoC fixes are included here. Some highlights: - Revert of ASoC DAI startup changes that caused regression on some x86 platforms - Regression fix in HD-audio power management and driver blacklist - A collection of ASoC DAPM and topology fixes - Continued USB-audio fixes and quirks - Lots of small device-specific fixes - Rockchip S/PDIF DT stuff update for validation issues" * tag 'sound-5.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (51 commits) ALSA: hda: Always use jackpoll helper for jack update after resume ALSA: hda/realtek - Add new codec supported for ALC245 ALSA: usb-audio: Fix usb audio refcnt leak when getting spdif ALSA: usb-audio: Add connector notifier delegation ALSA: usb-audio: Apply async workaround for Scarlett 2i4 2nd gen ASoC: wm8960: Fix wrong clock after suspend & resume ALSA: usx2y: Fix potential NULL dereference ALSA: usb-audio: Add quirk for Focusrite Scarlett 2i2 ASoC: wm89xx: Add missing dependency ASoC: dapm: fixup dapm kcontrol widget ASoC: rsnd: Fix "status check failed" spam for multi-SSI ASoC: rsnd: Don't treat master SSI in multi SSI setup as parent ASoC: meson: gx-card: fix codec-to-codec link setup ASoC: meson: axg-card: fix codec-to-codec link setup ALSA: usb-audio: Add static mapping table for ALC1220-VB-based mobos ALSA: hda: Remove ASUS ROG Zenith from the blacklist ALSA: hda/realtek - Fix unexpected init_amp override ALSA: usb-audio: Filter out unsupported sample rates on Focusrite devices ASoC: SOF: Intel: add min/max channels for SSP on Baytrail/Broadwell ASoC: stm32: sai: fix sai probe ...
2 parents 88412a4 + 8d6762a commit b4ecf26

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+712
-387
lines changed

Documentation/devicetree/bindings/sound/rockchip-i2s.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ properties:
5656
- const: tx
5757
- const: rx
5858

59+
power-domains:
60+
maxItems: 1
61+
5962
rockchip,capture-channels:
6063
allOf:
6164
- $ref: /schemas/types.yaml#/definitions/uint32

Documentation/devicetree/bindings/sound/rockchip-spdif.txt

Lines changed: 0 additions & 45 deletions
This file was deleted.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/sound/rockchip-spdif.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Rockchip SPDIF transceiver
8+
9+
description:
10+
The S/PDIF audio block is a stereo transceiver that allows the
11+
processor to receive and transmit digital audio via a coaxial or
12+
fibre cable.
13+
14+
maintainers:
15+
- Heiko Stuebner <[email protected]>
16+
17+
properties:
18+
compatible:
19+
oneOf:
20+
- const: rockchip,rk3066-spdif
21+
- const: rockchip,rk3228-spdif
22+
- const: rockchip,rk3328-spdif
23+
- const: rockchip,rk3366-spdif
24+
- const: rockchip,rk3368-spdif
25+
- const: rockchip,rk3399-spdif
26+
- items:
27+
- enum:
28+
- rockchip,rk3188-spdif
29+
- rockchip,rk3288-spdif
30+
- const: rockchip,rk3066-spdif
31+
32+
reg:
33+
maxItems: 1
34+
35+
interrupts:
36+
maxItems: 1
37+
38+
clocks:
39+
items:
40+
- description: clock for SPDIF bus
41+
- description: clock for SPDIF controller
42+
43+
clock-names:
44+
items:
45+
- const: mclk
46+
- const: hclk
47+
48+
dmas:
49+
maxItems: 1
50+
51+
dma-names:
52+
const: tx
53+
54+
power-domains:
55+
maxItems: 1
56+
57+
rockchip,grf:
58+
$ref: /schemas/types.yaml#/definitions/phandle
59+
description:
60+
The phandle of the syscon node for the GRF register.
61+
Required property on RK3288.
62+
63+
"#sound-dai-cells":
64+
const: 0
65+
66+
required:
67+
- compatible
68+
- reg
69+
- interrupts
70+
- clocks
71+
- clock-names
72+
- dmas
73+
- dma-names
74+
- "#sound-dai-cells"
75+
76+
if:
77+
properties:
78+
compatible:
79+
contains:
80+
const: rockchip,rk3288-spdif
81+
82+
then:
83+
required:
84+
- rockchip,grf
85+
86+
additionalProperties: false
87+
88+
examples:
89+
- |
90+
#include <dt-bindings/clock/rk3188-cru.h>
91+
#include <dt-bindings/interrupt-controller/arm-gic.h>
92+
spdif: spdif@1011e000 {
93+
compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif";
94+
reg = <0x1011e000 0x2000>;
95+
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
96+
clocks = <&cru SCLK_SPDIF>, <&cru HCLK_SPDIF>;
97+
clock-names = "mclk", "hclk";
98+
dmas = <&dmac1_s 8>;
99+
dma-names = "tx";
100+
#sound-dai-cells = <0>;
101+
};

include/sound/soc-dai.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ struct snd_soc_dai {
351351

352352
/* bit field */
353353
unsigned int probed:1;
354-
unsigned int started[SNDRV_PCM_STREAM_LAST + 1];
355354
};
356355

357356
static inline struct snd_soc_pcm_stream *

include/sound/soc.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,9 @@ struct snd_soc_dai_link {
790790
const struct snd_soc_pcm_stream *params;
791791
unsigned int num_params;
792792

793+
struct snd_soc_dapm_widget *playback_widget;
794+
struct snd_soc_dapm_widget *capture_widget;
795+
793796
unsigned int dai_fmt; /* format to set on init */
794797

795798
enum snd_soc_dpcm_trigger trigger[2]; /* trigger type for DPCM */

sound/pci/hda/hda_codec.c

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -641,8 +641,18 @@ static void hda_jackpoll_work(struct work_struct *work)
641641
struct hda_codec *codec =
642642
container_of(work, struct hda_codec, jackpoll_work.work);
643643

644-
snd_hda_jack_set_dirty_all(codec);
645-
snd_hda_jack_poll_all(codec);
644+
/* for non-polling trigger: we need nothing if already powered on */
645+
if (!codec->jackpoll_interval && snd_hdac_is_power_on(&codec->core))
646+
return;
647+
648+
/* the power-up/down sequence triggers the runtime resume */
649+
snd_hda_power_up_pm(codec);
650+
/* update jacks manually if polling is required, too */
651+
if (codec->jackpoll_interval) {
652+
snd_hda_jack_set_dirty_all(codec);
653+
snd_hda_jack_poll_all(codec);
654+
}
655+
snd_hda_power_down_pm(codec);
646656

647657
if (!codec->jackpoll_interval)
648658
return;
@@ -2951,18 +2961,14 @@ static int hda_codec_runtime_resume(struct device *dev)
29512961
static int hda_codec_force_resume(struct device *dev)
29522962
{
29532963
struct hda_codec *codec = dev_to_hda_codec(dev);
2954-
bool forced_resume = hda_codec_need_resume(codec);
29552964
int ret;
29562965

2957-
/* The get/put pair below enforces the runtime resume even if the
2958-
* device hasn't been used at suspend time. This trick is needed to
2959-
* update the jack state change during the sleep.
2960-
*/
2961-
if (forced_resume)
2962-
pm_runtime_get_noresume(dev);
29632966
ret = pm_runtime_force_resume(dev);
2964-
if (forced_resume)
2965-
pm_runtime_put(dev);
2967+
/* schedule jackpoll work for jack detection update */
2968+
if (codec->jackpoll_interval ||
2969+
(pm_runtime_suspended(dev) && hda_codec_need_resume(codec)))
2970+
schedule_delayed_work(&codec->jackpoll_work,
2971+
codec->jackpoll_interval);
29662972
return ret;
29672973
}
29682974

sound/pci/hda/hda_intel.c

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,8 @@ static void __azx_runtime_resume(struct azx *chip, bool from_rt)
10041004

10051005
if (status && from_rt) {
10061006
list_for_each_codec(codec, &chip->bus)
1007-
if (status & (1 << codec->addr))
1007+
if (!codec->relaxed_resume &&
1008+
(status & (1 << codec->addr)))
10081009
schedule_delayed_work(&codec->jackpoll_work,
10091010
codec->jackpoll_interval);
10101011
}
@@ -1044,9 +1045,7 @@ static int azx_suspend(struct device *dev)
10441045
static int azx_resume(struct device *dev)
10451046
{
10461047
struct snd_card *card = dev_get_drvdata(dev);
1047-
struct hda_codec *codec;
10481048
struct azx *chip;
1049-
bool forced_resume = false;
10501049

10511050
if (!azx_is_pm_ready(card))
10521051
return 0;
@@ -1058,19 +1057,7 @@ static int azx_resume(struct device *dev)
10581057
if (azx_acquire_irq(chip, 1) < 0)
10591058
return -EIO;
10601059

1061-
/* check for the forced resume */
1062-
list_for_each_codec(codec, &chip->bus) {
1063-
if (hda_codec_need_resume(codec)) {
1064-
forced_resume = true;
1065-
break;
1066-
}
1067-
}
1068-
1069-
if (forced_resume)
1070-
pm_runtime_get_noresume(dev);
10711060
pm_runtime_force_resume(dev);
1072-
if (forced_resume)
1073-
pm_runtime_put(dev);
10741061
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
10751062

10761063
trace_azx_resume(chip);
@@ -2092,7 +2079,6 @@ static void pcm_mmap_prepare(struct snd_pcm_substream *substream,
20922079
* should be ignored from the beginning.
20932080
*/
20942081
static const struct snd_pci_quirk driver_blacklist[] = {
2095-
SND_PCI_QUIRK(0x1043, 0x874f, "ASUS ROG Zenith II / Strix", 0),
20962082
SND_PCI_QUIRK(0x1462, 0xcb59, "MSI TRX40 Creator", 0),
20972083
SND_PCI_QUIRK(0x1462, 0xcb60, "MSI TRX40", 0),
20982084
{}

sound/pci/hda/patch_hdmi.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ static bool static_hdmi_pcm;
3838
module_param(static_hdmi_pcm, bool, 0644);
3939
MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
4040

41+
static bool enable_acomp = true;
42+
module_param(enable_acomp, bool, 0444);
43+
MODULE_PARM_DESC(enable_acomp, "Enable audio component binding (default=yes)");
44+
4145
struct hdmi_spec_per_cvt {
4246
hda_nid_t cvt_nid;
4347
int assigned;
@@ -2505,6 +2509,11 @@ static void generic_acomp_init(struct hda_codec *codec,
25052509
{
25062510
struct hdmi_spec *spec = codec->spec;
25072511

2512+
if (!enable_acomp) {
2513+
codec_info(codec, "audio component disabled by module option\n");
2514+
return;
2515+
}
2516+
25082517
spec->port2pin = port2pin;
25092518
setup_drm_audio_ops(codec, ops);
25102519
if (!snd_hdac_acomp_init(&codec->bus->core, &spec->drm_audio_ops,

sound/pci/hda/patch_realtek.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
377377
case 0x10ec0233:
378378
case 0x10ec0235:
379379
case 0x10ec0236:
380+
case 0x10ec0245:
380381
case 0x10ec0255:
381382
case 0x10ec0256:
382383
case 0x10ec0257:
@@ -797,9 +798,11 @@ static void alc_ssid_check(struct hda_codec *codec, const hda_nid_t *ports)
797798
{
798799
if (!alc_subsystem_id(codec, ports)) {
799800
struct alc_spec *spec = codec->spec;
800-
codec_dbg(codec,
801-
"realtek: Enable default setup for auto mode as fallback\n");
802-
spec->init_amp = ALC_INIT_DEFAULT;
801+
if (spec->init_amp == ALC_INIT_UNDEFINED) {
802+
codec_dbg(codec,
803+
"realtek: Enable default setup for auto mode as fallback\n");
804+
spec->init_amp = ALC_INIT_DEFAULT;
805+
}
803806
}
804807
}
805808

@@ -8196,6 +8199,7 @@ static int patch_alc269(struct hda_codec *codec)
81968199
spec->gen.mixer_nid = 0;
81978200
break;
81988201
case 0x10ec0215:
8202+
case 0x10ec0245:
81998203
case 0x10ec0285:
82008204
case 0x10ec0289:
82018205
spec->codec_variant = ALC269_TYPE_ALC215;
@@ -9457,6 +9461,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
94579461
HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269),
94589462
HDA_CODEC_ENTRY(0x10ec0235, "ALC233", patch_alc269),
94599463
HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
9464+
HDA_CODEC_ENTRY(0x10ec0245, "ALC245", patch_alc269),
94609465
HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
94619466
HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
94629467
HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269),

sound/soc/amd/acp3x-rt5682-max9836.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ static int acp3x_5682_init(struct snd_soc_pcm_runtime *rtd)
8989
}
9090

9191
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
92-
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
93-
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
94-
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
92+
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
93+
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
94+
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
9595

9696
ret = snd_soc_component_set_jack(component, &pco_jack, NULL);
9797
if (ret) {

0 commit comments

Comments
 (0)