mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 04:04:26 +08:00
sound updates for 6.13-rc1
This is a relatively calm cycle, and majority of changes are about ASoC. There are little changes in the core side but we received lots of new drivers for new vendors. * ALSA Core: - The new accel operation mode for compress-offload API; only the core part, and the actual user will follow at next * ASoC: - Continued API simplification works - Renaming of the sh directory to Renesas - Factoring out of some of the common code for Realtek devices - Ussal ASoC Intel SOF, AMD and SoundWire updates - Support for Allwinner H616, AMD ACP 6.3 systems, AWInic AW88081, Cirrus Logic CS32L84, Everest ES8328, Iron Devices SMA1307, Longsoon I2S, NeoFidelity NTP8918 and NTP8835, Philips UDA1342, Qualcomm SM8750, RealTek RT721, and ST Microelectronics STM32MP25 * HD- and USB-audio: - Clean up of IRQ handling in legacy HD-audio driver - Fix soft lockup at disconnection of non-standard USB drivers - Scarlett2 mixer improvements - New quirks and cleanups in HD- and USB-audio -----BEGIN PGP SIGNATURE----- iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmc9yFUOHHRpd2FpQHN1 c2UuZGUACgkQLtJE4w1nLE8IMxAAoagGD3lQXQl6c7yoe0BATApiW71itLHP05SA KzVCeWtMMeROov9cWgzIJMqbj4d6fs/zxomYjYHzb+3IlTtMVkV+PWEIgtr0xck4 WRPj9V3vb68+S6tFlVrmsv4LwdWfwPwUgLJpvXZM/aFUxa+8i0lb2/g8yKPYvser dfqU1Uwi7fn3txTQiFiI61Hx7Nn3ISUhVpY3DwZTHYuLaRNfJOR0HdJTrlehnYZG KmvTg2WnYud687yEMC5AV1WTItoUUhMkuPGbpxWxGwk8bOfkbxKNh/EgNOO2Hubz E8RgYtCaq2TA0OS5YdY6Mk9blG7snOZW3pMULm1kFuLr1BD7JGz2Q5duoX6NyrrS gqzXPxPYCCCkLLkS672HMy9UzhM3j03LrgT1JxV3wbUMZoJWjD0zn1Tfv6WJ1M7g CZsjaZrqATK8bexM8QrdKSZcZOB7B3ZX0hNyx/SKXycuvg8jC8evm/qfAPKvU79O B3vivSs/YgquR62R8dp6OJQ75C3IVLv9PrLbS/RXrOgzx2hRZFG5/PWKr+pC5zIp T8qdBPuQ/f/gzbIgGkL2sRYYWGL+tg+hlD2CA5jP47DoUwcdxm15AK4Gv1qqJgFr QCmg3WuipUumJqyMcSKdyVqUytIeCBFTZqM1PUsehfdueeRkp0ZgV6hDDc+jSjWm fjycRuw= =gOHc -----END PGP SIGNATURE----- Merge tag 'sound-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "This is a relatively calm cycle, and majority of changes are about ASoC. There are little changes in the core side but we received lots of new drivers for new vendors. ALSA Core: - The new accel operation mode for compress-offload API; only the core part, the actual user will follow later ASoC: - Continued API simplification works - Renaming of the sh directory to Renesas - Factoring out of some of the common code for Realtek devices - Ussal ASoC Intel SOF, AMD and SoundWire updates - Support for Allwinner H616, AMD ACP 6.3 systems, AWInic AW88081, Cirrus Logic CS32L84, Everest ES8328, Iron Devices SMA1307, Longsoon I2S, NeoFidelity NTP8918 and NTP8835, Philips UDA1342, Qualcomm SM8750, RealTek RT721, and ST Microelectronics STM32MP25 HD- and USB-audio: - Clean up of IRQ handling in legacy HD-audio driver - Fix soft lockup at disconnection of non-standard USB drivers - Scarlett2 mixer improvements - New quirks and cleanups in HD- and USB-audio" * tag 'sound-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (278 commits) ALSA: hda: Poll jack events for LS7A HD-Audio ASoC: hdmi-codec: reorder channel allocation list ALSA: ump: Fix the wrong format specifier ASoC: Intel: soc-acpi-intel-lnl-match: add rt712_vb + rt1320 support ASoC: stm32: dfsdm: change rate upper limits ASoC: sma1307: fix uninitialized variable refence ASoC: dt-bindings: simple-mux: add idle-state property ASoc: simple-mux: add idle-state support ASoC: sdca: test adev before calling acpi_dev_for_each_child ASoC: SOF: ipc4-topology: remove redundant assignment to variable ret ASoC: amd: ps: fix the pcm device numbering for acp 6.3 platform ASoC: amd: acp: add soundwire machine driver for legacy stack ASoC: amd: acp: move get_acp63_cpu_pin_id() to common file ASoC: amd: ps: add soundwire machines for acp6.3 platform ASoC: amd: acp: add RT711, RT714 & RT1316 support for acp 6.3 platform ASoC: amd: acp: add rt722 based soundwire machines ALSA: compress_offload: Add missing descriptions in structs ALSA: 6fire: Release resources at card release ALSA: caiaq: Use snd_card_free_when_closed() at disconnection ALSA: us122l: Drop mmap_count field ...
This commit is contained in:
commit
071b34dcf7
111
Documentation/devicetree/bindings/sound/adi,adau1373.yaml
Normal file
111
Documentation/devicetree/bindings/sound/adi,adau1373.yaml
Normal file
@ -0,0 +1,111 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sound/adi,adau1373.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Analog Devices ADAU1373 CODEC
|
||||
|
||||
maintainers:
|
||||
- Nuno Sá <nuno.sa@analog.com>
|
||||
|
||||
description: |
|
||||
Analog Devices ADAU1373 Low power codec with speaker and headphone amplifiers.
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1373.pdf
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,adau1373
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
"#sound-dai-cells":
|
||||
const: 0
|
||||
|
||||
powerdown-gpios:
|
||||
description: GPIO used for hardware power-down.
|
||||
maxItems: 1
|
||||
|
||||
adi,micbias1-microvolt:
|
||||
description:
|
||||
This property sets the microphone bias voltage for the first microphone.
|
||||
enum: [1800000, 2200000, 2600000, 2900000]
|
||||
default: 2900000
|
||||
|
||||
adi,micbias2-microvolt:
|
||||
description:
|
||||
This property sets the microphone bias voltage for the second microphone.
|
||||
enum: [1800000, 2200000, 2600000, 2900000]
|
||||
default: 2900000
|
||||
|
||||
adi,input1-differential:
|
||||
description: This property sets the first analog input as differential.
|
||||
type: boolean
|
||||
|
||||
adi,input2-differential:
|
||||
description: This property sets the second analog input as differential.
|
||||
type: boolean
|
||||
|
||||
adi,input3-differential:
|
||||
description: This property sets the third analog input as differential.
|
||||
type: boolean
|
||||
|
||||
adi,input4-differential:
|
||||
description: This property sets the fourth analog input as differential.
|
||||
type: boolean
|
||||
|
||||
adi,lineout-differential:
|
||||
description: This property sets the line output as differential.
|
||||
type: boolean
|
||||
|
||||
adi,lineout-gnd-sense:
|
||||
description: This property enables the line output ground sense control.
|
||||
type: boolean
|
||||
|
||||
adi,drc-settings:
|
||||
description:
|
||||
This setting is used to control the dynamic range of the signal. The
|
||||
device provides a maximum of three full band DRCs with 13 entries each.
|
||||
$ref: /schemas/types.yaml#/definitions/uint8-array
|
||||
oneOf:
|
||||
- minItems: 13
|
||||
maxItems: 13
|
||||
- minItems: 26
|
||||
maxItems: 26
|
||||
- minItems: 39
|
||||
maxItems: 39
|
||||
|
||||
required:
|
||||
- "#sound-dai-cells"
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
audio-codec@1a {
|
||||
compatible = "adi,adau1373";
|
||||
reg = <0x1a>;
|
||||
#sound-dai-cells = <0>;
|
||||
powerdown-gpios = <&gpio 100 GPIO_ACTIVE_LOW>;
|
||||
adi,input2-differential;
|
||||
adi,input1-differential;
|
||||
adi,lineout-differential;
|
||||
adi,micbias2-microvolt = <1800000>;
|
||||
adi,drc-settings = /bits/ 8 <
|
||||
0xff 0xff 0x1 0x2 0xa 0xa 0xd 0x1 0xff 0xff 0x5 0xd 0xff
|
||||
>;
|
||||
};
|
||||
};
|
||||
...
|
@ -22,6 +22,7 @@ properties:
|
||||
- allwinner,sun8i-a23-codec
|
||||
- allwinner,sun8i-h3-codec
|
||||
- allwinner,sun8i-v3s-codec
|
||||
- allwinner,sun50i-h616-codec
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
@ -40,14 +41,20 @@ properties:
|
||||
- const: codec
|
||||
|
||||
dmas:
|
||||
items:
|
||||
- description: RX DMA Channel
|
||||
- description: TX DMA Channel
|
||||
oneOf:
|
||||
- items:
|
||||
- description: RX DMA Channel
|
||||
- description: TX DMA Channel
|
||||
- items:
|
||||
- description: TX DMA Channel
|
||||
|
||||
dma-names:
|
||||
items:
|
||||
- const: rx
|
||||
- const: tx
|
||||
oneOf:
|
||||
- items:
|
||||
- const: rx
|
||||
- const: tx
|
||||
- items:
|
||||
- const: tx
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
@ -229,6 +236,40 @@ allOf:
|
||||
- Mic
|
||||
- Speaker
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- allwinner,sun50i-h616-codec
|
||||
|
||||
then:
|
||||
properties:
|
||||
allwinner,audio-routing:
|
||||
items:
|
||||
enum:
|
||||
- LINEOUT
|
||||
- Line Out
|
||||
|
||||
dmas:
|
||||
items:
|
||||
- description: TX DMA Channel
|
||||
|
||||
dma-names:
|
||||
items:
|
||||
- const: tx
|
||||
|
||||
else:
|
||||
properties:
|
||||
dmas:
|
||||
items:
|
||||
- description: RX DMA Channel
|
||||
- description: TX DMA Channel
|
||||
|
||||
dma-names:
|
||||
items:
|
||||
- const: rx
|
||||
- const: tx
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
|
@ -37,8 +37,14 @@ properties:
|
||||
pa-gpios:
|
||||
maxItems: 1
|
||||
hp-det-gpio:
|
||||
deprecated: true
|
||||
maxItems: 1
|
||||
hp-det-gpios:
|
||||
maxItems: 1
|
||||
mic-det-gpio:
|
||||
deprecated: true
|
||||
maxItems: 1
|
||||
mic-det-gpios:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
|
@ -17,8 +17,9 @@ description:
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- awinic,aw88395
|
||||
- awinic,aw88081
|
||||
- awinic,aw88261
|
||||
- awinic,aw88395
|
||||
- awinic,aw88399
|
||||
|
||||
reg:
|
||||
@ -56,6 +57,7 @@ allOf:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- awinic,aw88081
|
||||
- awinic,aw88261
|
||||
then:
|
||||
properties:
|
||||
|
56
Documentation/devicetree/bindings/sound/cirrus,cs42l84.yaml
Normal file
56
Documentation/devicetree/bindings/sound/cirrus,cs42l84.yaml
Normal file
@ -0,0 +1,56 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sound/cirrus,cs42l84.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Cirrus Logic CS42L84 audio CODEC
|
||||
|
||||
maintainers:
|
||||
- Martin Povišer <povik+lin@cutebit.org>
|
||||
|
||||
description: |
|
||||
The CS42L84 is a headphone jack codec made by Cirrus Logic and embedded
|
||||
in personal computers sold by Apple. It was first seen in 2021 Macbook
|
||||
Pro models. It has stereo DAC for playback, mono ADC for capture, and
|
||||
is somewhat similar to CS42L42 but with a different regmap.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- cirrus,cs42l84
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
reset-gpios:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
'#sound-dai-cells':
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
jack_codec: codec@4b {
|
||||
compatible = "cirrus,cs42l84";
|
||||
reg = <0x4b>;
|
||||
reset-gpios = <&pinctrl_nub 4 GPIO_ACTIVE_LOW>;
|
||||
interrupts-extended = <&pinctrl_ap 180 IRQ_TYPE_LEVEL_LOW>;
|
||||
#sound-dai-cells = <0>;
|
||||
};
|
||||
};
|
@ -4,12 +4,13 @@
|
||||
$id: http://devicetree.org/schemas/sound/everest,es8316.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Everest ES8311 and ES8316 audio CODECs
|
||||
title: Everest ES8311, ES8316 and ES8323 audio CODECs
|
||||
|
||||
maintainers:
|
||||
- Daniel Drake <drake@endlessm.com>
|
||||
- Katsuhiro Suzuki <katsuhiro@katsuster.net>
|
||||
- Matteo Martelli <matteomartelli3@gmail.com>
|
||||
- Binbin Zhou <zhoubinbin@loongson.cn>
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
@ -19,6 +20,7 @@ properties:
|
||||
enum:
|
||||
- everest,es8311
|
||||
- everest,es8316
|
||||
- everest,es8323
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
@ -24,6 +24,10 @@ properties:
|
||||
items:
|
||||
- const: mclk
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
description: interrupt output for headset detection
|
||||
|
||||
"#sound-dai-cells":
|
||||
const: 0
|
||||
|
||||
|
@ -50,6 +50,10 @@ properties:
|
||||
HPVDD-supply:
|
||||
description: Regulator providing analog output voltage 3.3V
|
||||
|
||||
port:
|
||||
$ref: audio-graph-port.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
|
@ -18,11 +18,15 @@ description:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- fsl,imx35-esai
|
||||
- fsl,imx6ull-esai
|
||||
- fsl,imx8qm-esai
|
||||
- fsl,vf610-esai
|
||||
oneOf:
|
||||
- enum:
|
||||
- fsl,imx35-esai
|
||||
- fsl,imx6ull-esai
|
||||
- fsl,vf610-esai
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx8qm-esai
|
||||
- const: fsl,imx6ull-esai
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
@ -65,6 +69,9 @@ properties:
|
||||
- const: rx
|
||||
- const: tx
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
fsl,fifo-depth:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
default: 64
|
||||
@ -101,6 +108,17 @@ unevaluatedProperties: false
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: fsl,imx8qm-esai
|
||||
then:
|
||||
required:
|
||||
- power-domains
|
||||
else:
|
||||
properties:
|
||||
power-domains: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -16,16 +16,23 @@ description: |
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- fsl,imx35-spdif
|
||||
- fsl,vf610-spdif
|
||||
- fsl,imx6sx-spdif
|
||||
- fsl,imx8qm-spdif
|
||||
- fsl,imx8qxp-spdif
|
||||
- fsl,imx8mq-spdif
|
||||
- fsl,imx8mm-spdif
|
||||
- fsl,imx8mn-spdif
|
||||
- fsl,imx8ulp-spdif
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx35-spdif
|
||||
- fsl,imx6sx-spdif
|
||||
- fsl,imx8mm-spdif
|
||||
- fsl,imx8mn-spdif
|
||||
- fsl,imx8mq-spdif
|
||||
- fsl,imx8qm-spdif
|
||||
- fsl,imx8qxp-spdif
|
||||
- fsl,imx8ulp-spdif
|
||||
- fsl,vf610-spdif
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx6sl-spdif
|
||||
- fsl,imx6sx-spdif
|
||||
- const: fsl,imx35-spdif
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
@ -1,20 +0,0 @@
|
||||
Inno audio codec for RK3036
|
||||
|
||||
Inno audio codec is integrated inside RK3036 SoC.
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "rockchip,rk3036-codec".
|
||||
- reg : The registers of codec.
|
||||
- clock-names : Should be "acodec_pclk".
|
||||
- clocks : The clock of codec.
|
||||
- rockchip,grf : The phandle of grf device node.
|
||||
|
||||
Example:
|
||||
|
||||
acodec: acodec-ana@20030000 {
|
||||
compatible = "rk3036-codec";
|
||||
reg = <0x20030000 0x4000>;
|
||||
rockchip,grf = <&grf>;
|
||||
clock-names = "acodec_pclk";
|
||||
clocks = <&cru ACLK_VCODEC>;
|
||||
};
|
@ -0,0 +1,53 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sound/irondevice,sma1307.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Iron Device SMA1307 Audio Amplifier
|
||||
|
||||
maintainers:
|
||||
- Kiseok Jo <kiseok.jo@irondevice.com>
|
||||
|
||||
description:
|
||||
SMA1307 boosted digital speaker amplifier with feedback-loop.
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- irondevice,sma1307a
|
||||
- irondevice,sma1307aq
|
||||
description:
|
||||
If a 'q' is added, it indicated the product is AEC-Q100
|
||||
qualified for automotive applications. SMA1307A supports
|
||||
both WLCSP and QFN packages. However, SMA1307AQ only
|
||||
supports the QFN package.
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
'#sound-dai-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- '#sound-dai-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
amplifier@1e {
|
||||
compatible = "irondevice,sma1307a";
|
||||
reg = <0x1e>;
|
||||
#sound-dai-cells = <1>;
|
||||
};
|
||||
};
|
@ -0,0 +1,68 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sound/loongson,ls2k1000-i2s.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Loongson-2K1000 I2S controller
|
||||
|
||||
maintainers:
|
||||
- Binbin Zhou <zhoubinbin@loongson.cn>
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: loongson,ls2k1000-i2s
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: Loongson I2S controller Registers.
|
||||
- description: APB DMA config register for Loongson I2S controller.
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
dmas:
|
||||
maxItems: 2
|
||||
|
||||
dma-names:
|
||||
items:
|
||||
- const: tx
|
||||
- const: rx
|
||||
|
||||
'#sound-dai-cells':
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
- dmas
|
||||
- dma-names
|
||||
- '#sound-dai-cells'
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/loongson,ls2k-clk.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2s@1fe2d000 {
|
||||
compatible = "loongson,ls2k1000-i2s";
|
||||
reg = <0x1fe2d000 0x14>,
|
||||
<0x1fe00438 0x8>;
|
||||
interrupt-parent = <&liointc0>;
|
||||
interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk LOONGSON2_APB_CLK>;
|
||||
dmas = <&apbdma2 0>, <&apbdma3 0>;
|
||||
dma-names = "tx", "rx";
|
||||
#sound-dai-cells = <0>;
|
||||
};
|
||||
...
|
@ -9,6 +9,9 @@ title: Maxim Integrated MAX98390 Speaker Amplifier with Integrated Dynamic Speak
|
||||
maintainers:
|
||||
- Steve Lee <steves.lee@maximintegrated.com>
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: maxim,max98390
|
||||
@ -32,11 +35,14 @@ properties:
|
||||
reset-gpios:
|
||||
maxItems: 1
|
||||
|
||||
'#sound-dai-cells':
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
@ -29,6 +29,13 @@ properties:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: The phandle of MT8188 ASoC platform.
|
||||
|
||||
mediatek,adsp:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description:
|
||||
The phandle of the MT8188 ADSP platform, which is the optional Audio DSP
|
||||
hardware that provides additional audio functionalities if present.
|
||||
The AFE will link to ADSP when the phandle is provided.
|
||||
|
||||
patternProperties:
|
||||
"^dai-link-[0-9]+$":
|
||||
type: object
|
||||
|
@ -23,8 +23,8 @@ properties:
|
||||
Indicates how many data pins are used to transmit two channels of PDM
|
||||
signal. 0 means two wires, 1 means one wire. Default value is 0.
|
||||
enum:
|
||||
- 0 # one wire
|
||||
- 1 # two wires
|
||||
- 0 # two wires
|
||||
- 1 # one wire
|
||||
|
||||
mediatek,mic-type-0:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
@ -53,9 +53,9 @@ additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
mt6359codec: mt6359codec {
|
||||
mediatek,dmic-mode = <0>;
|
||||
mediatek,mic-type-0 = <2>;
|
||||
mt6359codec: audio-codec {
|
||||
mediatek,dmic-mode = <0>;
|
||||
mediatek,mic-type-0 = <2>;
|
||||
};
|
||||
|
||||
...
|
||||
|
@ -0,0 +1,73 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sound/neofidelity,ntp8835.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NeoFidelity NTP8835/NTP8835C Amplifiers
|
||||
|
||||
maintainers:
|
||||
- Igor Prusov <ivprusov@salutedevices.com>
|
||||
|
||||
description: |
|
||||
The NTP8835 is a single chip full digital audio amplifier
|
||||
including power stages for stereo amplifier systems.
|
||||
NTP8835 is integrated with versatile digital audio signal
|
||||
processing functions, high-performance, high-fidelity fully
|
||||
digital PWM modulator and two high-power full-bridge MOSFET
|
||||
power stages. NTP8835C has identical programming interface,
|
||||
but has different output signal characteristics.
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- neofidelity,ntp8835
|
||||
- neofidelity,ntp8835c
|
||||
|
||||
reg:
|
||||
enum:
|
||||
- 0x2a
|
||||
- 0x2b
|
||||
- 0x2c
|
||||
- 0x2d
|
||||
|
||||
reset-gpios:
|
||||
maxItems: 1
|
||||
|
||||
'#sound-dai-cells':
|
||||
const: 0
|
||||
|
||||
clocks:
|
||||
maxItems: 4
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: wck
|
||||
- const: bck
|
||||
- const: scl
|
||||
- const: mclk
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
audio-codec@2b {
|
||||
compatible = "neofidelity,ntp8835";
|
||||
#sound-dai-cells = <0>;
|
||||
reg = <0x2b>;
|
||||
reset-gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||
clocks = <&clkc 551>, <&clkc 552>, <&clkc 553>, <&clkc 554>;
|
||||
clock-names = "wck", "bck", "scl", "mclk";
|
||||
};
|
||||
};
|
@ -0,0 +1,70 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sound/neofidelity,ntp8918.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NeoFidelity NTP8918 Amplifier
|
||||
|
||||
maintainers:
|
||||
- Igor Prusov <ivprusov@salutedevices.com>
|
||||
|
||||
description:
|
||||
The NTP8918 is a single chip full digital audio amplifier
|
||||
including power stage for stereo amplifier system.
|
||||
The NTP8918 is integrated with versatile digital audio signal
|
||||
processing functions, high-performance, high-fidelity fully
|
||||
digital PWM modulator and two high-power full-bridge MOSFET
|
||||
power stages.
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- neofidelity,ntp8918
|
||||
|
||||
reg:
|
||||
enum:
|
||||
- 0x2a
|
||||
- 0x2b
|
||||
- 0x2c
|
||||
- 0x2d
|
||||
|
||||
reset-gpios:
|
||||
maxItems: 1
|
||||
|
||||
'#sound-dai-cells':
|
||||
const: 0
|
||||
|
||||
clocks:
|
||||
maxItems: 3
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: wck
|
||||
- const: scl
|
||||
- const: bck
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
audio-codec@2a {
|
||||
compatible = "neofidelity,ntp8918";
|
||||
#sound-dai-cells = <0>;
|
||||
reg = <0x2a>;
|
||||
clocks = <&clkc 150>, <&clkc 151>, <&clkc 152>;
|
||||
clock-names = "wck", "scl", "bck";
|
||||
reset-gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
42
Documentation/devicetree/bindings/sound/nxp,uda1342.yaml
Normal file
42
Documentation/devicetree/bindings/sound/nxp,uda1342.yaml
Normal file
@ -0,0 +1,42 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sound/nxp,uda1342.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NXP uda1342 audio CODECs
|
||||
|
||||
maintainers:
|
||||
- Binbin Zhou <zhoubinbin@loongson.cn>
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: nxp,uda1342
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
'#sound-dai-cells':
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- '#sound-dai-cells'
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
codec@1a {
|
||||
compatible = "nxp,uda1342";
|
||||
reg = <0x1a>;
|
||||
#sound-dai-cells = <0>;
|
||||
};
|
||||
};
|
@ -21,6 +21,7 @@ properties:
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,sm8650-lpass-rx-macro
|
||||
- qcom,sm8750-lpass-rx-macro
|
||||
- qcom,x1e80100-lpass-rx-macro
|
||||
- const: qcom,sm8550-lpass-rx-macro
|
||||
|
||||
|
@ -22,6 +22,7 @@ properties:
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,sm8650-lpass-tx-macro
|
||||
- qcom,sm8750-lpass-tx-macro
|
||||
- qcom,x1e80100-lpass-tx-macro
|
||||
- const: qcom,sm8550-lpass-tx-macro
|
||||
|
||||
|
@ -21,6 +21,7 @@ properties:
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,sm8650-lpass-va-macro
|
||||
- qcom,sm8750-lpass-va-macro
|
||||
- qcom,x1e80100-lpass-va-macro
|
||||
- const: qcom,sm8550-lpass-va-macro
|
||||
|
||||
|
@ -21,6 +21,7 @@ properties:
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,sm8650-lpass-wsa-macro
|
||||
- qcom,sm8750-lpass-wsa-macro
|
||||
- qcom,x1e80100-lpass-wsa-macro
|
||||
- const: qcom,sm8550-lpass-wsa-macro
|
||||
|
||||
|
@ -25,6 +25,7 @@ properties:
|
||||
- enum:
|
||||
- qcom,sm8550-sndcard
|
||||
- qcom,sm8650-sndcard
|
||||
- qcom,sm8750-sndcard
|
||||
- const: qcom,sm8450-sndcard
|
||||
- enum:
|
||||
- qcom,apq8096-sndcard
|
||||
|
146
Documentation/devicetree/bindings/sound/realtek,rt5640.yaml
Normal file
146
Documentation/devicetree/bindings/sound/realtek,rt5640.yaml
Normal file
@ -0,0 +1,146 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sound/realtek,rt5640.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: RT5640/RT5639 audio CODEC
|
||||
|
||||
maintainers:
|
||||
- Neil Armstrong <neil.armstrong@linaro.org>
|
||||
|
||||
description: |
|
||||
This device supports I2C only.
|
||||
|
||||
Pins on the device (for linking into audio routes) for RT5639/RT5640:
|
||||
* DMIC1
|
||||
* DMIC2
|
||||
* MICBIAS1
|
||||
* IN1P
|
||||
* IN1N
|
||||
* IN2P
|
||||
* IN2N
|
||||
* IN3P
|
||||
* IN3N
|
||||
* HPOL
|
||||
* HPOR
|
||||
* LOUTL
|
||||
* LOUTR
|
||||
* SPOLP
|
||||
* SPOLN
|
||||
* SPORP
|
||||
* SPORN
|
||||
|
||||
Additional pins on the device for RT5640:
|
||||
* MONOP
|
||||
* MONON
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- realtek,rt5640
|
||||
- realtek,rt5639
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
description: The CODEC's interrupt output.
|
||||
|
||||
realtek,in1-differential:
|
||||
description:
|
||||
Indicate MIC1 input is differential, rather than single-ended.
|
||||
type: boolean
|
||||
|
||||
realtek,in2-differential:
|
||||
description:
|
||||
Indicate MIC2 input is differential, rather than single-ended.
|
||||
type: boolean
|
||||
|
||||
realtek,in3-differential:
|
||||
description:
|
||||
Indicate MIC3 input is differential, rather than single-ended.
|
||||
type: boolean
|
||||
|
||||
realtek,lout-differential:
|
||||
description:
|
||||
Indicate LOUT output is differential, rather than single-ended.
|
||||
type: boolean
|
||||
|
||||
realtek,dmic1-data-pin:
|
||||
description: Specify which pin to be used as DMIC1 data pin.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum:
|
||||
- 0 # dmic1 is not used
|
||||
- 1 # using IN2P pin as dmic1 data pin
|
||||
- 2 # using GPIO3 pin as dmic1 data pin
|
||||
|
||||
realtek,dmic2-data-pin:
|
||||
description: Specify which pin to be used as DMIC2 data pin.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum:
|
||||
- 0 # dmic2 is not used
|
||||
- 1 # using IN2N pin as dmic2 data pin
|
||||
- 2 # using GPIO4 pin as dmic2 data pin
|
||||
|
||||
realtek,jack-detect-source:
|
||||
description: The Jack Detect source.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum:
|
||||
- 0 # Jack Detect function is not used
|
||||
- 1 # Use GPIO1 for jack-detect
|
||||
- 2 # Use JD1_IN4P for jack-detect
|
||||
- 3 # Use JD2_IN4N for jack-detect
|
||||
- 4 # Use GPIO2 for jack-detect
|
||||
- 5 # Use GPIO3 for jack-detect
|
||||
- 6 # Use GPIO4 for jack-detect
|
||||
|
||||
realtek,jack-detect-not-inverted:
|
||||
description:
|
||||
Normal jack-detect switches give an inverted signal, set this bool
|
||||
in the rare case you've a jack-detect switch which is not inverted.
|
||||
type: boolean
|
||||
|
||||
realtek,over-current-threshold-microamp:
|
||||
description: micbias over-current detection threshold in µA
|
||||
enum:
|
||||
- 600
|
||||
- 1500
|
||||
- 2000
|
||||
|
||||
realtek,over-current-scale-factor:
|
||||
description: micbias over-current detection scale-factor
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum:
|
||||
- 0 # Scale current by 0.5
|
||||
- 1 # Scale current by 0.75
|
||||
- 2 # Scale current by 1.0
|
||||
- 3 # Scale current by 1.5
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
codec@1a {
|
||||
compatible = "realtek,rt5640";
|
||||
reg = <0x1a>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
|
||||
};
|
||||
};
|
@ -109,7 +109,7 @@ For more detail information, see below
|
||||
- Register Description
|
||||
- CTUn Scale Value exx Register (CTUn_SVxxR)
|
||||
|
||||
${LINUX}/sound/soc/sh/rcar/ctu.c
|
||||
${LINUX}/sound/soc/renesas/rcar/ctu.c
|
||||
- comment of header
|
||||
|
||||
You need to use "simple-scu-audio-card" or "audio-graph-scu-card" for it.
|
||||
|
@ -0,0 +1,58 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sound/rockchip,rk3036-codec.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Rockchip RK3036 internal codec
|
||||
|
||||
maintainers:
|
||||
- Heiko Stuebner <heiko@sntech.de>
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: rockchip,rk3036-codec
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: clock for audio codec
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: acodec_pclk
|
||||
|
||||
rockchip,grf:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description:
|
||||
The phandle of the syscon node for the GRF register.
|
||||
|
||||
"#sound-dai-cells":
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- clock-names
|
||||
- rockchip,grf
|
||||
- "#sound-dai-cells"
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/rk3036-cru.h>
|
||||
acodec: audio-codec@20030000 {
|
||||
compatible = "rockchip,rk3036-codec";
|
||||
reg = <0x20030000 0x4000>;
|
||||
rockchip,grf = <&grf>;
|
||||
clock-names = "acodec_pclk";
|
||||
clocks = <&cru ACLK_VCODEC>;
|
||||
#sound-dai-cells = <0>;
|
||||
};
|
@ -1,97 +0,0 @@
|
||||
RT5640/RT5639 audio CODEC
|
||||
|
||||
This device supports I2C only.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : One of "realtek,rt5640" or "realtek,rt5639".
|
||||
|
||||
- reg : The I2C address of the device.
|
||||
|
||||
- interrupts : The CODEC's interrupt output.
|
||||
|
||||
Optional properties:
|
||||
|
||||
- clocks: The phandle of the master clock to the CODEC
|
||||
- clock-names: Should be "mclk"
|
||||
|
||||
- realtek,in1-differential
|
||||
- realtek,in2-differential
|
||||
- realtek,in3-differential
|
||||
Boolean. Indicate MIC1/2/3 input are differential, rather than single-ended.
|
||||
|
||||
- realtek,lout-differential
|
||||
Boolean. Indicate LOUT output is differential, rather than stereo.
|
||||
|
||||
- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.
|
||||
|
||||
- realtek,dmic1-data-pin
|
||||
0: dmic1 is not used
|
||||
1: using IN1P pin as dmic1 data pin
|
||||
2: using GPIO3 pin as dmic1 data pin
|
||||
|
||||
- realtek,dmic2-data-pin
|
||||
0: dmic2 is not used
|
||||
1: using IN1N pin as dmic2 data pin
|
||||
2: using GPIO4 pin as dmic2 data pin
|
||||
|
||||
- realtek,jack-detect-source
|
||||
u32. Valid values:
|
||||
0: jack-detect is not used
|
||||
1: Use GPIO1 for jack-detect
|
||||
2: Use JD1_IN4P for jack-detect
|
||||
3: Use JD2_IN4N for jack-detect
|
||||
4: Use GPIO2 for jack-detect
|
||||
5: Use GPIO3 for jack-detect
|
||||
6: Use GPIO4 for jack-detect
|
||||
|
||||
- realtek,jack-detect-not-inverted
|
||||
bool. Normal jack-detect switches give an inverted signal, set this bool
|
||||
in the rare case you've a jack-detect switch which is not inverted.
|
||||
|
||||
- realtek,over-current-threshold-microamp
|
||||
u32, micbias over-current detection threshold in µA, valid values are
|
||||
600, 1500 and 2000µA.
|
||||
|
||||
- realtek,over-current-scale-factor
|
||||
u32, micbias over-current detection scale-factor, valid values are:
|
||||
0: Scale current by 0.5
|
||||
1: Scale current by 0.75
|
||||
2: Scale current by 1.0
|
||||
3: Scale current by 1.5
|
||||
|
||||
Pins on the device (for linking into audio routes) for RT5639/RT5640:
|
||||
|
||||
* DMIC1
|
||||
* DMIC2
|
||||
* MICBIAS1
|
||||
* IN1P
|
||||
* IN1N
|
||||
* IN2P
|
||||
* IN2N
|
||||
* IN3P
|
||||
* IN3N
|
||||
* HPOL
|
||||
* HPOR
|
||||
* LOUTL
|
||||
* LOUTR
|
||||
* SPOLP
|
||||
* SPOLN
|
||||
* SPORP
|
||||
* SPORN
|
||||
|
||||
Additional pins on the device for RT5640:
|
||||
|
||||
* MONOP
|
||||
* MONON
|
||||
|
||||
Example:
|
||||
|
||||
rt5640 {
|
||||
compatible = "realtek,rt5640";
|
||||
reg = <0x1c>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_HIGH>;
|
||||
realtek,ldo1-en-gpios =
|
||||
<&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
|
||||
};
|
@ -29,6 +29,10 @@ properties:
|
||||
$ref: /schemas/types.yaml#/definitions/string-array
|
||||
maxItems: 2
|
||||
|
||||
idle-state:
|
||||
description: If present specifies the state when the mux is powered down
|
||||
$ref: /schemas/mux/mux-controller.yaml#/properties/idle-state
|
||||
|
||||
sound-name-prefix: true
|
||||
|
||||
required:
|
||||
@ -43,4 +47,5 @@ examples:
|
||||
compatible = "simple-audio-mux";
|
||||
mux-gpios = <&gpio 3 0>;
|
||||
state-labels = "Label_A", "Label_B";
|
||||
idle-state = <0>;
|
||||
};
|
||||
|
@ -207,8 +207,14 @@ properties:
|
||||
simple-audio-card,pin-switches:
|
||||
$ref: "#/definitions/pin-switches"
|
||||
simple-audio-card,hp-det-gpio:
|
||||
deprecated: true
|
||||
maxItems: 1
|
||||
simple-audio-card,hp-det-gpios:
|
||||
maxItems: 1
|
||||
simple-audio-card,mic-det-gpio:
|
||||
deprecated: true
|
||||
maxItems: 1
|
||||
simple-audio-card,mic-det-gpios:
|
||||
maxItems: 1
|
||||
|
||||
patternProperties:
|
||||
@ -256,8 +262,14 @@ patternProperties:
|
||||
pin-switches:
|
||||
$ref: "#/definitions/pin-switches"
|
||||
hp-det-gpio:
|
||||
deprecated: true
|
||||
maxItems: 1
|
||||
hp-det-gpios:
|
||||
maxItems: 1
|
||||
mic-det-gpio:
|
||||
deprecated: true
|
||||
maxItems: 1
|
||||
mic-det-gpios:
|
||||
maxItems: 1
|
||||
|
||||
patternProperties:
|
||||
|
@ -0,0 +1,56 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sound/sprd,pcm-platform.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Spreadtrum DMA platform
|
||||
|
||||
maintainers:
|
||||
- Orson Zhai <orsonzhai@gmail.com>
|
||||
- Baolin Wang <baolin.wang7@gmail.com>
|
||||
- Chunyan Zhang <zhang.lyra@gmail.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: sprd,pcm-platform
|
||||
|
||||
dmas:
|
||||
maxItems: 10
|
||||
|
||||
dma-names:
|
||||
items:
|
||||
- const: normal_p_l
|
||||
- const: normal_p_r
|
||||
- const: normal_c_l
|
||||
- const: normal_c_r
|
||||
- const: voice_c
|
||||
- const: fast_p
|
||||
- const: loop_c
|
||||
- const: loop_p
|
||||
- const: voip_c
|
||||
- const: voip_p
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- dmas
|
||||
- dma-names
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
platform {
|
||||
compatible = "sprd,pcm-platform";
|
||||
dmas = <&agcp_dma 1 1>, <&agcp_dma 2 2>,
|
||||
<&agcp_dma 3 3>, <&agcp_dma 4 4>,
|
||||
<&agcp_dma 5 5>, <&agcp_dma 6 6>,
|
||||
<&agcp_dma 7 7>, <&agcp_dma 8 8>,
|
||||
<&agcp_dma 9 9>, <&agcp_dma 10 10>;
|
||||
dma-names = "normal_p_l", "normal_p_r",
|
||||
"normal_c_l", "normal_c_r",
|
||||
"voice_c", "fast_p",
|
||||
"loop_c", "loop_p",
|
||||
"voip_c", "voip_p";
|
||||
};
|
||||
...
|
@ -0,0 +1,47 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/sound/sprd,sc9860-mcdt.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Spreadtrum Multi-Channel Data Transfer controller
|
||||
|
||||
description:
|
||||
The Multi-channel data transfer controller is used for sound stream
|
||||
transmission between the audio subsystem and other AP/CP subsystem. It
|
||||
supports 10 DAC channels and 10 ADC channels, and each channel can be
|
||||
configured with DMA mode or interrupt mode.
|
||||
|
||||
maintainers:
|
||||
- Orson Zhai <orsonzhai@gmail.com>
|
||||
- Baolin Wang <baolin.wang7@gmail.com>
|
||||
- Chunyan Zhang <zhang.lyra@gmail.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: sprd,sc9860-mcdt
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
mcdt@41490000 {
|
||||
compatible = "sprd,sc9860-mcdt";
|
||||
reg = <0x41490000 0x170>;
|
||||
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
...
|
@ -1,19 +0,0 @@
|
||||
Spreadtrum Multi-Channel Data Transfer Binding
|
||||
|
||||
The Multi-channel data transfer controller is used for sound stream
|
||||
transmission between audio subsystem and other AP/CP subsystem. It
|
||||
supports 10 DAC channel and 10 ADC channel, and each channel can be
|
||||
configured with DMA mode or interrupt mode.
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "sprd,sc9860-mcdt".
|
||||
- reg: Should contain registers address and length.
|
||||
- interrupts: Should contain one interrupt shared by all channel.
|
||||
|
||||
Example:
|
||||
|
||||
mcdt@41490000 {
|
||||
compatible = "sprd,sc9860-mcdt";
|
||||
reg = <0 0x41490000 0 0x170>;
|
||||
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
* Spreadtrum DMA platform bindings
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "sprd,pcm-platform".
|
||||
- dmas: Specify the list of DMA controller phandle and DMA request line ordered pairs.
|
||||
- dma-names: Identifier string for each DMA request line in the dmas property.
|
||||
These strings correspond 1:1 with the ordered pairs in dmas.
|
||||
|
||||
Example:
|
||||
|
||||
audio_platform:platform@0 {
|
||||
compatible = "sprd,pcm-platform";
|
||||
dmas = <&agcp_dma 1 1>, <&agcp_dma 2 2>,
|
||||
<&agcp_dma 3 3>, <&agcp_dma 4 4>,
|
||||
<&agcp_dma 5 5>, <&agcp_dma 6 6>,
|
||||
<&agcp_dma 7 7>, <&agcp_dma 8 8>,
|
||||
<&agcp_dma 9 9>, <&agcp_dma 10 10>;
|
||||
dma-names = "normal_p_l", "normal_p_r",
|
||||
"normal_c_l", "normal_c_r",
|
||||
"voice_c", "fast_p",
|
||||
"loop_c", "loop_p",
|
||||
"voip_c", "voip_p";
|
||||
};
|
@ -13,13 +13,11 @@ description:
|
||||
The SPI/I2S block supports I2S/PCM protocols when configured on I2S mode.
|
||||
Only some SPI instances support I2S.
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- st,stm32h7-i2s
|
||||
- st,stm32mp25-i2s
|
||||
|
||||
"#sound-dai-cells":
|
||||
const: 0
|
||||
@ -33,6 +31,7 @@ properties:
|
||||
- description: clock feeding the internal clock generator.
|
||||
- description: I2S parent clock for sampling rates multiple of 8kHz.
|
||||
- description: I2S parent clock for sampling rates multiple of 11.025kHz.
|
||||
minItems: 2
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
@ -40,6 +39,7 @@ properties:
|
||||
- const: i2sclk
|
||||
- const: x8k
|
||||
- const: x11k
|
||||
minItems: 2
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
@ -79,6 +79,36 @@ required:
|
||||
- dmas
|
||||
- dma-names
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: st,stm32h7-i2s
|
||||
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
minItems: 4
|
||||
|
||||
clock-names:
|
||||
minItems: 4
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: st,stm32mp25-i2s
|
||||
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 2
|
||||
|
||||
clock-names:
|
||||
maxItems: 2
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
|
@ -20,6 +20,7 @@ properties:
|
||||
enum:
|
||||
- st,stm32f4-sai
|
||||
- st,stm32h7-sai
|
||||
- st,stm32mp25-sai
|
||||
|
||||
reg:
|
||||
items:
|
||||
@ -43,9 +44,11 @@ properties:
|
||||
const: 1
|
||||
|
||||
clocks:
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
|
||||
clock-names:
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
|
||||
access-controllers:
|
||||
@ -156,7 +159,13 @@ allOf:
|
||||
items:
|
||||
- const: x8k
|
||||
- const: x11k
|
||||
else:
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: st,stm32mph7-sai
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
@ -170,6 +179,21 @@ allOf:
|
||||
- const: x8k
|
||||
- const: x11k
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: st,stm32mp25-sai
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: pclk feeds the peripheral bus interface.
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: pclk
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
|
@ -50,6 +50,10 @@ properties:
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
port:
|
||||
$ref: audio-graph-port.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
access-controllers:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
@ -1017,6 +1017,8 @@ patternProperties:
|
||||
description: Shanghai Neardi Technology Co., Ltd.
|
||||
"^nec,.*":
|
||||
description: NEC LCD Technologies, Ltd.
|
||||
"^neofidelity,.*":
|
||||
description: Neofidelity Inc.
|
||||
"^neonode,.*":
|
||||
description: Neonode Inc.
|
||||
"^netgear,.*":
|
||||
|
134
Documentation/sound/designs/compress-accel.rst
Normal file
134
Documentation/sound/designs/compress-accel.rst
Normal file
@ -0,0 +1,134 @@
|
||||
==================================
|
||||
ALSA Co-processor Acceleration API
|
||||
==================================
|
||||
|
||||
Jaroslav Kysela <perex@perex.cz>
|
||||
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
There is a requirement to expose the audio hardware that accelerates various
|
||||
tasks for user space such as sample rate converters, compressed
|
||||
stream decoders, etc.
|
||||
|
||||
This is description for the API extension for the compress ALSA API which
|
||||
is able to handle "tasks" that are not bound to real-time operations
|
||||
and allows for the serialization of operations.
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
The main requirements are:
|
||||
|
||||
- serialization of multiple tasks for user space to allow multiple
|
||||
operations without user space intervention
|
||||
|
||||
- separate buffers (input + output) for each operation
|
||||
|
||||
- expose buffers using mmap to user space
|
||||
|
||||
- signal user space when the task is finished (standard poll mechanism)
|
||||
|
||||
Design
|
||||
======
|
||||
|
||||
A new direction SND_COMPRESS_ACCEL is introduced to identify
|
||||
the passthrough API.
|
||||
|
||||
The API extension shares device enumeration and parameters handling from
|
||||
the main compressed API. All other realtime streaming ioctls are deactivated
|
||||
and a new set of task related ioctls are introduced. The standard
|
||||
read/write/mmap I/O operations are not supported in the passthrough device.
|
||||
|
||||
Device ("stream") state handling is reduced to OPEN/SETUP. All other
|
||||
states are not available for the passthrough mode.
|
||||
|
||||
Data I/O mechanism is using standard dma-buf interface with all advantages
|
||||
like mmap, standard I/O, buffer sharing etc. One buffer is used for the
|
||||
input data and second (separate) buffer is used for the output data. Each task
|
||||
have separate I/O buffers.
|
||||
|
||||
For the buffering parameters, the fragments means a limit of allocated tasks
|
||||
for given device. The fragment_size limits the input buffer size for the given
|
||||
device. The output buffer size is determined by the driver (may be different
|
||||
from the input buffer size).
|
||||
|
||||
State Machine
|
||||
=============
|
||||
|
||||
The passthrough audio stream state machine is described below::
|
||||
|
||||
+----------+
|
||||
| |
|
||||
| OPEN |
|
||||
| |
|
||||
+----------+
|
||||
|
|
||||
|
|
||||
| compr_set_params()
|
||||
|
|
||||
v
|
||||
all passthrough task ops +----------+
|
||||
+------------------------------------| |
|
||||
| | SETUP |
|
||||
| |
|
||||
| +----------+
|
||||
| |
|
||||
+------------------------------------------+
|
||||
|
||||
|
||||
Passthrough operations (ioctls)
|
||||
===============================
|
||||
|
||||
All operations are protected using stream->device->lock (mutex).
|
||||
|
||||
CREATE
|
||||
------
|
||||
Creates a set of input/output buffers. The input buffer size is
|
||||
fragment_size. Allocates unique seqno.
|
||||
|
||||
The hardware drivers allocate internal 'struct dma_buf' for both input and
|
||||
output buffers (using 'dma_buf_export()' function). The anonymous
|
||||
file descriptors for those buffers are passed to user space.
|
||||
|
||||
FREE
|
||||
----
|
||||
Free a set of input/output buffers. If a task is active, the stop
|
||||
operation is executed before. If seqno is zero, operation is executed for all
|
||||
tasks.
|
||||
|
||||
START
|
||||
-----
|
||||
Starts (queues) a task. There are two cases of the task start - right after
|
||||
the task is created. In this case, origin_seqno must be zero.
|
||||
The second case is for reusing of already finished task. The origin_seqno
|
||||
must identify the task to be reused. In both cases, a new seqno value
|
||||
is allocated and returned to user space.
|
||||
|
||||
The prerequisite is that application filled input dma buffer with
|
||||
new source data and set input_size to pass the real data size to the driver.
|
||||
|
||||
The order of data processing is preserved (first started job must be
|
||||
finished at first).
|
||||
|
||||
If the multiple tasks require a state handling (e.g. resampling operation),
|
||||
the user space may set SND_COMPRESS_TFLG_NEW_STREAM flag to mark the
|
||||
start of the new stream data. It is useful to keep the allocated buffers
|
||||
for the new operation rather using open/close mechanism.
|
||||
|
||||
STOP
|
||||
----
|
||||
Stop (dequeues) a task. If seqno is zero, operation is executed for all
|
||||
tasks.
|
||||
|
||||
STATUS
|
||||
------
|
||||
Obtain the task status (active, finished). Also, the driver will set
|
||||
the real output data size (valid area in the output buffer).
|
||||
|
||||
Credits
|
||||
=======
|
||||
- Shengjiu Wang <shengjiu.wang@gmail.com>
|
||||
- Takashi Iwai <tiwai@suse.de>
|
||||
- Vinod Koul <vkoul@kernel.org>
|
@ -6,6 +6,7 @@ Designs and Implementations
|
||||
|
||||
control-names
|
||||
channel-mapping-api
|
||||
compress-accel
|
||||
compress-offload
|
||||
timestamping
|
||||
jack-controls
|
||||
|
@ -42,5 +42,17 @@ rate, number of channels and word size) to save on power.
|
||||
It is also desirable to use the codec (if possible) to drive (or master) the
|
||||
audio clocks as it usually gives more accurate sample rates than the CPU.
|
||||
|
||||
ASoC provided clock APIs
|
||||
------------------------
|
||||
|
||||
.. kernel-doc:: sound/soc/soc-dai.c
|
||||
:identifiers: snd_soc_dai_set_sysclk
|
||||
|
||||
.. kernel-doc:: sound/soc/soc-dai.c
|
||||
:identifiers: snd_soc_dai_set_clkdiv
|
||||
|
||||
.. kernel-doc:: sound/soc/soc-dai.c
|
||||
:identifiers: snd_soc_dai_set_pll
|
||||
|
||||
.. kernel-doc:: sound/soc/soc-dai.c
|
||||
:identifiers: snd_soc_dai_set_bclk_ratio
|
||||
|
@ -157,15 +157,13 @@ FE DAI links are defined as follows :-
|
||||
.codec_dai_name = "snd-soc-dummy-dai",
|
||||
.dynamic = 1,
|
||||
.trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
|
||||
.dpcm_playback = 1,
|
||||
},
|
||||
.....< other FE and BE DAI links here >
|
||||
};
|
||||
|
||||
This FE DAI link is pretty similar to a regular DAI link except that we also
|
||||
set the DAI link to a DPCM FE with the ``dynamic = 1``. The supported FE stream
|
||||
directions should also be set with the ``dpcm_playback`` and ``dpcm_capture``
|
||||
flags. There is also an option to specify the ordering of the trigger call for
|
||||
set the DAI link to a DPCM FE with the ``dynamic = 1``.
|
||||
There is also an option to specify the ordering of the trigger call for
|
||||
each FE. This allows the ASoC core to trigger the DSP before or after the other
|
||||
components (as some DSPs have strong requirements for the ordering DAI/DSP
|
||||
start and stop sequences).
|
||||
@ -189,15 +187,12 @@ The BE DAIs are configured as follows :-
|
||||
.ignore_pmdown_time = 1,
|
||||
.be_hw_params_fixup = hswult_ssp0_fixup,
|
||||
.ops = &haswell_ops,
|
||||
.dpcm_playback = 1,
|
||||
.dpcm_capture = 1,
|
||||
},
|
||||
.....< other BE DAI links here >
|
||||
};
|
||||
|
||||
This BE DAI link connects DAI0 to the codec (in this case RT5460 AIF1). It sets
|
||||
the ``no_pcm`` flag to mark it has a BE and sets flags for supported stream
|
||||
directions using ``dpcm_playback`` and ``dpcm_capture`` above.
|
||||
the ``no_pcm`` flag to mark it has a BE.
|
||||
|
||||
The BE has also flags set for ignoring suspend and PM down time. This allows
|
||||
the BE to work in a hostless mode where the host CPU is not transferring data
|
||||
|
@ -71,6 +71,18 @@ struct snd_soc_dai_link is used to set up each DAI in your machine. e.g.
|
||||
.ops = &corgi_ops,
|
||||
};
|
||||
|
||||
In the above struct, dai’s are registered using names but you can pass
|
||||
either dai name or device tree node but not both. Also, names used here
|
||||
for cpu/codec/platform dais should be globally unique.
|
||||
|
||||
Additionaly below example macro can be used to register cpu, codec and
|
||||
platform dai::
|
||||
|
||||
SND_SOC_DAILINK_DEFS(wm2200_cpu_dsp,
|
||||
DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.0")),
|
||||
DAILINK_COMP_ARRAY(COMP_CODEC("spi0.0", "wm0010-sdi1")),
|
||||
DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0")));
|
||||
|
||||
struct snd_soc_card then sets up the machine with its DAIs. e.g.
|
||||
::
|
||||
|
||||
@ -81,6 +93,10 @@ struct snd_soc_card then sets up the machine with its DAIs. e.g.
|
||||
.num_links = 1,
|
||||
};
|
||||
|
||||
Following this, ``devm_snd_soc_register_card`` can be used to register
|
||||
the sound card. During the registration, the individual components
|
||||
such as the codec, CPU, and platform are probed. If all these components
|
||||
are successfully probed, the sound card gets registered.
|
||||
|
||||
Machine Power Map
|
||||
-----------------
|
||||
@ -95,3 +111,13 @@ Machine Controls
|
||||
----------------
|
||||
|
||||
Machine specific audio mixer controls can be added in the DAI init function.
|
||||
|
||||
|
||||
Clocking Controls
|
||||
-----------------
|
||||
|
||||
As previously noted, clock configuration is handled within the machine driver.
|
||||
For details on the clock APIs that the machine driver can utilize for
|
||||
setup, please refer to Documentation/sound/soc/clocking.rst. However, the
|
||||
callback needs to be registered by the CPU/Codec/Platform drivers to configure
|
||||
the clocks that is needed for the corresponding device operation.
|
||||
|
23
MAINTAINERS
23
MAINTAINERS
@ -1530,6 +1530,7 @@ L: linux-sound@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://wiki.analog.com/
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/sound/adi,*
|
||||
F: sound/soc/codecs/ad1*
|
||||
F: sound/soc/codecs/ad7*
|
||||
F: sound/soc/codecs/adau*
|
||||
@ -2141,9 +2142,11 @@ L: asahi@lists.linux.dev
|
||||
L: linux-sound@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/sound/adi,ssm3515.yaml
|
||||
F: Documentation/devicetree/bindings/sound/cirrus,cs42l84.yaml
|
||||
F: Documentation/devicetree/bindings/sound/apple,*
|
||||
F: sound/soc/apple/*
|
||||
F: sound/soc/codecs/cs42l83-i2c.c
|
||||
F: sound/soc/codecs/cs42l84.*
|
||||
F: sound/soc/codecs/ssm3515.c
|
||||
|
||||
ARM/APPLE MACHINE SUPPORT
|
||||
@ -19694,6 +19697,17 @@ S: Maintained
|
||||
F: Documentation/devicetree/bindings/sound/renesas,idt821034.yaml
|
||||
F: sound/soc/codecs/idt821034.c
|
||||
|
||||
RENESAS R-CAR & FSI AUDIO (ASoC) DRIVERS
|
||||
M: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
||||
L: linux-sound@vger.kernel.org
|
||||
L: linux-renesas-soc@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/sound/renesas,rsnd.*
|
||||
F: Documentation/devicetree/bindings/sound/renesas,fsi.yaml
|
||||
F: sound/soc/renesas/rcar/
|
||||
F: sound/soc/renesas/fsi.c
|
||||
F: include/sound/sh_fsi.h
|
||||
|
||||
RENESAS R-CAR GEN3 & RZ/N1 NAND CONTROLLER DRIVER
|
||||
M: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
L: linux-mtd@lists.infradead.org
|
||||
@ -19742,6 +19756,15 @@ S: Supported
|
||||
F: Documentation/devicetree/bindings/i2c/renesas,riic.yaml
|
||||
F: drivers/i2c/busses/i2c-riic.c
|
||||
|
||||
RENESAS RZ AUDIO (ASoC) DRIVER
|
||||
M: Biju Das <biju.das.jz@bp.renesas.com>
|
||||
M: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
|
||||
L: linux-sound@vger.kernel.org
|
||||
L: linux-renesas-soc@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/sound/renesas,rz-ssi.yaml
|
||||
F: sound/soc/renesas/rz-ssi.c
|
||||
|
||||
RENESAS RZ/G2L A/D DRIVER
|
||||
M: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
|
@ -6,6 +6,7 @@
|
||||
menuconfig SOUNDWIRE
|
||||
tristate "SoundWire support"
|
||||
depends on ACPI || OF
|
||||
depends on SND_SOC_SDCA_OPTIONAL
|
||||
help
|
||||
SoundWire is a 2-Pin interface with data and clock line ratified
|
||||
by the MIPI Alliance. SoundWire is used for transporting data
|
||||
|
@ -177,7 +177,7 @@ EXPORT_SYMBOL_NS(sdw_amd_probe, SOUNDWIRE_AMD_INIT);
|
||||
void sdw_amd_exit(struct sdw_amd_ctx *ctx)
|
||||
{
|
||||
sdw_amd_cleanup(ctx);
|
||||
kfree(ctx->ids);
|
||||
kfree(ctx->peripherals);
|
||||
kfree(ctx);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(sdw_amd_exit, SOUNDWIRE_AMD_INIT);
|
||||
@ -204,10 +204,11 @@ int sdw_amd_get_slave_info(struct sdw_amd_ctx *ctx)
|
||||
num_slaves++;
|
||||
}
|
||||
|
||||
ctx->ids = kcalloc(num_slaves, sizeof(*ctx->ids), GFP_KERNEL);
|
||||
if (!ctx->ids)
|
||||
ctx->peripherals = kmalloc(struct_size(ctx->peripherals, array, num_slaves),
|
||||
GFP_KERNEL);
|
||||
if (!ctx->peripherals)
|
||||
return -ENOMEM;
|
||||
ctx->num_slaves = num_slaves;
|
||||
ctx->peripherals->num_peripherals = num_slaves;
|
||||
for (index = 0; index < ctx->count; index++) {
|
||||
if (!(ctx->link_mask & BIT(index)))
|
||||
continue;
|
||||
@ -215,8 +216,7 @@ int sdw_amd_get_slave_info(struct sdw_amd_ctx *ctx)
|
||||
if (amd_manager) {
|
||||
bus = &amd_manager->bus;
|
||||
list_for_each_entry(slave, &bus->slaves, node) {
|
||||
ctx->ids[i].id = slave->id;
|
||||
ctx->ids[i].link_id = bus->link_id;
|
||||
ctx->peripherals->array[i] = slave;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -175,6 +175,9 @@ static int intel_link_power_up(struct sdw_intel *sdw)
|
||||
__func__, ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
hdac_bus_eml_enable_interrupt_unlocked(sdw->link_res->hbus, true,
|
||||
AZX_REG_ML_LEPTR_ID_SDW, true);
|
||||
}
|
||||
|
||||
*shim_mask |= BIT(link_id);
|
||||
@ -201,6 +204,10 @@ static int intel_link_power_down(struct sdw_intel *sdw)
|
||||
|
||||
*shim_mask &= ~BIT(link_id);
|
||||
|
||||
if (!*shim_mask)
|
||||
hdac_bus_eml_enable_interrupt_unlocked(sdw->link_res->hbus, true,
|
||||
AZX_REG_ML_LEPTR_ID_SDW, false);
|
||||
|
||||
ret = hdac_bus_eml_sdw_power_down_unlocked(sdw->link_res->hbus, link_id);
|
||||
if (ret < 0) {
|
||||
dev_err(sdw->cdns.dev, "%s: hdac_bus_eml_sdw_power_down failed: %d\n",
|
||||
|
@ -252,17 +252,16 @@ static struct sdw_intel_ctx
|
||||
num_slaves++;
|
||||
}
|
||||
|
||||
ctx->ids = kcalloc(num_slaves, sizeof(*ctx->ids), GFP_KERNEL);
|
||||
if (!ctx->ids)
|
||||
ctx->peripherals = kmalloc(struct_size(ctx->peripherals, array, num_slaves),
|
||||
GFP_KERNEL);
|
||||
if (!ctx->peripherals)
|
||||
goto err;
|
||||
|
||||
ctx->num_slaves = num_slaves;
|
||||
ctx->peripherals->num_peripherals = num_slaves;
|
||||
i = 0;
|
||||
list_for_each_entry(link, &ctx->link_list, list) {
|
||||
bus = &link->cdns->bus;
|
||||
list_for_each_entry(slave, &bus->slaves, node) {
|
||||
ctx->ids[i].id = slave->id;
|
||||
ctx->ids[i].link_id = bus->link_id;
|
||||
ctx->peripherals->array[i] = slave;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@ -371,7 +370,7 @@ void sdw_intel_exit(struct sdw_intel_ctx *ctx)
|
||||
}
|
||||
|
||||
sdw_intel_cleanup(ctx);
|
||||
kfree(ctx->ids);
|
||||
kfree(ctx->peripherals);
|
||||
kfree(ctx->ldev);
|
||||
kfree(ctx);
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/soundwire/sdw.h>
|
||||
#include <linux/soundwire/sdw_type.h>
|
||||
#include <sound/sdca.h>
|
||||
#include "bus.h"
|
||||
#include "sysfs_local.h"
|
||||
|
||||
@ -70,6 +71,17 @@ int sdw_slave_add(struct sdw_bus *bus,
|
||||
list_add_tail(&slave->node, &bus->slaves);
|
||||
mutex_unlock(&bus->bus_lock);
|
||||
|
||||
/*
|
||||
* The Soundwire driver probe may optionally register SDCA
|
||||
* sub-devices, one per Function. This means the information
|
||||
* on the SDCA revision and the number/type of Functions need
|
||||
* to be extracted from platform firmware before the SoundWire
|
||||
* driver probe, and as a consequence before the SoundWire
|
||||
* device_register() below.
|
||||
*/
|
||||
sdca_lookup_interface_revision(slave);
|
||||
sdca_lookup_functions(slave);
|
||||
|
||||
ret = device_register(&slave->dev);
|
||||
if (ret) {
|
||||
dev_err(bus->dev, "Failed to add slave: ret %d\n", ret);
|
||||
@ -259,3 +271,5 @@ int sdw_of_find_slaves(struct sdw_bus *bus)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
MODULE_IMPORT_NS(SND_SOC_SDCA);
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/bitfield.h>
|
||||
#include <sound/sdca.h>
|
||||
|
||||
struct sdw_bus;
|
||||
struct sdw_slave;
|
||||
@ -488,9 +489,9 @@ struct sdw_slave_id {
|
||||
__u8 sdw_version:4;
|
||||
};
|
||||
|
||||
struct sdw_extended_slave_id {
|
||||
int link_id;
|
||||
struct sdw_slave_id id;
|
||||
struct sdw_peripherals {
|
||||
int num_peripherals;
|
||||
struct sdw_slave *array[];
|
||||
};
|
||||
|
||||
/*
|
||||
@ -663,6 +664,7 @@ struct sdw_slave_ops {
|
||||
* @is_mockup_device: status flag used to squelch errors in the command/control
|
||||
* protocol for SoundWire mockup devices
|
||||
* @sdw_dev_lock: mutex used to protect callbacks/remove races
|
||||
* @sdca_data: structure containing all device data for SDCA helpers
|
||||
*/
|
||||
struct sdw_slave {
|
||||
struct sdw_slave_id id;
|
||||
@ -686,6 +688,7 @@ struct sdw_slave {
|
||||
bool first_interrupt_done;
|
||||
bool is_mockup_device;
|
||||
struct mutex sdw_dev_lock; /* protect callbacks/remove races */
|
||||
struct sdca_device_data sdca_data;
|
||||
};
|
||||
|
||||
#define dev_to_sdw_dev(_dev) container_of(_dev, struct sdw_slave, dev)
|
||||
|
@ -115,19 +115,16 @@ struct sdw_amd_acpi_info {
|
||||
* struct sdw_amd_ctx - context allocated by the controller driver probe
|
||||
*
|
||||
* @count: link count
|
||||
* @num_slaves: total number of devices exposed across all enabled links
|
||||
* @link_mask: bit-wise mask listing SoundWire links reported by the
|
||||
* Controller
|
||||
* @ids: array of slave_id, representing Slaves exposed across all enabled
|
||||
* links
|
||||
* @pdev: platform device structure
|
||||
* @peripherals: array representing Peripherals exposed across all enabled links
|
||||
*/
|
||||
struct sdw_amd_ctx {
|
||||
int count;
|
||||
int num_slaves;
|
||||
u32 link_mask;
|
||||
struct sdw_extended_slave_id *ids;
|
||||
struct platform_device *pdev[AMD_SDW_MAX_MANAGER_COUNT];
|
||||
struct sdw_peripherals *peripherals;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -4,6 +4,7 @@
|
||||
#ifndef __SDW_INTEL_H
|
||||
#define __SDW_INTEL_H
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/irqreturn.h>
|
||||
#include <linux/soundwire/sdw.h>
|
||||
|
||||
@ -286,31 +287,28 @@ struct hdac_bus;
|
||||
* hardware capabilities after all power dependencies are settled.
|
||||
* @link_mask: bit-wise mask listing SoundWire links reported by the
|
||||
* Controller
|
||||
* @num_slaves: total number of devices exposed across all enabled links
|
||||
* @handle: ACPI parent handle
|
||||
* @ldev: information for each link (controller-specific and kept
|
||||
* opaque here)
|
||||
* @ids: array of slave_id, representing Slaves exposed across all enabled
|
||||
* links
|
||||
* @link_list: list to handle interrupts across all links
|
||||
* @shim_lock: mutex to handle concurrent rmw access to shared SHIM registers.
|
||||
* @shim_mask: flags to track initialization of SHIM shared registers
|
||||
* @shim_base: sdw shim base.
|
||||
* @alh_base: sdw alh base.
|
||||
* @peripherals: array representing Peripherals exposed across all enabled links
|
||||
*/
|
||||
struct sdw_intel_ctx {
|
||||
int count;
|
||||
void __iomem *mmio_base;
|
||||
u32 link_mask;
|
||||
int num_slaves;
|
||||
acpi_handle handle;
|
||||
struct sdw_intel_link_dev **ldev;
|
||||
struct sdw_extended_slave_id *ids;
|
||||
struct list_head link_list;
|
||||
struct mutex shim_lock; /* lock for access to shared SHIM registers */
|
||||
u32 shim_mask;
|
||||
u32 shim_base;
|
||||
u32 alh_base;
|
||||
struct sdw_peripherals *peripherals;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1,33 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* Analog Devices ADAU1373 Audio Codec drive
|
||||
*
|
||||
* Copyright 2011 Analog Devices Inc.
|
||||
* Author: Lars-Peter Clausen <lars@metafoo.de>
|
||||
*/
|
||||
|
||||
#ifndef __SOUND_ADAU1373_H__
|
||||
#define __SOUND_ADAU1373_H__
|
||||
|
||||
enum adau1373_micbias_voltage {
|
||||
ADAU1373_MICBIAS_2_9V = 0,
|
||||
ADAU1373_MICBIAS_2_2V = 1,
|
||||
ADAU1373_MICBIAS_2_6V = 2,
|
||||
ADAU1373_MICBIAS_1_8V = 3,
|
||||
};
|
||||
|
||||
#define ADAU1373_DRC_SIZE 13
|
||||
|
||||
struct adau1373_platform_data {
|
||||
bool input_differential[4];
|
||||
bool lineout_differential;
|
||||
bool lineout_ground_sense;
|
||||
|
||||
unsigned int num_drc;
|
||||
uint8_t drc_setting[3][ADAU1373_DRC_SIZE];
|
||||
|
||||
enum adau1373_micbias_voltage micbias1;
|
||||
enum adau1373_micbias_voltage micbias2;
|
||||
};
|
||||
|
||||
#endif
|
@ -19,6 +19,30 @@
|
||||
|
||||
struct snd_compr_ops;
|
||||
|
||||
/**
|
||||
* struct snd_compr_task_runtime: task runtime description
|
||||
* @list: list of all managed tasks
|
||||
* @input: input DMA buffer
|
||||
* @output: output DMA buffer
|
||||
* @seqno: sequence number
|
||||
* @input_size: really used data in the input buffer
|
||||
* @output_size: really used data in the output buffer
|
||||
* @flags: see SND_COMPRESS_TFLG_*
|
||||
* @state: actual task state
|
||||
* @private_value: used by the lowlevel driver (opaque)
|
||||
*/
|
||||
struct snd_compr_task_runtime {
|
||||
struct list_head list;
|
||||
struct dma_buf *input;
|
||||
struct dma_buf *output;
|
||||
u64 seqno;
|
||||
u64 input_size;
|
||||
u64 output_size;
|
||||
u32 flags;
|
||||
u8 state;
|
||||
void *private_value;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct snd_compr_runtime: runtime stream description
|
||||
* @state: stream state
|
||||
@ -37,6 +61,10 @@ struct snd_compr_ops;
|
||||
* @dma_addr: physical buffer address (not accessible from main CPU)
|
||||
* @dma_bytes: size of DMA area
|
||||
* @dma_buffer_p: runtime dma buffer pointer
|
||||
* @active_tasks: count of active tasks
|
||||
* @total_tasks: count of all tasks
|
||||
* @task_seqno: last task sequence number (!= 0)
|
||||
* @tasks: list of all tasks
|
||||
*/
|
||||
struct snd_compr_runtime {
|
||||
snd_pcm_state_t state;
|
||||
@ -54,6 +82,13 @@ struct snd_compr_runtime {
|
||||
dma_addr_t dma_addr;
|
||||
size_t dma_bytes;
|
||||
struct snd_dma_buffer *dma_buffer_p;
|
||||
|
||||
#if IS_ENABLED(CONFIG_SND_COMPRESS_ACCEL)
|
||||
u32 active_tasks;
|
||||
u32 total_tasks;
|
||||
u64 task_seqno;
|
||||
struct list_head tasks;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
@ -108,6 +143,10 @@ struct snd_compr_stream {
|
||||
* Not valid if copy is implemented
|
||||
* @get_caps: Retrieve DSP capabilities, mandatory
|
||||
* @get_codec_caps: Retrieve capabilities for a specific codec, mandatory
|
||||
* @task_create: Create a set of input/output buffers for accel operations
|
||||
* @task_start: Start (queue) a task for accel operations
|
||||
* @task_stop: Stop (dequeue) a task for accel operations
|
||||
* @task_free: Free a set of input/output buffers for accel operations
|
||||
*/
|
||||
struct snd_compr_ops {
|
||||
int (*open)(struct snd_compr_stream *stream);
|
||||
@ -132,6 +171,12 @@ struct snd_compr_ops {
|
||||
struct snd_compr_caps *caps);
|
||||
int (*get_codec_caps) (struct snd_compr_stream *stream,
|
||||
struct snd_compr_codec_caps *codec);
|
||||
#if IS_ENABLED(CONFIG_SND_COMPRESS_ACCEL)
|
||||
int (*task_create) (struct snd_compr_stream *stream, struct snd_compr_task_runtime *task);
|
||||
int (*task_start) (struct snd_compr_stream *stream, struct snd_compr_task_runtime *task);
|
||||
int (*task_stop) (struct snd_compr_stream *stream, struct snd_compr_task_runtime *task);
|
||||
int (*task_free) (struct snd_compr_stream *stream, struct snd_compr_task_runtime *task);
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
@ -242,4 +287,9 @@ int snd_compr_free_pages(struct snd_compr_stream *stream);
|
||||
int snd_compr_stop_error(struct snd_compr_stream *stream,
|
||||
snd_pcm_state_t state);
|
||||
|
||||
#if IS_ENABLED(CONFIG_SND_COMPRESS_ACCEL)
|
||||
void snd_compr_task_finished(struct snd_compr_stream *stream,
|
||||
struct snd_compr_task_runtime *task);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -15,6 +15,7 @@ int hda_bus_ml_init(struct hdac_bus *bus);
|
||||
void hda_bus_ml_free(struct hdac_bus *bus);
|
||||
|
||||
int hdac_bus_eml_get_count(struct hdac_bus *bus, bool alt, int elid);
|
||||
void hdac_bus_eml_enable_interrupt_unlocked(struct hdac_bus *bus, bool alt, int elid, bool enable);
|
||||
void hdac_bus_eml_enable_interrupt(struct hdac_bus *bus, bool alt, int elid, bool enable);
|
||||
bool hdac_bus_eml_check_interrupt(struct hdac_bus *bus, bool alt, int elid);
|
||||
|
||||
@ -71,6 +72,9 @@ static inline void hda_bus_ml_free(struct hdac_bus *bus) { }
|
||||
static inline int
|
||||
hdac_bus_eml_get_count(struct hdac_bus *bus, bool alt, int elid) { return 0; }
|
||||
|
||||
static inline void
|
||||
hdac_bus_eml_enable_interrupt_unlocked(struct hdac_bus *bus, bool alt, int elid, bool enable) { }
|
||||
|
||||
static inline void
|
||||
hdac_bus_eml_enable_interrupt(struct hdac_bus *bus, bool alt, int elid, bool enable) { }
|
||||
|
||||
|
@ -180,7 +180,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
|
||||
#define SD_STS_FIFO_READY 0x20 /* FIFO ready */
|
||||
|
||||
/* INTCTL and INTSTS */
|
||||
#define AZX_INT_ALL_STREAM 0xff /* all stream interrupts */
|
||||
#define AZX_INT_ALL_STREAM 0x3fffffff /* all stream interrupts */
|
||||
#define AZX_INT_CTRL_EN 0x40000000 /* controller interrupt enable bit */
|
||||
#define AZX_INT_GLOBAL_EN 0x80000000 /* global interrupt enable bit */
|
||||
|
||||
|
@ -97,11 +97,11 @@ struct snd_pcm_ops {
|
||||
|
||||
#define SNDRV_PCM_TRIGGER_STOP 0
|
||||
#define SNDRV_PCM_TRIGGER_START 1
|
||||
#define SNDRV_PCM_TRIGGER_PAUSE_PUSH 3
|
||||
#define SNDRV_PCM_TRIGGER_PAUSE_RELEASE 4
|
||||
#define SNDRV_PCM_TRIGGER_SUSPEND 5
|
||||
#define SNDRV_PCM_TRIGGER_RESUME 6
|
||||
#define SNDRV_PCM_TRIGGER_DRAIN 7
|
||||
#define SNDRV_PCM_TRIGGER_PAUSE_PUSH 2
|
||||
#define SNDRV_PCM_TRIGGER_PAUSE_RELEASE 3
|
||||
#define SNDRV_PCM_TRIGGER_SUSPEND 4
|
||||
#define SNDRV_PCM_TRIGGER_RESUME 5
|
||||
#define SNDRV_PCM_TRIGGER_DRAIN 6
|
||||
|
||||
#define SNDRV_PCM_POS_XRUN ((snd_pcm_uframes_t)-1)
|
||||
|
||||
@ -1393,30 +1393,6 @@ snd_pcm_sgbuf_get_chunk_size(struct snd_pcm_substream *substream,
|
||||
return snd_sgbuf_get_chunk_size(snd_pcm_get_dma_buf(substream), ofs, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_pcm_mmap_data_open - increase the mmap counter
|
||||
* @area: VMA
|
||||
*
|
||||
* PCM mmap callback should handle this counter properly
|
||||
*/
|
||||
static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area)
|
||||
{
|
||||
struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
|
||||
atomic_inc(&substream->mmap_count);
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_pcm_mmap_data_close - decrease the mmap counter
|
||||
* @area: VMA
|
||||
*
|
||||
* PCM mmap callback should handle this counter properly
|
||||
*/
|
||||
static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area)
|
||||
{
|
||||
struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
|
||||
atomic_dec(&substream->mmap_count);
|
||||
}
|
||||
|
||||
int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
|
||||
struct vm_area_struct *area);
|
||||
/* mmap for io-memory area */
|
||||
|
62
include/sound/sdca.h
Normal file
62
include/sound/sdca.h
Normal file
@ -0,0 +1,62 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* The MIPI SDCA specification is available for public downloads at
|
||||
* https://www.mipi.org/mipi-sdca-v1-0-download
|
||||
*
|
||||
* Copyright(c) 2024 Intel Corporation
|
||||
*/
|
||||
|
||||
#ifndef __SDCA_H__
|
||||
#define __SDCA_H__
|
||||
|
||||
struct sdw_slave;
|
||||
|
||||
#define SDCA_MAX_FUNCTION_COUNT 8
|
||||
|
||||
/**
|
||||
* sdca_device_desc - short descriptor for an SDCA Function
|
||||
* @adr: ACPI address (used for SDCA register access)
|
||||
* @type: Function topology type
|
||||
* @name: human-readable string
|
||||
*/
|
||||
struct sdca_function_desc {
|
||||
u64 adr;
|
||||
u32 type;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
/**
|
||||
* sdca_device_data - structure containing all SDCA related information
|
||||
* @sdca_interface_revision: value read from _DSD property, mainly to check
|
||||
* for changes between silicon versions
|
||||
* @num_functions: total number of supported SDCA functions. Invalid/unsupported
|
||||
* functions will be skipped.
|
||||
* @sdca_func: array of function descriptors
|
||||
*/
|
||||
struct sdca_device_data {
|
||||
u32 interface_revision;
|
||||
int num_functions;
|
||||
struct sdca_function_desc sdca_func[SDCA_MAX_FUNCTION_COUNT];
|
||||
};
|
||||
|
||||
enum sdca_quirk {
|
||||
SDCA_QUIRKS_RT712_VB,
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_SND_SOC_SDCA)
|
||||
|
||||
void sdca_lookup_functions(struct sdw_slave *slave);
|
||||
void sdca_lookup_interface_revision(struct sdw_slave *slave);
|
||||
bool sdca_device_quirk_match(struct sdw_slave *slave, enum sdca_quirk quirk);
|
||||
|
||||
#else
|
||||
|
||||
static inline void sdca_lookup_functions(struct sdw_slave *slave) {}
|
||||
static inline void sdca_lookup_interface_revision(struct sdw_slave *slave) {}
|
||||
static inline bool sdca_device_quirk_match(struct sdw_slave *slave, enum sdca_quirk quirk)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
55
include/sound/sdca_function.h
Normal file
55
include/sound/sdca_function.h
Normal file
@ -0,0 +1,55 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* The MIPI SDCA specification is available for public downloads at
|
||||
* https://www.mipi.org/mipi-sdca-v1-0-download
|
||||
*
|
||||
* Copyright(c) 2024 Intel Corporation
|
||||
*/
|
||||
|
||||
#ifndef __SDCA_FUNCTION_H__
|
||||
#define __SDCA_FUNCTION_H__
|
||||
|
||||
/*
|
||||
* SDCA Function Types from SDCA specification v1.0a Section 5.1.2
|
||||
* all Function types not described are reserved
|
||||
* Note that SIMPLE_AMP, SIMPLE_MIC and SIMPLE_JACK Function Types
|
||||
* are NOT defined in SDCA 1.0a, but they were defined in earlier
|
||||
* drafts and are planned for 1.1.
|
||||
*/
|
||||
|
||||
enum sdca_function_type {
|
||||
SDCA_FUNCTION_TYPE_SMART_AMP = 0x01, /* Amplifier with protection features */
|
||||
SDCA_FUNCTION_TYPE_SIMPLE_AMP = 0x02, /* subset of SmartAmp */
|
||||
SDCA_FUNCTION_TYPE_SMART_MIC = 0x03, /* Smart microphone with acoustic triggers */
|
||||
SDCA_FUNCTION_TYPE_SIMPLE_MIC = 0x04, /* subset of SmartMic */
|
||||
SDCA_FUNCTION_TYPE_SPEAKER_MIC = 0x05, /* Combination of SmartMic and SmartAmp */
|
||||
SDCA_FUNCTION_TYPE_UAJ = 0x06, /* 3.5mm Universal Audio jack */
|
||||
SDCA_FUNCTION_TYPE_RJ = 0x07, /* Retaskable jack */
|
||||
SDCA_FUNCTION_TYPE_SIMPLE_JACK = 0x08, /* Subset of UAJ */
|
||||
SDCA_FUNCTION_TYPE_HID = 0x0A, /* Human Interface Device, for e.g. buttons */
|
||||
SDCA_FUNCTION_TYPE_IMP_DEF = 0x1F, /* Implementation-defined function */
|
||||
};
|
||||
|
||||
/* Human-readable names used for kernel logs and Function device registration/bind */
|
||||
#define SDCA_FUNCTION_TYPE_SMART_AMP_NAME "SmartAmp"
|
||||
#define SDCA_FUNCTION_TYPE_SIMPLE_AMP_NAME "SimpleAmp"
|
||||
#define SDCA_FUNCTION_TYPE_SMART_MIC_NAME "SmartMic"
|
||||
#define SDCA_FUNCTION_TYPE_SIMPLE_MIC_NAME "SimpleMic"
|
||||
#define SDCA_FUNCTION_TYPE_SPEAKER_MIC_NAME "SpeakerMic"
|
||||
#define SDCA_FUNCTION_TYPE_UAJ_NAME "UAJ"
|
||||
#define SDCA_FUNCTION_TYPE_RJ_NAME "RJ"
|
||||
#define SDCA_FUNCTION_TYPE_SIMPLE_NAME "SimpleJack"
|
||||
#define SDCA_FUNCTION_TYPE_HID_NAME "HID"
|
||||
|
||||
enum sdca_entity0_controls {
|
||||
SDCA_CONTROL_ENTITY_0_COMMIT_GROUP_MASK = 0x01,
|
||||
SDCA_CONTROL_ENTITY_0_INTSTAT_CLEAR = 0x02,
|
||||
SDCA_CONTROL_ENTITY_0_INT_ENABLE = 0x03,
|
||||
SDCA_CONTROL_ENTITY_0_FUNCTION_SDCA_VERSION = 0x04,
|
||||
SDCA_CONTROL_ENTITY_0_FUNCTION_TOPOLOGY = 0x05,
|
||||
SDCA_CONTROL_ENTITY_0_FUNCTION_MANUFACTURER_ID = 0x06,
|
||||
SDCA_CONTROL_ENTITY_0_FUNCTION_ID = 0x07,
|
||||
SDCA_CONTROL_ENTITY_0_FUNCTION_VERSION = 0x08
|
||||
};
|
||||
|
||||
#endif
|
@ -185,6 +185,10 @@ struct snd_soc_acpi_link_adr {
|
||||
* ACPI ID alone is not sufficient, wrong or misleading
|
||||
* @quirk_data: data used to uniquely identify a machine, usually a list of
|
||||
* audio codecs whose presence if checked with ACPI
|
||||
* @machine_check: pointer to quirk function. The functionality is similar to
|
||||
* the use of @machine_quirk, except that the return value is a boolean: the intent
|
||||
* is to skip a machine if the additional hardware/firmware verification invalidates
|
||||
* the initial selection in the snd_soc_acpi_mach table.
|
||||
* @pdata: intended for platform data or machine specific-ops. This structure
|
||||
* is not constant since this field may be updated at run-time
|
||||
* @sof_tplg_filename: Sound Open Firmware topology file name, if enabled
|
||||
@ -203,6 +207,7 @@ struct snd_soc_acpi_mach {
|
||||
const char *board;
|
||||
struct snd_soc_acpi_mach * (*machine_quirk)(void *arg);
|
||||
const void *quirk_data;
|
||||
bool (*machine_check)(void *arg);
|
||||
void *pdata;
|
||||
struct snd_soc_acpi_mach_params mach_params;
|
||||
const char *sof_tplg_filename;
|
||||
@ -233,7 +238,6 @@ static inline bool snd_soc_acpi_sof_parent(struct device *dev)
|
||||
|
||||
bool snd_soc_acpi_sdw_link_slaves_found(struct device *dev,
|
||||
const struct snd_soc_acpi_link_adr *link,
|
||||
struct sdw_extended_slave_id *ids,
|
||||
int num_slaves);
|
||||
struct sdw_peripherals *peripherals);
|
||||
|
||||
#endif
|
||||
|
@ -216,8 +216,7 @@ void snd_soc_dai_shutdown(struct snd_soc_dai *dai,
|
||||
struct snd_pcm_substream *substream, int rollback);
|
||||
void snd_soc_dai_suspend(struct snd_soc_dai *dai);
|
||||
void snd_soc_dai_resume(struct snd_soc_dai *dai);
|
||||
int snd_soc_dai_compress_new(struct snd_soc_dai *dai,
|
||||
struct snd_soc_pcm_runtime *rtd, int num);
|
||||
int snd_soc_dai_compress_new(struct snd_soc_dai *dai, struct snd_soc_pcm_runtime *rtd);
|
||||
bool snd_soc_dai_stream_valid(const struct snd_soc_dai *dai, int stream);
|
||||
void snd_soc_dai_action(struct snd_soc_dai *dai,
|
||||
int stream, int action);
|
||||
@ -275,7 +274,7 @@ struct snd_soc_dai_ops {
|
||||
int (*probe)(struct snd_soc_dai *dai);
|
||||
int (*remove)(struct snd_soc_dai *dai);
|
||||
/* compress dai */
|
||||
int (*compress_new)(struct snd_soc_pcm_runtime *rtd, int num);
|
||||
int (*compress_new)(struct snd_soc_pcm_runtime *rtd);
|
||||
/* Optional Callback used at pcm creation*/
|
||||
int (*pcm_new)(struct snd_soc_pcm_runtime *rtd,
|
||||
struct snd_soc_dai *dai);
|
||||
@ -450,9 +449,9 @@ struct snd_soc_dai {
|
||||
struct snd_soc_dai_stream stream[SNDRV_PCM_STREAM_LAST + 1];
|
||||
|
||||
/* Symmetry data - only valid if symmetry is being enforced */
|
||||
unsigned int rate;
|
||||
unsigned int channels;
|
||||
unsigned int sample_bits;
|
||||
unsigned int symmetric_rate;
|
||||
unsigned int symmetric_channels;
|
||||
unsigned int symmetric_sample_bits;
|
||||
|
||||
/* parent platform/codec */
|
||||
struct snd_soc_component *component;
|
||||
|
@ -486,11 +486,11 @@ struct snd_soc_component *snd_soc_lookup_component_nolocked(struct device *dev,
|
||||
struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
|
||||
const char *driver_name);
|
||||
|
||||
int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num);
|
||||
int soc_new_pcm(struct snd_soc_pcm_runtime *rtd);
|
||||
#ifdef CONFIG_SND_SOC_COMPRESS
|
||||
int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num);
|
||||
int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd);
|
||||
#else
|
||||
static inline int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
|
||||
static inline int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -541,8 +541,13 @@ int snd_soc_tdm_params_to_bclk(const struct snd_pcm_hw_params *params,
|
||||
int tdm_width, int tdm_slots, int slot_multiple);
|
||||
|
||||
/* set runtime hw params */
|
||||
int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
|
||||
const struct snd_pcm_hardware *hw);
|
||||
static inline int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
|
||||
const struct snd_pcm_hardware *hw)
|
||||
{
|
||||
substream->runtime->hw = *hw;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct snd_ac97 *snd_soc_alloc_ac97_component(struct snd_soc_component *component);
|
||||
struct snd_ac97 *snd_soc_new_ac97_component(struct snd_soc_component *component,
|
||||
@ -815,11 +820,6 @@ struct snd_soc_dai_link {
|
||||
/* This DAI link can route to other DAI links at runtime (Frontend)*/
|
||||
unsigned int dynamic:1;
|
||||
|
||||
/* REMOVE ME */
|
||||
/* DPCM capture and Playback support */
|
||||
unsigned int dpcm_capture:1;
|
||||
unsigned int dpcm_playback:1;
|
||||
|
||||
/* DPCM used FE & BE merged format */
|
||||
unsigned int dpcm_merged_format:1;
|
||||
/* DPCM used FE & BE merged channel */
|
||||
@ -1195,7 +1195,7 @@ struct snd_soc_pcm_runtime {
|
||||
struct dentry *debugfs_dpcm_root;
|
||||
#endif
|
||||
|
||||
unsigned int num; /* 0-based and monotonic increasing */
|
||||
unsigned int id; /* 0-based and monotonic increasing */
|
||||
struct list_head list; /* rtd list of the soc card */
|
||||
|
||||
/* function mark */
|
||||
@ -1438,10 +1438,6 @@ struct snd_soc_dai *snd_soc_get_dai_via_args(const struct of_phandle_args *dai_a
|
||||
struct snd_soc_dai *snd_soc_register_dai(struct snd_soc_component *component,
|
||||
struct snd_soc_dai_driver *dai_drv,
|
||||
bool legacy_dai_naming);
|
||||
struct snd_soc_dai *devm_snd_soc_register_dai(struct device *dev,
|
||||
struct snd_soc_component *component,
|
||||
struct snd_soc_dai_driver *dai_drv,
|
||||
bool legacy_dai_naming);
|
||||
void snd_soc_unregister_dai(struct snd_soc_dai *dai);
|
||||
|
||||
struct snd_soc_dai *snd_soc_find_dai(
|
||||
|
@ -28,6 +28,7 @@
|
||||
* - SOC_SDW_CODEC_SPKR | SOF_SIDECAR_AMPS - Not currently supported
|
||||
*/
|
||||
#define SOC_SDW_SIDECAR_AMPS BIT(16)
|
||||
#define SOC_SDW_CODEC_MIC BIT(17)
|
||||
|
||||
#define SOC_SDW_UNUSED_DAI_ID -1
|
||||
#define SOC_SDW_JACK_OUT_DAI_ID 0
|
||||
@ -59,6 +60,7 @@ struct asoc_sdw_dai_info {
|
||||
int (*rtd_init)(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
|
||||
bool rtd_init_done; /* Indicate that the rtd_init callback is done */
|
||||
unsigned long quirk;
|
||||
bool quirk_exclude;
|
||||
};
|
||||
|
||||
struct asoc_sdw_codec_info {
|
||||
@ -150,14 +152,15 @@ void asoc_sdw_init_dai_link(struct device *dev, struct snd_soc_dai_link *dai_lin
|
||||
struct snd_soc_dai_link_component *cpus, int cpus_num,
|
||||
struct snd_soc_dai_link_component *platform_component,
|
||||
int num_platforms, struct snd_soc_dai_link_component *codecs,
|
||||
int codecs_num, int (*init)(struct snd_soc_pcm_runtime *rtd),
|
||||
int codecs_num, int no_pcm,
|
||||
int (*init)(struct snd_soc_pcm_runtime *rtd),
|
||||
const struct snd_soc_ops *ops);
|
||||
|
||||
int asoc_sdw_init_simple_dai_link(struct device *dev, struct snd_soc_dai_link *dai_links,
|
||||
int *be_id, char *name, int playback, int capture,
|
||||
const char *cpu_dai_name, const char *platform_comp_name,
|
||||
int num_platforms, const char *codec_name,
|
||||
const char *codec_dai_name,
|
||||
const char *codec_dai_name, int no_pcm,
|
||||
int (*init)(struct snd_soc_pcm_runtime *rtd),
|
||||
const struct snd_soc_ops *ops);
|
||||
|
||||
@ -234,8 +237,7 @@ int asoc_sdw_rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_s
|
||||
int asoc_sdw_rt_amp_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
|
||||
int asoc_sdw_rt700_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
|
||||
int asoc_sdw_rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
|
||||
int asoc_sdw_rt712_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
|
||||
int asoc_sdw_rt722_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
|
||||
int asoc_sdw_rt_mf_sdca_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
|
||||
int asoc_sdw_rt5682_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
|
||||
int asoc_sdw_cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
|
||||
int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
|
||||
|
@ -60,6 +60,7 @@ enum sof_ext_man_elem_type {
|
||||
SOF_EXT_MAN_ELEM_FW_VERSION = 0,
|
||||
SOF_EXT_MAN_ELEM_WINDOW = 1,
|
||||
SOF_EXT_MAN_ELEM_CC_VERSION = 2,
|
||||
SOF_EXT_MAN_ELEM_PROBE_INFO = 3,
|
||||
SOF_EXT_MAN_ELEM_DBG_ABI = 4,
|
||||
SOF_EXT_MAN_ELEM_CONFIG_DATA = 5, /**< ABI3.17 */
|
||||
SOF_EXT_MAN_ELEM_PLATFORM_CONFIG_DATA = 6,
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <sound/compress_params.h>
|
||||
|
||||
|
||||
#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 2, 0)
|
||||
#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 3, 0)
|
||||
/**
|
||||
* struct snd_compressed_buffer - compressed buffer
|
||||
* @fragment_size: size of buffer fragment in bytes
|
||||
@ -68,7 +68,8 @@ struct snd_compr_avail {
|
||||
|
||||
enum snd_compr_direction {
|
||||
SND_COMPRESS_PLAYBACK = 0,
|
||||
SND_COMPRESS_CAPTURE
|
||||
SND_COMPRESS_CAPTURE,
|
||||
SND_COMPRESS_ACCEL
|
||||
};
|
||||
|
||||
/**
|
||||
@ -127,6 +128,59 @@ struct snd_compr_metadata {
|
||||
__u32 value[8];
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
/* flags for struct snd_compr_task */
|
||||
#define SND_COMPRESS_TFLG_NEW_STREAM (1<<0) /* mark for the new stream data */
|
||||
|
||||
/**
|
||||
* struct snd_compr_task - task primitive for non-realtime operation
|
||||
* @seqno: sequence number (task identifier)
|
||||
* @origin_seqno: previous sequence number (task identifier) - for reuse
|
||||
* @input_fd: data input file descriptor (dma-buf)
|
||||
* @output_fd: data output file descriptor (dma-buf)
|
||||
* @input_size: filled data in bytes (from caller, must not exceed fragment size)
|
||||
* @flags: see SND_COMPRESS_TFLG_* defines
|
||||
* @reserved: reserved for future extension
|
||||
*/
|
||||
struct snd_compr_task {
|
||||
__u64 seqno;
|
||||
__u64 origin_seqno;
|
||||
int input_fd;
|
||||
int output_fd;
|
||||
__u64 input_size;
|
||||
__u32 flags;
|
||||
__u8 reserved[16];
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
/**
|
||||
* enum snd_compr_state - task state
|
||||
* @SND_COMPRESS_TASK_STATE_IDLE: task is not queued
|
||||
* @SND_COMPRESS_TASK_STATE_ACTIVE: task is in the queue
|
||||
* @SND_COMPRESS_TASK_STATE_FINISHED: task was processed, output is available
|
||||
*/
|
||||
enum snd_compr_state {
|
||||
SND_COMPRESS_TASK_STATE_IDLE = 0,
|
||||
SND_COMPRESS_TASK_STATE_ACTIVE,
|
||||
SND_COMPRESS_TASK_STATE_FINISHED
|
||||
};
|
||||
|
||||
/**
|
||||
* struct snd_compr_task_status - task status
|
||||
* @seqno: sequence number (task identifier)
|
||||
* @input_size: filled data in bytes (from user space)
|
||||
* @output_size: filled data in bytes (from driver)
|
||||
* @output_flags: reserved for future (all zeros - from driver)
|
||||
* @state: actual task state (SND_COMPRESS_TASK_STATE_*)
|
||||
* @reserved: reserved for future extension
|
||||
*/
|
||||
struct snd_compr_task_status {
|
||||
__u64 seqno;
|
||||
__u64 input_size;
|
||||
__u64 output_size;
|
||||
__u32 output_flags;
|
||||
__u8 state;
|
||||
__u8 reserved[15];
|
||||
} __attribute__((packed, aligned(4)));
|
||||
|
||||
/*
|
||||
* compress path ioctl definitions
|
||||
* SNDRV_COMPRESS_GET_CAPS: Query capability of DSP
|
||||
@ -164,6 +218,14 @@ struct snd_compr_metadata {
|
||||
#define SNDRV_COMPRESS_DRAIN _IO('C', 0x34)
|
||||
#define SNDRV_COMPRESS_NEXT_TRACK _IO('C', 0x35)
|
||||
#define SNDRV_COMPRESS_PARTIAL_DRAIN _IO('C', 0x36)
|
||||
|
||||
|
||||
#define SNDRV_COMPRESS_TASK_CREATE _IOWR('C', 0x60, struct snd_compr_task)
|
||||
#define SNDRV_COMPRESS_TASK_FREE _IOW('C', 0x61, __u64)
|
||||
#define SNDRV_COMPRESS_TASK_START _IOWR('C', 0x62, struct snd_compr_task)
|
||||
#define SNDRV_COMPRESS_TASK_STOP _IOW('C', 0x63, __u64)
|
||||
#define SNDRV_COMPRESS_TASK_STATUS _IOWR('C', 0x68, struct snd_compr_task_status)
|
||||
|
||||
/*
|
||||
* TODO
|
||||
* 1. add mmap support
|
||||
|
@ -271,7 +271,7 @@ static void pxa2xx_ac97_remove(struct platform_device *dev)
|
||||
|
||||
static struct platform_driver pxa2xx_ac97_driver = {
|
||||
.probe = pxa2xx_ac97_probe,
|
||||
.remove_new = pxa2xx_ac97_remove,
|
||||
.remove = pxa2xx_ac97_remove,
|
||||
.driver = {
|
||||
.name = "pxa2xx-ac97",
|
||||
.pm = &pxa2xx_ac97_pm_ops,
|
||||
|
@ -861,7 +861,7 @@ static void atmel_ac97c_remove(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver atmel_ac97c_driver = {
|
||||
.probe = atmel_ac97c_probe,
|
||||
.remove_new = atmel_ac97c_remove,
|
||||
.remove = atmel_ac97c_remove,
|
||||
.driver = {
|
||||
.name = "atmel_ac97c",
|
||||
.pm = ATMEL_AC97C_PM_OPS,
|
||||
|
@ -59,6 +59,9 @@ config SND_CORE_TEST
|
||||
config SND_COMPRESS_OFFLOAD
|
||||
tristate
|
||||
|
||||
config SND_COMPRESS_ACCEL
|
||||
bool
|
||||
|
||||
config SND_JACK
|
||||
bool
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/uio.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/compat.h>
|
||||
#include <sound/core.h>
|
||||
@ -54,6 +55,12 @@ struct snd_compr_file {
|
||||
|
||||
static void error_delayed_work(struct work_struct *work);
|
||||
|
||||
#if IS_ENABLED(CONFIG_SND_COMPRESS_ACCEL)
|
||||
static void snd_compr_task_free_all(struct snd_compr_stream *stream);
|
||||
#else
|
||||
static inline void snd_compr_task_free_all(struct snd_compr_stream *stream) { }
|
||||
#endif
|
||||
|
||||
/*
|
||||
* a note on stream states used:
|
||||
* we use following states in the compressed core
|
||||
@ -85,6 +92,8 @@ static int snd_compr_open(struct inode *inode, struct file *f)
|
||||
dirn = SND_COMPRESS_PLAYBACK;
|
||||
else if ((f->f_flags & O_ACCMODE) == O_RDONLY)
|
||||
dirn = SND_COMPRESS_CAPTURE;
|
||||
else if ((f->f_flags & O_ACCMODE) == O_RDWR)
|
||||
dirn = SND_COMPRESS_ACCEL;
|
||||
else
|
||||
return -EINVAL;
|
||||
|
||||
@ -125,6 +134,9 @@ static int snd_compr_open(struct inode *inode, struct file *f)
|
||||
}
|
||||
runtime->state = SNDRV_PCM_STATE_OPEN;
|
||||
init_waitqueue_head(&runtime->sleep);
|
||||
#if IS_ENABLED(CONFIG_SND_COMPRESS_ACCEL)
|
||||
INIT_LIST_HEAD(&runtime->tasks);
|
||||
#endif
|
||||
data->stream.runtime = runtime;
|
||||
f->private_data = (void *)data;
|
||||
scoped_guard(mutex, &compr->lock)
|
||||
@ -154,6 +166,8 @@ static int snd_compr_free(struct inode *inode, struct file *f)
|
||||
break;
|
||||
}
|
||||
|
||||
snd_compr_task_free_all(&data->stream);
|
||||
|
||||
data->stream.ops->free(&data->stream);
|
||||
if (!data->stream.runtime->dma_buffer_p)
|
||||
kfree(data->stream.runtime->buffer);
|
||||
@ -226,6 +240,9 @@ snd_compr_ioctl_avail(struct snd_compr_stream *stream, unsigned long arg)
|
||||
struct snd_compr_avail ioctl_avail;
|
||||
size_t avail;
|
||||
|
||||
if (stream->direction == SND_COMPRESS_ACCEL)
|
||||
return -EBADFD;
|
||||
|
||||
avail = snd_compr_calc_avail(stream, &ioctl_avail);
|
||||
ioctl_avail.avail = avail;
|
||||
|
||||
@ -287,6 +304,8 @@ static ssize_t snd_compr_write(struct file *f, const char __user *buf,
|
||||
return -EFAULT;
|
||||
|
||||
stream = &data->stream;
|
||||
if (stream->direction == SND_COMPRESS_ACCEL)
|
||||
return -EBADFD;
|
||||
guard(mutex)(&stream->device->lock);
|
||||
/* write is allowed when stream is running or has been setup */
|
||||
switch (stream->runtime->state) {
|
||||
@ -336,6 +355,8 @@ static ssize_t snd_compr_read(struct file *f, char __user *buf,
|
||||
return -EFAULT;
|
||||
|
||||
stream = &data->stream;
|
||||
if (stream->direction == SND_COMPRESS_ACCEL)
|
||||
return -EBADFD;
|
||||
guard(mutex)(&stream->device->lock);
|
||||
|
||||
/* read is allowed when stream is running, paused, draining and setup
|
||||
@ -385,6 +406,7 @@ static __poll_t snd_compr_poll(struct file *f, poll_table *wait)
|
||||
{
|
||||
struct snd_compr_file *data = f->private_data;
|
||||
struct snd_compr_stream *stream;
|
||||
struct snd_compr_runtime *runtime;
|
||||
size_t avail;
|
||||
__poll_t retval = 0;
|
||||
|
||||
@ -392,10 +414,11 @@ static __poll_t snd_compr_poll(struct file *f, poll_table *wait)
|
||||
return EPOLLERR;
|
||||
|
||||
stream = &data->stream;
|
||||
runtime = stream->runtime;
|
||||
|
||||
guard(mutex)(&stream->device->lock);
|
||||
|
||||
switch (stream->runtime->state) {
|
||||
switch (runtime->state) {
|
||||
case SNDRV_PCM_STATE_OPEN:
|
||||
case SNDRV_PCM_STATE_XRUN:
|
||||
return snd_compr_get_poll(stream) | EPOLLERR;
|
||||
@ -403,23 +426,37 @@ static __poll_t snd_compr_poll(struct file *f, poll_table *wait)
|
||||
break;
|
||||
}
|
||||
|
||||
poll_wait(f, &stream->runtime->sleep, wait);
|
||||
poll_wait(f, &runtime->sleep, wait);
|
||||
|
||||
#if IS_ENABLED(CONFIG_SND_COMPRESS_ACCEL)
|
||||
if (stream->direction == SND_COMPRESS_ACCEL) {
|
||||
struct snd_compr_task_runtime *task;
|
||||
if (runtime->fragments > runtime->active_tasks)
|
||||
retval |= EPOLLOUT | EPOLLWRNORM;
|
||||
task = list_first_entry_or_null(&runtime->tasks,
|
||||
struct snd_compr_task_runtime,
|
||||
list);
|
||||
if (task && task->state == SND_COMPRESS_TASK_STATE_FINISHED)
|
||||
retval |= EPOLLIN | EPOLLRDNORM;
|
||||
return retval;
|
||||
}
|
||||
#endif
|
||||
|
||||
avail = snd_compr_get_avail(stream);
|
||||
pr_debug("avail is %ld\n", (unsigned long)avail);
|
||||
/* check if we have at least one fragment to fill */
|
||||
switch (stream->runtime->state) {
|
||||
switch (runtime->state) {
|
||||
case SNDRV_PCM_STATE_DRAINING:
|
||||
/* stream has been woken up after drain is complete
|
||||
* draining done so set stream state to stopped
|
||||
*/
|
||||
retval = snd_compr_get_poll(stream);
|
||||
stream->runtime->state = SNDRV_PCM_STATE_SETUP;
|
||||
runtime->state = SNDRV_PCM_STATE_SETUP;
|
||||
break;
|
||||
case SNDRV_PCM_STATE_RUNNING:
|
||||
case SNDRV_PCM_STATE_PREPARED:
|
||||
case SNDRV_PCM_STATE_PAUSED:
|
||||
if (avail >= stream->runtime->fragment_size)
|
||||
if (avail >= runtime->fragment_size)
|
||||
retval = snd_compr_get_poll(stream);
|
||||
break;
|
||||
default:
|
||||
@ -521,6 +558,9 @@ static int snd_compr_allocate_buffer(struct snd_compr_stream *stream,
|
||||
unsigned int buffer_size;
|
||||
void *buffer = NULL;
|
||||
|
||||
if (stream->direction == SND_COMPRESS_ACCEL)
|
||||
goto params;
|
||||
|
||||
buffer_size = params->buffer.fragment_size * params->buffer.fragments;
|
||||
if (stream->ops->copy) {
|
||||
buffer = NULL;
|
||||
@ -543,18 +583,30 @@ static int snd_compr_allocate_buffer(struct snd_compr_stream *stream,
|
||||
if (!buffer)
|
||||
return -ENOMEM;
|
||||
}
|
||||
stream->runtime->fragment_size = params->buffer.fragment_size;
|
||||
stream->runtime->fragments = params->buffer.fragments;
|
||||
|
||||
stream->runtime->buffer = buffer;
|
||||
stream->runtime->buffer_size = buffer_size;
|
||||
params:
|
||||
stream->runtime->fragment_size = params->buffer.fragment_size;
|
||||
stream->runtime->fragments = params->buffer.fragments;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_compress_check_input(struct snd_compr_params *params)
|
||||
static int
|
||||
snd_compress_check_input(struct snd_compr_stream *stream, struct snd_compr_params *params)
|
||||
{
|
||||
u32 max_fragments;
|
||||
|
||||
/* first let's check the buffer parameter's */
|
||||
if (params->buffer.fragment_size == 0 ||
|
||||
params->buffer.fragments > U32_MAX / params->buffer.fragment_size ||
|
||||
if (params->buffer.fragment_size == 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (stream->direction == SND_COMPRESS_ACCEL)
|
||||
max_fragments = 64; /* safe value */
|
||||
else
|
||||
max_fragments = U32_MAX / params->buffer.fragment_size;
|
||||
|
||||
if (params->buffer.fragments > max_fragments ||
|
||||
params->buffer.fragments == 0)
|
||||
return -EINVAL;
|
||||
|
||||
@ -583,7 +635,7 @@ snd_compr_set_params(struct snd_compr_stream *stream, unsigned long arg)
|
||||
if (IS_ERR(params))
|
||||
return PTR_ERR(params);
|
||||
|
||||
retval = snd_compress_check_input(params);
|
||||
retval = snd_compress_check_input(stream, params);
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
@ -939,6 +991,264 @@ static int snd_compr_partial_drain(struct snd_compr_stream *stream)
|
||||
return snd_compress_wait_for_drain(stream);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_SND_COMPRESS_ACCEL)
|
||||
|
||||
static struct snd_compr_task_runtime *
|
||||
snd_compr_find_task(struct snd_compr_stream *stream, __u64 seqno)
|
||||
{
|
||||
struct snd_compr_task_runtime *task;
|
||||
|
||||
list_for_each_entry(task, &stream->runtime->tasks, list) {
|
||||
if (task->seqno == seqno)
|
||||
return task;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void snd_compr_task_free(struct snd_compr_task_runtime *task)
|
||||
{
|
||||
if (task->output)
|
||||
dma_buf_put(task->output);
|
||||
if (task->input)
|
||||
dma_buf_put(task->input);
|
||||
kfree(task);
|
||||
}
|
||||
|
||||
static u64 snd_compr_seqno_next(struct snd_compr_stream *stream)
|
||||
{
|
||||
u64 seqno = ++stream->runtime->task_seqno;
|
||||
if (seqno == 0)
|
||||
seqno = ++stream->runtime->task_seqno;
|
||||
return seqno;
|
||||
}
|
||||
|
||||
static int snd_compr_task_new(struct snd_compr_stream *stream, struct snd_compr_task *utask)
|
||||
{
|
||||
struct snd_compr_task_runtime *task;
|
||||
int retval;
|
||||
|
||||
if (stream->runtime->total_tasks >= stream->runtime->fragments)
|
||||
return -EBUSY;
|
||||
if (utask->origin_seqno != 0 || utask->input_size != 0)
|
||||
return -EINVAL;
|
||||
task = kzalloc(sizeof(*task), GFP_KERNEL);
|
||||
if (task == NULL)
|
||||
return -ENOMEM;
|
||||
task->seqno = utask->seqno = snd_compr_seqno_next(stream);
|
||||
task->input_size = utask->input_size;
|
||||
retval = stream->ops->task_create(stream, task);
|
||||
if (retval < 0)
|
||||
goto cleanup;
|
||||
utask->input_fd = dma_buf_fd(task->input, O_WRONLY|O_CLOEXEC);
|
||||
if (utask->input_fd < 0) {
|
||||
retval = utask->input_fd;
|
||||
goto cleanup;
|
||||
}
|
||||
utask->output_fd = dma_buf_fd(task->output, O_RDONLY|O_CLOEXEC);
|
||||
if (utask->output_fd < 0) {
|
||||
retval = utask->output_fd;
|
||||
goto cleanup;
|
||||
}
|
||||
/* keep dmabuf reference until freed with task free ioctl */
|
||||
dma_buf_get(utask->input_fd);
|
||||
dma_buf_get(utask->output_fd);
|
||||
list_add_tail(&task->list, &stream->runtime->tasks);
|
||||
stream->runtime->total_tasks++;
|
||||
return 0;
|
||||
cleanup:
|
||||
snd_compr_task_free(task);
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int snd_compr_task_create(struct snd_compr_stream *stream, unsigned long arg)
|
||||
{
|
||||
struct snd_compr_task *task __free(kfree) = NULL;
|
||||
int retval;
|
||||
|
||||
if (stream->runtime->state != SNDRV_PCM_STATE_SETUP)
|
||||
return -EPERM;
|
||||
task = memdup_user((void __user *)arg, sizeof(*task));
|
||||
if (IS_ERR(task))
|
||||
return PTR_ERR(no_free_ptr(task));
|
||||
retval = snd_compr_task_new(stream, task);
|
||||
if (retval >= 0)
|
||||
if (copy_to_user((void __user *)arg, task, sizeof(*task)))
|
||||
retval = -EFAULT;
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int snd_compr_task_start_prepare(struct snd_compr_task_runtime *task,
|
||||
struct snd_compr_task *utask)
|
||||
{
|
||||
if (task == NULL)
|
||||
return -EINVAL;
|
||||
if (task->state >= SND_COMPRESS_TASK_STATE_FINISHED)
|
||||
return -EBUSY;
|
||||
if (utask->input_size > task->input->size)
|
||||
return -EINVAL;
|
||||
task->flags = utask->flags;
|
||||
task->input_size = utask->input_size;
|
||||
task->state = SND_COMPRESS_TASK_STATE_IDLE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_compr_task_start(struct snd_compr_stream *stream, struct snd_compr_task *utask)
|
||||
{
|
||||
struct snd_compr_task_runtime *task;
|
||||
int retval;
|
||||
|
||||
if (utask->origin_seqno > 0) {
|
||||
task = snd_compr_find_task(stream, utask->origin_seqno);
|
||||
retval = snd_compr_task_start_prepare(task, utask);
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
task->seqno = utask->seqno = snd_compr_seqno_next(stream);
|
||||
utask->origin_seqno = 0;
|
||||
list_move_tail(&task->list, &stream->runtime->tasks);
|
||||
} else {
|
||||
task = snd_compr_find_task(stream, utask->seqno);
|
||||
if (task && task->state != SND_COMPRESS_TASK_STATE_IDLE)
|
||||
return -EBUSY;
|
||||
retval = snd_compr_task_start_prepare(task, utask);
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
}
|
||||
retval = stream->ops->task_start(stream, task);
|
||||
if (retval >= 0) {
|
||||
task->state = SND_COMPRESS_TASK_STATE_ACTIVE;
|
||||
stream->runtime->active_tasks++;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int snd_compr_task_start_ioctl(struct snd_compr_stream *stream, unsigned long arg)
|
||||
{
|
||||
struct snd_compr_task *task __free(kfree) = NULL;
|
||||
int retval;
|
||||
|
||||
if (stream->runtime->state != SNDRV_PCM_STATE_SETUP)
|
||||
return -EPERM;
|
||||
task = memdup_user((void __user *)arg, sizeof(*task));
|
||||
if (IS_ERR(task))
|
||||
return PTR_ERR(no_free_ptr(task));
|
||||
retval = snd_compr_task_start(stream, task);
|
||||
if (retval >= 0)
|
||||
if (copy_to_user((void __user *)arg, task, sizeof(*task)))
|
||||
retval = -EFAULT;
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void snd_compr_task_stop_one(struct snd_compr_stream *stream,
|
||||
struct snd_compr_task_runtime *task)
|
||||
{
|
||||
if (task->state != SND_COMPRESS_TASK_STATE_ACTIVE)
|
||||
return;
|
||||
stream->ops->task_stop(stream, task);
|
||||
if (!snd_BUG_ON(stream->runtime->active_tasks == 0))
|
||||
stream->runtime->active_tasks--;
|
||||
list_move_tail(&task->list, &stream->runtime->tasks);
|
||||
task->state = SND_COMPRESS_TASK_STATE_IDLE;
|
||||
}
|
||||
|
||||
static void snd_compr_task_free_one(struct snd_compr_stream *stream,
|
||||
struct snd_compr_task_runtime *task)
|
||||
{
|
||||
snd_compr_task_stop_one(stream, task);
|
||||
stream->ops->task_free(stream, task);
|
||||
list_del(&task->list);
|
||||
snd_compr_task_free(task);
|
||||
stream->runtime->total_tasks--;
|
||||
}
|
||||
|
||||
static void snd_compr_task_free_all(struct snd_compr_stream *stream)
|
||||
{
|
||||
struct snd_compr_task_runtime *task, *temp;
|
||||
|
||||
list_for_each_entry_safe_reverse(task, temp, &stream->runtime->tasks, list)
|
||||
snd_compr_task_free_one(stream, task);
|
||||
}
|
||||
|
||||
typedef void (*snd_compr_seq_func_t)(struct snd_compr_stream *stream,
|
||||
struct snd_compr_task_runtime *task);
|
||||
|
||||
static int snd_compr_task_seq(struct snd_compr_stream *stream, unsigned long arg,
|
||||
snd_compr_seq_func_t fcn)
|
||||
{
|
||||
struct snd_compr_task_runtime *task;
|
||||
__u64 seqno;
|
||||
int retval;
|
||||
|
||||
if (stream->runtime->state != SNDRV_PCM_STATE_SETUP)
|
||||
return -EPERM;
|
||||
retval = get_user(seqno, (__u64 __user *)arg);
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
retval = 0;
|
||||
if (seqno == 0) {
|
||||
list_for_each_entry_reverse(task, &stream->runtime->tasks, list)
|
||||
fcn(stream, task);
|
||||
} else {
|
||||
task = snd_compr_find_task(stream, seqno);
|
||||
if (task == NULL) {
|
||||
retval = -EINVAL;
|
||||
} else {
|
||||
fcn(stream, task);
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int snd_compr_task_status(struct snd_compr_stream *stream,
|
||||
struct snd_compr_task_status *status)
|
||||
{
|
||||
struct snd_compr_task_runtime *task;
|
||||
|
||||
task = snd_compr_find_task(stream, status->seqno);
|
||||
if (task == NULL)
|
||||
return -EINVAL;
|
||||
status->input_size = task->input_size;
|
||||
status->output_size = task->output_size;
|
||||
status->state = task->state;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_compr_task_status_ioctl(struct snd_compr_stream *stream, unsigned long arg)
|
||||
{
|
||||
struct snd_compr_task_status *status __free(kfree) = NULL;
|
||||
int retval;
|
||||
|
||||
if (stream->runtime->state != SNDRV_PCM_STATE_SETUP)
|
||||
return -EPERM;
|
||||
status = memdup_user((void __user *)arg, sizeof(*status));
|
||||
if (IS_ERR(status))
|
||||
return PTR_ERR(no_free_ptr(status));
|
||||
retval = snd_compr_task_status(stream, status);
|
||||
if (retval >= 0)
|
||||
if (copy_to_user((void __user *)arg, status, sizeof(*status)))
|
||||
retval = -EFAULT;
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_compr_task_finished: Notify that the task was finished
|
||||
* @stream: pointer to stream
|
||||
* @task: runtime task structure
|
||||
*
|
||||
* Set the finished task state and notify waiters.
|
||||
*/
|
||||
void snd_compr_task_finished(struct snd_compr_stream *stream,
|
||||
struct snd_compr_task_runtime *task)
|
||||
{
|
||||
guard(mutex)(&stream->device->lock);
|
||||
if (!snd_BUG_ON(stream->runtime->active_tasks == 0))
|
||||
stream->runtime->active_tasks--;
|
||||
task->state = SND_COMPRESS_TASK_STATE_FINISHED;
|
||||
wake_up(&stream->runtime->sleep);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_compr_task_finished);
|
||||
|
||||
#endif /* CONFIG_SND_COMPRESS_ACCEL */
|
||||
|
||||
static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct snd_compr_file *data = f->private_data;
|
||||
@ -968,6 +1278,27 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
|
||||
return snd_compr_set_metadata(stream, arg);
|
||||
case _IOC_NR(SNDRV_COMPRESS_GET_METADATA):
|
||||
return snd_compr_get_metadata(stream, arg);
|
||||
}
|
||||
|
||||
if (stream->direction == SND_COMPRESS_ACCEL) {
|
||||
#if IS_ENABLED(CONFIG_SND_COMPRESS_ACCEL)
|
||||
switch (_IOC_NR(cmd)) {
|
||||
case _IOC_NR(SNDRV_COMPRESS_TASK_CREATE):
|
||||
return snd_compr_task_create(stream, arg);
|
||||
case _IOC_NR(SNDRV_COMPRESS_TASK_FREE):
|
||||
return snd_compr_task_seq(stream, arg, snd_compr_task_free_one);
|
||||
case _IOC_NR(SNDRV_COMPRESS_TASK_START):
|
||||
return snd_compr_task_start_ioctl(stream, arg);
|
||||
case _IOC_NR(SNDRV_COMPRESS_TASK_STOP):
|
||||
return snd_compr_task_seq(stream, arg, snd_compr_task_stop_one);
|
||||
case _IOC_NR(SNDRV_COMPRESS_TASK_STATUS):
|
||||
return snd_compr_task_status_ioctl(stream, arg);
|
||||
}
|
||||
#endif
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
||||
switch (_IOC_NR(cmd)) {
|
||||
case _IOC_NR(SNDRV_COMPRESS_TSTAMP):
|
||||
return snd_compr_tstamp(stream, arg);
|
||||
case _IOC_NR(SNDRV_COMPRESS_AVAIL):
|
||||
@ -1140,6 +1471,11 @@ int snd_compress_new(struct snd_card *card, int device,
|
||||
};
|
||||
int ret;
|
||||
|
||||
#if !IS_ENABLED(CONFIG_SND_COMPRESS_ACCEL)
|
||||
if (snd_BUG_ON(dirn == SND_COMPRESS_ACCEL))
|
||||
return -EINVAL;
|
||||
#endif
|
||||
|
||||
compr->card = card;
|
||||
compr->device = device;
|
||||
compr->direction = dirn;
|
||||
|
@ -3773,6 +3773,26 @@ static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file
|
||||
}
|
||||
#endif /* coherent mmap */
|
||||
|
||||
/*
|
||||
* snd_pcm_mmap_data_open - increase the mmap counter
|
||||
*/
|
||||
static void snd_pcm_mmap_data_open(struct vm_area_struct *area)
|
||||
{
|
||||
struct snd_pcm_substream *substream = area->vm_private_data;
|
||||
|
||||
atomic_inc(&substream->mmap_count);
|
||||
}
|
||||
|
||||
/*
|
||||
* snd_pcm_mmap_data_close - decrease the mmap counter
|
||||
*/
|
||||
static void snd_pcm_mmap_data_close(struct vm_area_struct *area)
|
||||
{
|
||||
struct snd_pcm_substream *substream = area->vm_private_data;
|
||||
|
||||
atomic_dec(&substream->mmap_count);
|
||||
}
|
||||
|
||||
/*
|
||||
* fault callback for mmapping a RAM page
|
||||
*/
|
||||
|
@ -366,7 +366,7 @@ int snd_ump_block_new(struct snd_ump_endpoint *ump, unsigned int blk,
|
||||
{
|
||||
struct snd_ump_block *fb, *p;
|
||||
|
||||
if (blk < 0 || blk >= SNDRV_UMP_MAX_BLOCKS)
|
||||
if (blk >= SNDRV_UMP_MAX_BLOCKS)
|
||||
return -EINVAL;
|
||||
|
||||
if (snd_ump_get_block(ump, blk))
|
||||
@ -387,7 +387,7 @@ int snd_ump_block_new(struct snd_ump_endpoint *ump, unsigned int blk,
|
||||
fb->info.first_group = first_group;
|
||||
fb->info.num_groups = num_groups;
|
||||
/* fill the default name, may be overwritten to a better name */
|
||||
snprintf(fb->info.name, sizeof(fb->info.name), "Group %d-%d",
|
||||
snprintf(fb->info.name, sizeof(fb->info.name), "Group %u-%u",
|
||||
first_group + 1, first_group + num_groups);
|
||||
|
||||
/* put the entry in the ordered list */
|
||||
|
@ -1008,7 +1008,7 @@ static void snd_mts64_remove(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver snd_mts64_driver = {
|
||||
.probe = snd_mts64_probe,
|
||||
.remove_new = snd_mts64_remove,
|
||||
.remove = snd_mts64_remove,
|
||||
.driver = {
|
||||
.name = PLATFORM_DRIVER,
|
||||
}
|
||||
|
@ -640,7 +640,7 @@ static struct platform_device pcmtst_pdev = {
|
||||
|
||||
static struct platform_driver pcmtst_pdrv = {
|
||||
.probe = pcmtst_probe,
|
||||
.remove_new = pdev_remove,
|
||||
.remove = pdev_remove,
|
||||
.driver = {
|
||||
.name = "pcmtest",
|
||||
},
|
||||
|
@ -794,7 +794,7 @@ static void snd_portman_remove(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver snd_portman_driver = {
|
||||
.probe = snd_portman_probe,
|
||||
.remove_new = snd_portman_remove,
|
||||
.remove = snd_portman_remove,
|
||||
.driver = {
|
||||
.name = PLATFORM_DRIVER,
|
||||
}
|
||||
|
@ -333,53 +333,6 @@ retry_after_bus_reset:
|
||||
}
|
||||
EXPORT_SYMBOL(cmp_connection_establish);
|
||||
|
||||
/**
|
||||
* cmp_connection_update - update the connection after a bus reset
|
||||
* @c: the connection manager
|
||||
*
|
||||
* This function must be called from the driver's .update handler to
|
||||
* reestablish any connection that might have been active.
|
||||
*
|
||||
* Returns zero on success, or a negative error code. On an error, the
|
||||
* connection is broken and the caller must stop transmitting iso packets.
|
||||
*/
|
||||
int cmp_connection_update(struct cmp_connection *c)
|
||||
{
|
||||
int err;
|
||||
|
||||
mutex_lock(&c->mutex);
|
||||
|
||||
if (!c->connected) {
|
||||
mutex_unlock(&c->mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
err = fw_iso_resources_update(&c->resources);
|
||||
if (err < 0)
|
||||
goto err_unconnect;
|
||||
|
||||
if (c->direction == CMP_OUTPUT)
|
||||
err = pcr_modify(c, opcr_set_modify, pcr_set_check,
|
||||
SUCCEED_ON_BUS_RESET);
|
||||
else
|
||||
err = pcr_modify(c, ipcr_set_modify, pcr_set_check,
|
||||
SUCCEED_ON_BUS_RESET);
|
||||
|
||||
if (err < 0)
|
||||
goto err_unconnect;
|
||||
|
||||
mutex_unlock(&c->mutex);
|
||||
|
||||
return 0;
|
||||
|
||||
err_unconnect:
|
||||
c->connected = false;
|
||||
mutex_unlock(&c->mutex);
|
||||
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(cmp_connection_update);
|
||||
|
||||
static __be32 pcr_break_modify(struct cmp_connection *c, __be32 pcr)
|
||||
{
|
||||
return pcr & ~cpu_to_be32(PCR_BCAST_CONN | PCR_P2P_CONN_MASK);
|
||||
|
@ -47,7 +47,6 @@ int cmp_connection_reserve(struct cmp_connection *connection,
|
||||
void cmp_connection_release(struct cmp_connection *connection);
|
||||
|
||||
int cmp_connection_establish(struct cmp_connection *connection);
|
||||
int cmp_connection_update(struct cmp_connection *connection);
|
||||
void cmp_connection_break(struct cmp_connection *connection);
|
||||
|
||||
#endif
|
||||
|
@ -886,7 +886,7 @@ static void hal2_remove(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver hal2_driver = {
|
||||
.probe = hal2_probe,
|
||||
.remove_new = hal2_remove,
|
||||
.remove = hal2_remove,
|
||||
.driver = {
|
||||
.name = "sgihal2",
|
||||
}
|
||||
|
@ -917,8 +917,8 @@ static void snd_sgio2audio_remove(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver sgio2audio_driver = {
|
||||
.probe = snd_sgio2audio_probe,
|
||||
.remove_new = snd_sgio2audio_remove,
|
||||
.driver = {
|
||||
.remove = snd_sgio2audio_remove,
|
||||
.driver = {
|
||||
.name = "sgio2audio",
|
||||
}
|
||||
};
|
||||
|
@ -732,7 +732,7 @@ static void __exit amiga_audio_remove(struct platform_device *pdev)
|
||||
* triggering a section mismatch warning.
|
||||
*/
|
||||
static struct platform_driver amiga_audio_driver __refdata = {
|
||||
.remove_new = __exit_p(amiga_audio_remove),
|
||||
.remove = __exit_p(amiga_audio_remove),
|
||||
.driver = {
|
||||
.name = "amiga-audio",
|
||||
},
|
||||
|
@ -956,6 +956,28 @@ void snd_hda_pick_pin_fixup(struct hda_codec *codec,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hda_pick_pin_fixup);
|
||||
|
||||
/* check whether the given quirk entry matches with vendor/device pair */
|
||||
static bool hda_quirk_match(u16 vendor, u16 device, const struct hda_quirk *q)
|
||||
{
|
||||
if (q->subvendor != vendor)
|
||||
return false;
|
||||
return !q->subdevice ||
|
||||
(device & q->subdevice_mask) == q->subdevice;
|
||||
}
|
||||
|
||||
/* look through the quirk list and return the matching entry */
|
||||
static const struct hda_quirk *
|
||||
hda_quirk_lookup_id(u16 vendor, u16 device, const struct hda_quirk *list)
|
||||
{
|
||||
const struct hda_quirk *q;
|
||||
|
||||
for (q = list; q->subvendor || q->subdevice; q++) {
|
||||
if (hda_quirk_match(vendor, device, q))
|
||||
return q;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_hda_pick_fixup - Pick up a fixup matching with PCI/codec SSID or model string
|
||||
* @codec: the HDA codec
|
||||
@ -975,14 +997,16 @@ EXPORT_SYMBOL_GPL(snd_hda_pick_pin_fixup);
|
||||
*/
|
||||
void snd_hda_pick_fixup(struct hda_codec *codec,
|
||||
const struct hda_model_fixup *models,
|
||||
const struct snd_pci_quirk *quirk,
|
||||
const struct hda_quirk *quirk,
|
||||
const struct hda_fixup *fixlist)
|
||||
{
|
||||
const struct snd_pci_quirk *q;
|
||||
const struct hda_quirk *q;
|
||||
int id = HDA_FIXUP_ID_NOT_SET;
|
||||
const char *name = NULL;
|
||||
const char *type = NULL;
|
||||
unsigned int vendor, device;
|
||||
u16 pci_vendor, pci_device;
|
||||
u16 codec_vendor, codec_device;
|
||||
|
||||
if (codec->fixup_id != HDA_FIXUP_ID_NOT_SET)
|
||||
return;
|
||||
@ -1013,27 +1037,42 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
|
||||
if (!quirk)
|
||||
return;
|
||||
|
||||
if (codec->bus->pci) {
|
||||
pci_vendor = codec->bus->pci->subsystem_vendor;
|
||||
pci_device = codec->bus->pci->subsystem_device;
|
||||
}
|
||||
|
||||
codec_vendor = codec->core.subsystem_id >> 16;
|
||||
codec_device = codec->core.subsystem_id & 0xffff;
|
||||
|
||||
/* match with the SSID alias given by the model string "XXXX:YYYY" */
|
||||
if (codec->modelname &&
|
||||
sscanf(codec->modelname, "%04x:%04x", &vendor, &device) == 2) {
|
||||
q = snd_pci_quirk_lookup_id(vendor, device, quirk);
|
||||
q = hda_quirk_lookup_id(vendor, device, quirk);
|
||||
if (q) {
|
||||
type = "alias SSID";
|
||||
goto found_device;
|
||||
}
|
||||
}
|
||||
|
||||
/* match with the PCI SSID */
|
||||
q = snd_pci_quirk_lookup(codec->bus->pci, quirk);
|
||||
if (q) {
|
||||
type = "PCI SSID";
|
||||
goto found_device;
|
||||
/* match primarily with the PCI SSID */
|
||||
for (q = quirk; q->subvendor || q->subdevice; q++) {
|
||||
/* if the entry is specific to codec SSID, check with it */
|
||||
if (!codec->bus->pci || q->match_codec_ssid) {
|
||||
if (hda_quirk_match(codec_vendor, codec_device, q)) {
|
||||
type = "codec SSID";
|
||||
goto found_device;
|
||||
}
|
||||
} else {
|
||||
if (hda_quirk_match(pci_vendor, pci_device, q)) {
|
||||
type = "PCI SSID";
|
||||
goto found_device;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* match with the codec SSID */
|
||||
q = snd_pci_quirk_lookup_id(codec->core.subsystem_id >> 16,
|
||||
codec->core.subsystem_id & 0xffff,
|
||||
quirk);
|
||||
q = hda_quirk_lookup_id(codec_vendor, codec_device, quirk);
|
||||
if (q) {
|
||||
type = "codec SSID";
|
||||
goto found_device;
|
||||
|
@ -773,6 +773,14 @@ static void azx_clear_irq_pending(struct azx *chip)
|
||||
static int azx_acquire_irq(struct azx *chip, int do_disconnect)
|
||||
{
|
||||
struct hdac_bus *bus = azx_bus(chip);
|
||||
int ret;
|
||||
|
||||
if (!chip->msi || pci_alloc_irq_vectors(chip->pci, 1, 1, PCI_IRQ_MSI) < 0) {
|
||||
ret = pci_alloc_irq_vectors(chip->pci, 1, 1, PCI_IRQ_INTX);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
chip->msi = 0;
|
||||
}
|
||||
|
||||
if (request_irq(chip->pci->irq, azx_interrupt,
|
||||
chip->msi ? 0 : IRQF_SHARED,
|
||||
@ -786,7 +794,6 @@ static int azx_acquire_irq(struct azx *chip, int do_disconnect)
|
||||
}
|
||||
bus->irq = chip->pci->irq;
|
||||
chip->card->sync_irq = bus->irq;
|
||||
pci_intx(chip->pci, !chip->msi);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1032,22 +1039,12 @@ static int azx_suspend(struct device *dev)
|
||||
{
|
||||
struct snd_card *card = dev_get_drvdata(dev);
|
||||
struct azx *chip;
|
||||
struct hdac_bus *bus;
|
||||
|
||||
if (!azx_is_pm_ready(card))
|
||||
return 0;
|
||||
|
||||
chip = card->private_data;
|
||||
bus = azx_bus(chip);
|
||||
azx_shutdown_chip(chip);
|
||||
if (bus->irq >= 0) {
|
||||
free_irq(bus->irq, chip);
|
||||
bus->irq = -1;
|
||||
chip->card->sync_irq = -1;
|
||||
}
|
||||
|
||||
if (chip->msi)
|
||||
pci_disable_msi(chip->pci);
|
||||
|
||||
trace_azx_suspend(chip);
|
||||
return 0;
|
||||
@ -1062,11 +1059,6 @@ static int __maybe_unused azx_resume(struct device *dev)
|
||||
return 0;
|
||||
|
||||
chip = card->private_data;
|
||||
if (chip->msi)
|
||||
if (pci_enable_msi(chip->pci) < 0)
|
||||
chip->msi = 0;
|
||||
if (azx_acquire_irq(chip, 1) < 0)
|
||||
return -EIO;
|
||||
|
||||
__azx_runtime_resume(chip);
|
||||
|
||||
@ -1867,6 +1859,8 @@ static int azx_first_init(struct azx *chip)
|
||||
bus->polling_mode = 1;
|
||||
bus->not_use_interrupts = 1;
|
||||
bus->access_sdnctl_in_dword = 1;
|
||||
if (!chip->jackpoll_interval)
|
||||
chip->jackpoll_interval = msecs_to_jiffies(1500);
|
||||
}
|
||||
|
||||
err = pcim_iomap_regions(pci, 1 << 0, "ICH HD audio");
|
||||
@ -1892,13 +1886,9 @@ static int azx_first_init(struct azx *chip)
|
||||
chip->gts_present = true;
|
||||
#endif
|
||||
|
||||
if (chip->msi) {
|
||||
if (chip->driver_caps & AZX_DCAPS_NO_MSI64) {
|
||||
dev_dbg(card->dev, "Disabling 64bit MSI\n");
|
||||
pci->no_64bit_msi = true;
|
||||
}
|
||||
if (pci_enable_msi(pci) < 0)
|
||||
chip->msi = 0;
|
||||
if (chip->msi && chip->driver_caps & AZX_DCAPS_NO_MSI64) {
|
||||
dev_dbg(card->dev, "Disabling 64bit MSI\n");
|
||||
pci->no_64bit_msi = true;
|
||||
}
|
||||
|
||||
pci_set_master(pci);
|
||||
@ -2050,7 +2040,7 @@ static int disable_msi_reset_irq(struct azx *chip)
|
||||
free_irq(bus->irq, chip);
|
||||
bus->irq = -1;
|
||||
chip->card->sync_irq = -1;
|
||||
pci_disable_msi(chip->pci);
|
||||
pci_free_irq_vectors(chip->pci);
|
||||
chip->msi = 0;
|
||||
err = azx_acquire_irq(chip, 1);
|
||||
if (err < 0)
|
||||
|
@ -292,6 +292,32 @@ struct hda_fixup {
|
||||
} v;
|
||||
};
|
||||
|
||||
/*
|
||||
* extended form of snd_pci_quirk:
|
||||
* for PCI SSID matching, use SND_PCI_QUIRK() like before;
|
||||
* for codec SSID matching, use the new HDA_CODEC_QUIRK() instead
|
||||
*/
|
||||
struct hda_quirk {
|
||||
unsigned short subvendor; /* PCI subvendor ID */
|
||||
unsigned short subdevice; /* PCI subdevice ID */
|
||||
unsigned short subdevice_mask; /* bitmask to match */
|
||||
bool match_codec_ssid; /* match only with codec SSID */
|
||||
int value; /* value */
|
||||
#ifdef CONFIG_SND_DEBUG_VERBOSE
|
||||
const char *name; /* name of the device (optional) */
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SND_DEBUG_VERBOSE
|
||||
#define HDA_CODEC_QUIRK(vend, dev, xname, val) \
|
||||
{ _SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname),\
|
||||
.match_codec_ssid = true }
|
||||
#else
|
||||
#define HDA_CODEC_QUIRK(vend, dev, xname, val) \
|
||||
{ _SND_PCI_QUIRK_ID(vend, dev), .value = (val), \
|
||||
.match_codec_ssid = true }
|
||||
#endif
|
||||
|
||||
struct snd_hda_pin_quirk {
|
||||
unsigned int codec; /* Codec vendor/device ID */
|
||||
unsigned short subvendor; /* PCI subvendor ID */
|
||||
@ -351,7 +377,7 @@ void snd_hda_apply_fixup(struct hda_codec *codec, int action);
|
||||
void __snd_hda_apply_fixup(struct hda_codec *codec, int id, int action, int depth);
|
||||
void snd_hda_pick_fixup(struct hda_codec *codec,
|
||||
const struct hda_model_fixup *models,
|
||||
const struct snd_pci_quirk *quirk,
|
||||
const struct hda_quirk *quirk,
|
||||
const struct hda_fixup *fixlist);
|
||||
void snd_hda_pick_pin_fixup(struct hda_codec *codec,
|
||||
const struct snd_hda_pin_quirk *pin_quirk,
|
||||
|
@ -606,7 +606,7 @@ static struct platform_driver tegra_platform_hda = {
|
||||
.of_match_table = hda_tegra_match,
|
||||
},
|
||||
.probe = hda_tegra_probe,
|
||||
.remove_new = hda_tegra_remove,
|
||||
.remove = hda_tegra_remove,
|
||||
.shutdown = hda_tegra_shutdown,
|
||||
};
|
||||
module_platform_driver(tegra_platform_hda);
|
||||
|
@ -345,7 +345,7 @@ static const struct hda_fixup ad1986a_fixups[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk ad1986a_fixup_tbl[] = {
|
||||
static const struct hda_quirk ad1986a_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x30af, "HP B2800", AD1986A_FIXUP_LAPTOP_IMIC),
|
||||
SND_PCI_QUIRK(0x1043, 0x1153, "ASUS M9V", AD1986A_FIXUP_LAPTOP_IMIC),
|
||||
SND_PCI_QUIRK(0x1043, 0x1443, "ASUS Z99He", AD1986A_FIXUP_EAPD),
|
||||
@ -588,7 +588,7 @@ static const struct hda_fixup ad1981_fixups[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk ad1981_fixup_tbl[] = {
|
||||
static const struct hda_quirk ad1981_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK_VENDOR(0x1014, "Lenovo", AD1981_FIXUP_AMP_OVERRIDE),
|
||||
SND_PCI_QUIRK_VENDOR(0x103c, "HP", AD1981_FIXUP_HP_EAPD),
|
||||
SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", AD1981_FIXUP_AMP_OVERRIDE),
|
||||
@ -1061,7 +1061,7 @@ static const struct hda_fixup ad1884_fixups[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk ad1884_fixup_tbl[] = {
|
||||
static const struct hda_quirk ad1884_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x2a82, "HP Touchsmart", AD1884_FIXUP_HP_TOUCHSMART),
|
||||
SND_PCI_QUIRK_VENDOR(0x103c, "HP", AD1884_FIXUP_HP_EAPD),
|
||||
SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo Thinkpad", AD1884_FIXUP_THINKPAD),
|
||||
|
@ -385,7 +385,7 @@ static const struct hda_model_fixup cs420x_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk cs420x_fixup_tbl[] = {
|
||||
static const struct hda_quirk cs420x_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53),
|
||||
SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55),
|
||||
SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55),
|
||||
@ -634,13 +634,13 @@ static const struct hda_model_fixup cs4208_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk cs4208_fixup_tbl[] = {
|
||||
static const struct hda_quirk cs4208_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS4208_MAC_AUTO),
|
||||
{} /* terminator */
|
||||
};
|
||||
|
||||
/* codec SSID matching */
|
||||
static const struct snd_pci_quirk cs4208_mac_fixup_tbl[] = {
|
||||
static const struct hda_quirk cs4208_mac_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x106b, 0x5e00, "MacBookPro 11,2", CS4208_MBP11),
|
||||
SND_PCI_QUIRK(0x106b, 0x6c00, "MacMini 7,1", CS4208_MACMINI),
|
||||
SND_PCI_QUIRK(0x106b, 0x7100, "MacBookAir 6,1", CS4208_MBA6),
|
||||
@ -818,7 +818,7 @@ static const struct hda_model_fixup cs421x_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk cs421x_fixup_tbl[] = {
|
||||
static const struct hda_quirk cs421x_fixup_tbl[] = {
|
||||
/* Test Intel board + CDB2410 */
|
||||
SND_PCI_QUIRK(0x8086, 0x5001, "DP45SG/CDB4210", CS421X_CDB4210),
|
||||
{} /* terminator */
|
||||
|
@ -828,23 +828,6 @@ static const struct hda_pintbl cxt_pincfg_sws_js201d[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
/* pincfg quirk for Tuxedo Sirius;
|
||||
* unfortunately the (PCI) SSID conflicts with System76 Pangolin pang14,
|
||||
* which has incompatible pin setup, so we check the codec SSID (luckily
|
||||
* different one!) and conditionally apply the quirk here
|
||||
*/
|
||||
static void cxt_fixup_sirius_top_speaker(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix,
|
||||
int action)
|
||||
{
|
||||
/* ignore for incorrectly picked-up pang14 */
|
||||
if (codec->core.subsystem_id == 0x278212b3)
|
||||
return;
|
||||
/* set up the top speaker pin */
|
||||
if (action == HDA_FIXUP_ACT_PRE_PROBE)
|
||||
snd_hda_codec_set_pincfg(codec, 0x1d, 0x82170111);
|
||||
}
|
||||
|
||||
static const struct hda_fixup cxt_fixups[] = {
|
||||
[CXT_PINCFG_LENOVO_X200] = {
|
||||
.type = HDA_FIXUP_PINS,
|
||||
@ -1009,12 +992,15 @@ static const struct hda_fixup cxt_fixups[] = {
|
||||
.v.pins = cxt_pincfg_sws_js201d,
|
||||
},
|
||||
[CXT_PINCFG_TOP_SPEAKER] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = cxt_fixup_sirius_top_speaker,
|
||||
.type = HDA_FIXUP_PINS,
|
||||
.v.pins = (const struct hda_pintbl[]) {
|
||||
{ 0x1d, 0x82170111 },
|
||||
{ }
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk cxt5045_fixups[] = {
|
||||
static const struct hda_quirk cxt5045_fixups[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x30d5, "HP 530", CXT_FIXUP_HP_530),
|
||||
SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P105", CXT_FIXUP_TOSHIBA_P105),
|
||||
/* HP, Packard Bell, Fujitsu-Siemens & Lenovo laptops have
|
||||
@ -1034,7 +1020,7 @@ static const struct hda_model_fixup cxt5045_fixup_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk cxt5047_fixups[] = {
|
||||
static const struct hda_quirk cxt5047_fixups[] = {
|
||||
/* HP laptops have really bad sound over 0 dB on NID 0x10.
|
||||
*/
|
||||
SND_PCI_QUIRK_VENDOR(0x103c, "HP", CXT_FIXUP_CAP_MIX_AMP_5047),
|
||||
@ -1046,7 +1032,7 @@ static const struct hda_model_fixup cxt5047_fixup_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk cxt5051_fixups[] = {
|
||||
static const struct hda_quirk cxt5051_fixups[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x360b, "Compaq CQ60", CXT_PINCFG_COMPAQ_CQ60),
|
||||
SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200),
|
||||
{}
|
||||
@ -1057,7 +1043,7 @@ static const struct hda_model_fixup cxt5051_fixup_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk cxt5066_fixups[] = {
|
||||
static const struct hda_quirk cxt5066_fixups[] = {
|
||||
SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_ASPIRE_DMIC),
|
||||
SND_PCI_QUIRK(0x1025, 0x054f, "Acer Aspire 4830T", CXT_FIXUP_ASPIRE_DMIC),
|
||||
@ -1109,8 +1095,8 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
|
||||
SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI),
|
||||
SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004),
|
||||
SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205),
|
||||
SND_PCI_QUIRK(0x2782, 0x12c3, "Sirius Gen1", CXT_PINCFG_TOP_SPEAKER),
|
||||
SND_PCI_QUIRK(0x2782, 0x12c5, "Sirius Gen2", CXT_PINCFG_TOP_SPEAKER),
|
||||
HDA_CODEC_QUIRK(0x2782, 0x12c3, "Sirius Gen1", CXT_PINCFG_TOP_SPEAKER),
|
||||
HDA_CODEC_QUIRK(0x2782, 0x12c5, "Sirius Gen2", CXT_PINCFG_TOP_SPEAKER),
|
||||
{}
|
||||
};
|
||||
|
||||
|
@ -473,7 +473,7 @@ struct sub_codec dolphin_cs42l42_1 = {
|
||||
* Arrays Used for all projects using CS8409
|
||||
******************************************************************************/
|
||||
|
||||
const struct snd_pci_quirk cs8409_fixup_tbl[] = {
|
||||
const struct hda_quirk cs8409_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1028, 0x0A11, "Bullseye", CS8409_BULLSEYE),
|
||||
SND_PCI_QUIRK(0x1028, 0x0A12, "Bullseye", CS8409_BULLSEYE),
|
||||
SND_PCI_QUIRK(0x1028, 0x0A23, "Bullseye", CS8409_BULLSEYE),
|
||||
|
@ -355,7 +355,7 @@ int cs42l42_volume_put(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *uc
|
||||
|
||||
extern const struct hda_pcm_stream cs42l42_48k_pcm_analog_playback;
|
||||
extern const struct hda_pcm_stream cs42l42_48k_pcm_analog_capture;
|
||||
extern const struct snd_pci_quirk cs8409_fixup_tbl[];
|
||||
extern const struct hda_quirk cs8409_fixup_tbl[];
|
||||
extern const struct hda_model_fixup cs8409_models[];
|
||||
extern const struct hda_fixup cs8409_fixups[];
|
||||
extern const struct hda_verb cs8409_cs42l42_init_verbs[];
|
||||
|
@ -1565,7 +1565,7 @@ static const struct hda_fixup alc880_fixups[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc880_fixup_tbl[] = {
|
||||
static const struct hda_quirk alc880_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810),
|
||||
SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS W5A", ALC880_FIXUP_ASUS_W5A),
|
||||
SND_PCI_QUIRK(0x1043, 0x1964, "ASUS Z71V", ALC880_FIXUP_Z71V),
|
||||
@ -1874,7 +1874,7 @@ static const struct hda_fixup alc260_fixups[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc260_fixup_tbl[] = {
|
||||
static const struct hda_quirk alc260_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_FIXUP_GPIO1),
|
||||
SND_PCI_QUIRK(0x1025, 0x007f, "Acer Aspire 9500", ALC260_FIXUP_COEF),
|
||||
SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1),
|
||||
@ -2566,7 +2566,7 @@ static const struct hda_fixup alc882_fixups[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
static const struct hda_quirk alc882_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_FIXUP_ACER_EAPD),
|
||||
SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
|
||||
SND_PCI_QUIRK(0x1025, 0x0107, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
|
||||
@ -2910,7 +2910,7 @@ static const struct hda_fixup alc262_fixups[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc262_fixup_tbl[] = {
|
||||
static const struct hda_quirk alc262_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200),
|
||||
SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu Lifebook S7110", ALC262_FIXUP_FSC_S7110),
|
||||
SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FIXUP_BENQ),
|
||||
@ -3071,7 +3071,7 @@ static const struct hda_model_fixup alc268_fixup_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc268_fixup_tbl[] = {
|
||||
static const struct hda_quirk alc268_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1025, 0x0139, "Acer TravelMate 6293", ALC268_FIXUP_SPDIF),
|
||||
SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC),
|
||||
/* below is codec SSID since multiple Toshiba laptops have the
|
||||
@ -7736,8 +7736,6 @@ enum {
|
||||
ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
|
||||
ALC287_FIXUP_YOGA7_14ITL_SPEAKERS,
|
||||
ALC298_FIXUP_LENOVO_C940_DUET7,
|
||||
ALC287_FIXUP_LENOVO_14IRP8_DUETITL,
|
||||
ALC287_FIXUP_LENOVO_LEGION_7,
|
||||
ALC287_FIXUP_13S_GEN2_SPEAKERS,
|
||||
ALC256_FIXUP_SET_COEF_DEFAULTS,
|
||||
ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
|
||||
@ -7782,8 +7780,6 @@ enum {
|
||||
ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1,
|
||||
ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318,
|
||||
ALC256_FIXUP_CHROME_BOOK,
|
||||
ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7,
|
||||
ALC287_FIXUP_LENOVO_SSID_17AA3820,
|
||||
ALC245_FIXUP_CLEVO_NOISY_MIC,
|
||||
ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE,
|
||||
};
|
||||
@ -7805,72 +7801,6 @@ static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec,
|
||||
__snd_hda_apply_fixup(codec, id, action, 0);
|
||||
}
|
||||
|
||||
/* A special fixup for Lenovo Slim/Yoga Pro 9 14IRP8 and Yoga DuetITL 2021;
|
||||
* 14IRP8 PCI SSID will mistakenly be matched with the DuetITL codec SSID,
|
||||
* so we need to apply a different fixup in this case. The only DuetITL codec
|
||||
* SSID reported so far is the 17aa:3802 while the 14IRP8 has the 17aa:38be
|
||||
* and 17aa:38bf. If it weren't for the PCI SSID, the 14IRP8 models would
|
||||
* have matched correctly by their codecs.
|
||||
*/
|
||||
static void alc287_fixup_lenovo_14irp8_duetitl(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix,
|
||||
int action)
|
||||
{
|
||||
int id;
|
||||
|
||||
if (codec->core.subsystem_id == 0x17aa3802)
|
||||
id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* DuetITL */
|
||||
else
|
||||
id = ALC287_FIXUP_TAS2781_I2C; /* 14IRP8 */
|
||||
__snd_hda_apply_fixup(codec, id, action, 0);
|
||||
}
|
||||
|
||||
/* Similar to above the Lenovo Yoga Pro 7 14ARP8 PCI SSID matches the codec SSID of the
|
||||
Legion Y9000X 2022 IAH7.*/
|
||||
static void alc287_fixup_lenovo_14arp8_legion_iah7(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix,
|
||||
int action)
|
||||
{
|
||||
int id;
|
||||
|
||||
if (codec->core.subsystem_id == 0x17aa386e)
|
||||
id = ALC287_FIXUP_CS35L41_I2C_2; /* Legion Y9000X 2022 IAH7 */
|
||||
else
|
||||
id = ALC285_FIXUP_SPEAKER2_TO_DAC1; /* Yoga Pro 7 14ARP8 */
|
||||
__snd_hda_apply_fixup(codec, id, action, 0);
|
||||
}
|
||||
|
||||
/* Another hilarious PCI SSID conflict with Lenovo Legion Pro 7 16ARX8H (with
|
||||
* TAS2781 codec) and Legion 7i 16IAX7 (with CS35L41 codec);
|
||||
* we apply a corresponding fixup depending on the codec SSID instead
|
||||
*/
|
||||
static void alc287_fixup_lenovo_legion_7(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix,
|
||||
int action)
|
||||
{
|
||||
int id;
|
||||
|
||||
if (codec->core.subsystem_id == 0x17aa38a8)
|
||||
id = ALC287_FIXUP_TAS2781_I2C; /* Legion Pro 7 16ARX8H */
|
||||
else
|
||||
id = ALC287_FIXUP_CS35L41_I2C_2; /* Legion 7i 16IAX7 */
|
||||
__snd_hda_apply_fixup(codec, id, action, 0);
|
||||
}
|
||||
|
||||
/* Yet more conflicting PCI SSID (17aa:3820) on two Lenovo models */
|
||||
static void alc287_fixup_lenovo_ssid_17aa3820(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix,
|
||||
int action)
|
||||
{
|
||||
int id;
|
||||
|
||||
if (codec->core.subsystem_id == 0x17aa3820)
|
||||
id = ALC269_FIXUP_ASPIRE_HEADSET_MIC; /* IdeaPad 330-17IKB 81DM */
|
||||
else /* 0x17aa3802 */
|
||||
id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* "Yoga Duet 7 13ITL6 */
|
||||
__snd_hda_apply_fixup(codec, id, action, 0);
|
||||
}
|
||||
|
||||
static const struct hda_fixup alc269_fixups[] = {
|
||||
[ALC269_FIXUP_GPIO2] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
@ -9810,14 +9740,6 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc298_fixup_lenovo_c940_duet7,
|
||||
},
|
||||
[ALC287_FIXUP_LENOVO_14IRP8_DUETITL] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc287_fixup_lenovo_14irp8_duetitl,
|
||||
},
|
||||
[ALC287_FIXUP_LENOVO_LEGION_7] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc287_fixup_lenovo_legion_7,
|
||||
},
|
||||
[ALC287_FIXUP_13S_GEN2_SPEAKERS] = {
|
||||
.type = HDA_FIXUP_VERBS,
|
||||
.v.verbs = (const struct hda_verb[]) {
|
||||
@ -10002,10 +9924,6 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
.chained = true,
|
||||
.chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
|
||||
},
|
||||
[ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc287_fixup_lenovo_14arp8_legion_iah7,
|
||||
},
|
||||
[ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin,
|
||||
@ -10140,10 +10058,6 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
.chained = true,
|
||||
.chain_id = ALC225_FIXUP_HEADSET_JACK
|
||||
},
|
||||
[ALC287_FIXUP_LENOVO_SSID_17AA3820] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc287_fixup_lenovo_ssid_17aa3820,
|
||||
},
|
||||
[ALC245_FIXUP_CLEVO_NOISY_MIC] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc269_fixup_limit_int_mic_boost,
|
||||
@ -10162,7 +10076,7 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
static const struct hda_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC),
|
||||
SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC),
|
||||
SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
|
||||
@ -10895,11 +10809,13 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
|
||||
SND_PCI_QUIRK(0x17aa, 0x334b, "Lenovo ThinkCentre M70 Gen5", ALC283_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8 / DuetITL 2021", ALC287_FIXUP_LENOVO_14IRP8_DUETITL),
|
||||
HDA_CODEC_QUIRK(0x17aa, 0x3802, "DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8", ALC287_FIXUP_TAS2781_I2C),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3820, "IdeaPad 330 / Yoga Duet 7", ALC287_FIXUP_LENOVO_SSID_17AA3820),
|
||||
HDA_CODEC_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
|
||||
@ -10913,8 +10829,10 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x17aa, 0x3865, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3866, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
|
||||
SND_PCI_QUIRK(0x17aa, 0x386e, "Legion Y9000X 2022 IAH7 / Yoga Pro 7 14ARP8", ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7),
|
||||
SND_PCI_QUIRK(0x17aa, 0x386f, "Legion Pro 7/7i", ALC287_FIXUP_LENOVO_LEGION_7),
|
||||
HDA_CODEC_QUIRK(0x17aa, 0x386e, "Legion Y9000X 2022 IAH7", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x17aa, 0x386e, "Yoga Pro 7 14ARP8", ALC285_FIXUP_SPEAKER2_TO_DAC1),
|
||||
HDA_CODEC_QUIRK(0x17aa, 0x386f, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C),
|
||||
SND_PCI_QUIRK(0x17aa, 0x386f, "Legion Pro 7i 16IAX7", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3870, "Lenovo Yoga 7 14ARB7", ALC287_FIXUP_YOGA7_14ARB7_I2C),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3877, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3878, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
@ -11085,7 +11003,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc269_fixup_vendor_tbl[] = {
|
||||
static const struct hda_quirk alc269_fixup_vendor_tbl[] = {
|
||||
SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
|
||||
SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED),
|
||||
SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
|
||||
@ -12021,7 +11939,7 @@ static const struct hda_fixup alc861_fixups[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc861_fixup_tbl[] = {
|
||||
static const struct hda_quirk alc861_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J),
|
||||
SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J),
|
||||
SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP),
|
||||
@ -12125,7 +12043,7 @@ static const struct hda_fixup alc861vd_fixups[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc861vd_fixup_tbl[] = {
|
||||
static const struct hda_quirk alc861vd_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_FIX_DALLAS),
|
||||
SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1),
|
||||
SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_FIX_DALLAS),
|
||||
@ -12926,7 +12844,7 @@ static const struct hda_fixup alc662_fixups[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc662_fixup_tbl[] = {
|
||||
static const struct hda_quirk alc662_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2),
|
||||
SND_PCI_QUIRK(0x1019, 0x9859, "JP-IK LEAP W502", ALC897_FIXUP_HEADSET_MIC_PIN3),
|
||||
SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC),
|
||||
|
@ -1462,7 +1462,7 @@ static const struct hda_model_fixup stac9200_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk stac9200_fixup_tbl[] = {
|
||||
static const struct hda_quirk stac9200_fixup_tbl[] = {
|
||||
/* SigmaTel reference board */
|
||||
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
|
||||
"DFI LanParty", STAC_REF),
|
||||
@ -1683,7 +1683,7 @@ static const struct hda_model_fixup stac925x_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk stac925x_fixup_tbl[] = {
|
||||
static const struct hda_quirk stac925x_fixup_tbl[] = {
|
||||
/* SigmaTel reference board */
|
||||
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF),
|
||||
SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101, "DFI LanParty", STAC_REF),
|
||||
@ -1957,7 +1957,7 @@ static const struct hda_model_fixup stac92hd73xx_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk stac92hd73xx_fixup_tbl[] = {
|
||||
static const struct hda_quirk stac92hd73xx_fixup_tbl[] = {
|
||||
/* SigmaTel reference board */
|
||||
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
|
||||
"DFI LanParty", STAC_92HD73XX_REF),
|
||||
@ -2753,7 +2753,7 @@ static const struct hda_model_fixup stac92hd83xxx_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk stac92hd83xxx_fixup_tbl[] = {
|
||||
static const struct hda_quirk stac92hd83xxx_fixup_tbl[] = {
|
||||
/* SigmaTel reference board */
|
||||
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
|
||||
"DFI LanParty", STAC_92HD83XXX_REF),
|
||||
@ -3236,7 +3236,7 @@ static const struct hda_model_fixup stac92hd71bxx_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk stac92hd71bxx_fixup_tbl[] = {
|
||||
static const struct hda_quirk stac92hd71bxx_fixup_tbl[] = {
|
||||
/* SigmaTel reference board */
|
||||
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
|
||||
"DFI LanParty", STAC_92HD71BXX_REF),
|
||||
@ -3496,7 +3496,7 @@ static const struct hda_pintbl ecs202_pin_configs[] = {
|
||||
};
|
||||
|
||||
/* codec SSIDs for Intel Mac sharing the same PCI SSID 8384:7680 */
|
||||
static const struct snd_pci_quirk stac922x_intel_mac_fixup_tbl[] = {
|
||||
static const struct hda_quirk stac922x_intel_mac_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x0000, 0x0100, "Mac Mini", STAC_INTEL_MAC_V3),
|
||||
SND_PCI_QUIRK(0x106b, 0x0800, "Mac", STAC_INTEL_MAC_V1),
|
||||
SND_PCI_QUIRK(0x106b, 0x0600, "Mac", STAC_INTEL_MAC_V2),
|
||||
@ -3640,7 +3640,7 @@ static const struct hda_model_fixup stac922x_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk stac922x_fixup_tbl[] = {
|
||||
static const struct hda_quirk stac922x_fixup_tbl[] = {
|
||||
/* SigmaTel reference board */
|
||||
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
|
||||
"DFI LanParty", STAC_D945_REF),
|
||||
@ -3968,7 +3968,7 @@ static const struct hda_model_fixup stac927x_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk stac927x_fixup_tbl[] = {
|
||||
static const struct hda_quirk stac927x_fixup_tbl[] = {
|
||||
/* SigmaTel reference board */
|
||||
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
|
||||
"DFI LanParty", STAC_D965_REF),
|
||||
@ -4178,7 +4178,7 @@ static const struct hda_model_fixup stac9205_models[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk stac9205_fixup_tbl[] = {
|
||||
static const struct hda_quirk stac9205_fixup_tbl[] = {
|
||||
/* SigmaTel reference board */
|
||||
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
|
||||
"DFI LanParty", STAC_9205_REF),
|
||||
@ -4255,7 +4255,7 @@ static const struct hda_fixup stac92hd95_fixups[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk stac92hd95_fixup_tbl[] = {
|
||||
static const struct hda_quirk stac92hd95_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1911, "HP Spectre 13", STAC_92HD95_HP_BASS),
|
||||
{} /* terminator */
|
||||
};
|
||||
@ -5002,7 +5002,7 @@ static const struct hda_fixup stac9872_fixups[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk stac9872_fixup_tbl[] = {
|
||||
static const struct hda_quirk stac9872_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK_MASK(0x104d, 0xfff0, 0x81e0,
|
||||
"Sony VAIO F/S", STAC_9872_VAIO),
|
||||
{} /* terminator */
|
||||
|
@ -1035,7 +1035,7 @@ static const struct hda_fixup via_fixups[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk vt2002p_fixups[] = {
|
||||
static const struct hda_quirk vt2002p_fixups[] = {
|
||||
SND_PCI_QUIRK(0x1043, 0x13f7, "Asus B23E", VIA_FIXUP_POWER_SAVE),
|
||||
SND_PCI_QUIRK(0x1043, 0x1487, "Asus G75", VIA_FIXUP_ASUS_G75),
|
||||
SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST),
|
||||
|
@ -170,14 +170,9 @@ static int stac9460_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el
|
||||
tmp = stac9460_get(ice, idx);
|
||||
ovol = 0x7f - (tmp & 0x7f);
|
||||
change = (ovol != nvol);
|
||||
if (change) {
|
||||
ovol = (0x7f - nvol) | (tmp & 0x80);
|
||||
/*
|
||||
dev_dbg(ice->card->dev, "DAC Volume: reg 0x%02x: 0x%02x\n",
|
||||
idx, ovol);
|
||||
*/
|
||||
if (change)
|
||||
stac9460_put(ice, idx, (0x7f - nvol) | (tmp & 0x80));
|
||||
}
|
||||
|
||||
return change;
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ static SIMPLE_DEV_PM_OPS(snd_pmac_pm, snd_pmac_driver_suspend, snd_pmac_driver_r
|
||||
|
||||
static struct platform_driver snd_pmac_driver = {
|
||||
.probe = snd_pmac_probe,
|
||||
.remove_new = snd_pmac_remove,
|
||||
.remove = snd_pmac_remove,
|
||||
.driver = {
|
||||
.name = SND_PMAC_DRIVER,
|
||||
.pm = SND_PMAC_PM_OPS,
|
||||
|
@ -315,8 +315,6 @@ static void aica_period_elapsed(struct timer_list *t)
|
||||
static void spu_begin_dma(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_card_aica *dreamcastcard;
|
||||
struct snd_pcm_runtime *runtime;
|
||||
runtime = substream->runtime;
|
||||
dreamcastcard = substream->pcm->private_data;
|
||||
/*get the queue to do the work */
|
||||
schedule_work(&(dreamcastcard->spu_dma_work));
|
||||
@ -601,7 +599,7 @@ static int snd_aica_probe(struct platform_device *devptr)
|
||||
|
||||
static struct platform_driver snd_aica_driver = {
|
||||
.probe = snd_aica_probe,
|
||||
.remove_new = snd_aica_remove,
|
||||
.remove = snd_aica_remove,
|
||||
.driver = {
|
||||
.name = SND_AICA_DRIVER,
|
||||
},
|
||||
|
@ -383,7 +383,7 @@ probe_error:
|
||||
*/
|
||||
static struct platform_driver sh_dac_driver = {
|
||||
.probe = snd_sh_dac_probe,
|
||||
.remove_new = snd_sh_dac_remove,
|
||||
.remove = snd_sh_dac_remove,
|
||||
.driver = {
|
||||
.name = "dac_audio",
|
||||
},
|
||||
|
@ -106,9 +106,10 @@ source "sound/soc/meson/Kconfig"
|
||||
source "sound/soc/mxs/Kconfig"
|
||||
source "sound/soc/pxa/Kconfig"
|
||||
source "sound/soc/qcom/Kconfig"
|
||||
source "sound/soc/renesas/Kconfig"
|
||||
source "sound/soc/rockchip/Kconfig"
|
||||
source "sound/soc/samsung/Kconfig"
|
||||
source "sound/soc/sh/Kconfig"
|
||||
source "sound/soc/sdca/Kconfig"
|
||||
source "sound/soc/sof/Kconfig"
|
||||
source "sound/soc/spear/Kconfig"
|
||||
source "sound/soc/sprd/Kconfig"
|
||||
|
@ -59,9 +59,10 @@ obj-$(CONFIG_SND_SOC) += mxs/
|
||||
obj-$(CONFIG_SND_SOC) += kirkwood/
|
||||
obj-$(CONFIG_SND_SOC) += pxa/
|
||||
obj-$(CONFIG_SND_SOC) += qcom/
|
||||
obj-$(CONFIG_SND_SOC) += renesas/
|
||||
obj-$(CONFIG_SND_SOC) += rockchip/
|
||||
obj-$(CONFIG_SND_SOC) += samsung/
|
||||
obj-$(CONFIG_SND_SOC) += sh/
|
||||
obj-$(CONFIG_SND_SOC) += sdca/
|
||||
obj-$(CONFIG_SND_SOC) += sof/
|
||||
obj-$(CONFIG_SND_SOC) += spear/
|
||||
obj-$(CONFIG_SND_SOC) += sprd/
|
||||
|
@ -542,7 +542,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = {
|
||||
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|
||||
| SND_SOC_DAIFMT_CBP_CFP,
|
||||
.init = cz_da7219_init,
|
||||
.dpcm_playback = 1,
|
||||
.playback_only = 1,
|
||||
.trigger_stop = SND_SOC_TRIGGER_ORDER_LDC,
|
||||
.ops = &cz_da7219_play_ops,
|
||||
SND_SOC_DAILINK_REG(designware1, dlgs, platform),
|
||||
@ -552,7 +552,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = {
|
||||
.stream_name = "Capture",
|
||||
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|
||||
| SND_SOC_DAIFMT_CBP_CFP,
|
||||
.dpcm_capture = 1,
|
||||
.capture_only = 1,
|
||||
.trigger_stop = SND_SOC_TRIGGER_ORDER_LDC,
|
||||
.ops = &cz_da7219_cap_ops,
|
||||
SND_SOC_DAILINK_REG(designware2, dlgs, platform),
|
||||
@ -562,7 +562,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = {
|
||||
.stream_name = "HiFi Playback",
|
||||
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|
||||
| SND_SOC_DAIFMT_CBP_CFP,
|
||||
.dpcm_playback = 1,
|
||||
.playback_only = 1,
|
||||
.trigger_stop = SND_SOC_TRIGGER_ORDER_LDC,
|
||||
.ops = &cz_max_play_ops,
|
||||
SND_SOC_DAILINK_REG(designware3, mx, platform),
|
||||
@ -573,7 +573,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = {
|
||||
.stream_name = "DMIC0 Capture",
|
||||
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|
||||
| SND_SOC_DAIFMT_CBP_CFP,
|
||||
.dpcm_capture = 1,
|
||||
.capture_only = 1,
|
||||
.trigger_stop = SND_SOC_TRIGGER_ORDER_LDC,
|
||||
.ops = &cz_dmic0_cap_ops,
|
||||
SND_SOC_DAILINK_REG(designware3, adau, platform),
|
||||
@ -584,7 +584,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = {
|
||||
.stream_name = "DMIC1 Capture",
|
||||
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|
||||
| SND_SOC_DAIFMT_CBP_CFP,
|
||||
.dpcm_capture = 1,
|
||||
.capture_only = 1,
|
||||
.trigger_stop = SND_SOC_TRIGGER_ORDER_LDC,
|
||||
.ops = &cz_dmic1_cap_ops,
|
||||
SND_SOC_DAILINK_REG(designware2, adau, platform),
|
||||
@ -598,7 +598,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
|
||||
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|
||||
| SND_SOC_DAIFMT_CBP_CFP,
|
||||
.init = cz_rt5682_init,
|
||||
.dpcm_playback = 1,
|
||||
.playback_only = 1,
|
||||
.trigger_stop = SND_SOC_TRIGGER_ORDER_LDC,
|
||||
.ops = &cz_rt5682_play_ops,
|
||||
SND_SOC_DAILINK_REG(designware1, rt5682, platform),
|
||||
@ -608,7 +608,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
|
||||
.stream_name = "Capture",
|
||||
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|
||||
| SND_SOC_DAIFMT_CBP_CFP,
|
||||
.dpcm_capture = 1,
|
||||
.capture_only = 1,
|
||||
.trigger_stop = SND_SOC_TRIGGER_ORDER_LDC,
|
||||
.ops = &cz_rt5682_cap_ops,
|
||||
SND_SOC_DAILINK_REG(designware2, rt5682, platform),
|
||||
@ -618,7 +618,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
|
||||
.stream_name = "HiFi Playback",
|
||||
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|
||||
| SND_SOC_DAIFMT_CBP_CFP,
|
||||
.dpcm_playback = 1,
|
||||
.playback_only = 1,
|
||||
.trigger_stop = SND_SOC_TRIGGER_ORDER_LDC,
|
||||
.ops = &cz_rt5682_max_play_ops,
|
||||
SND_SOC_DAILINK_REG(designware3, mx, platform),
|
||||
@ -629,7 +629,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
|
||||
.stream_name = "DMIC0 Capture",
|
||||
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|
||||
| SND_SOC_DAIFMT_CBP_CFP,
|
||||
.dpcm_capture = 1,
|
||||
.capture_only = 1,
|
||||
.trigger_stop = SND_SOC_TRIGGER_ORDER_LDC,
|
||||
.ops = &cz_rt5682_dmic0_cap_ops,
|
||||
SND_SOC_DAILINK_REG(designware3, adau, platform),
|
||||
@ -640,7 +640,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
|
||||
.stream_name = "DMIC1 Capture",
|
||||
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|
||||
| SND_SOC_DAIFMT_CBP_CFP,
|
||||
.dpcm_capture = 1,
|
||||
.capture_only = 1,
|
||||
.trigger_stop = SND_SOC_TRIGGER_ORDER_LDC,
|
||||
.ops = &cz_rt5682_dmic1_cap_ops,
|
||||
SND_SOC_DAILINK_REG(designware2, adau, platform),
|
||||
|
@ -150,8 +150,6 @@ static struct snd_soc_dai_link st_dai_es8336[] = {
|
||||
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
|
||||
| SND_SOC_DAIFMT_CBP_CFP,
|
||||
.trigger_stop = SND_SOC_TRIGGER_ORDER_LDC,
|
||||
.dpcm_capture = 1,
|
||||
.dpcm_playback = 1,
|
||||
.init = st_es8336_init,
|
||||
.ops = &st_es8336_ops,
|
||||
SND_SOC_DAILINK_REG(designware1, codec, platform),
|
||||
|
@ -119,10 +119,17 @@ config SND_SOC_AMD_SOF_MACH
|
||||
help
|
||||
This option enables SOF sound card support for ACP audio.
|
||||
|
||||
config SND_SOC_AMD_SDW_MACH_COMMON
|
||||
tristate
|
||||
help
|
||||
This option enables common SoundWire Machine driver module for
|
||||
AMD platforms.
|
||||
|
||||
config SND_SOC_AMD_SOF_SDW_MACH
|
||||
tristate "AMD SOF Soundwire Machine Driver Support"
|
||||
depends on X86 && PCI && ACPI
|
||||
depends on SOUNDWIRE
|
||||
select SND_SOC_AMD_SDW_MACH_COMMON
|
||||
select SND_SOC_SDW_UTILS
|
||||
select SND_SOC_DMIC
|
||||
select SND_SOC_RT711_SDW
|
||||
@ -137,6 +144,28 @@ config SND_SOC_AMD_SOF_SDW_MACH
|
||||
on AMD platform.
|
||||
If unsure select "N".
|
||||
|
||||
config SND_SOC_AMD_LEGACY_SDW_MACH
|
||||
tristate "AMD Legacy(No DSP) Soundwire Machine Driver Support"
|
||||
depends on X86 && PCI && ACPI
|
||||
depends on SOUNDWIRE
|
||||
select SND_SOC_AMD_SDW_MACH_COMMON
|
||||
select SND_SOC_SDW_UTILS
|
||||
select SND_SOC_DMIC
|
||||
select SND_SOC_RT711_SDW
|
||||
select SND_SOC_RT711_SDCA_SDW
|
||||
select SND_SOC_RT712_SDCA_SDW
|
||||
select SND_SOC_RT712_SDCA_DMIC_SDW
|
||||
select SND_SOC_RT1316_SDW
|
||||
select SND_SOC_RT715_SDW
|
||||
select SND_SOC_RT715_SDCA_SDW
|
||||
select SND_SOC_RT722_SDCA_SDW
|
||||
help
|
||||
This option enables Legacy(No DSP) sound card support for SoundWire
|
||||
enabled AMD platforms along with ACP PDM controller.
|
||||
Say Y if you want to enable SoundWire based machine driver support
|
||||
on AMD platform.
|
||||
If unsure select "N".
|
||||
|
||||
endif # SND_SOC_AMD_ACP_COMMON
|
||||
|
||||
config SND_AMD_SOUNDWIRE_ACPI
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user