Commit 4e4510fe authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'sound-4.15-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "There are no big surprising changes in this cycle, yet not too boring,
  either. The biggest change from diffstat POV is the removal of the
  legacy OSS driver codes that have been already disabled for a long
  time. This will bring a few trivial merge conflicts.

  As new features in ASoC side, there are two things: a new AC97 bus
  implementation and AMD Stony platform support. Both include the
  relevant changes shared with other subsystems, e.g. AC97 MFD changes
  and DRM AMD changes.

  Some other highlighted topics are:

   - A bunch of USB-audio drivers got the hardening against the
     malicious device accesses with a new helper code for endpoint
     sanity check

   - Lots of cleanups for ASoC Intel platform code, including support
     for their open source audio firmware

   - Continued ASoC core componentization works

   - Support for scaling MCLK with sample rate in ASoC simple-card

   - Stabler PCM hot-unplug capability, especially for ASoC usages"

* tag 'sound-4.15-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (302 commits)
  Documentation: sound: hd-audio: notes.rst
  ASoC: bcm2835: Support left/right justified and DSP modes
  ASoC: bcm2835: Enforce full symmetry
  ASoC: bcm2835: Support additional samplerates up to 384kHz
  ASoC: bcm2835: Add support for TDM modes
  ASoC: add mclk-fs support to audio graph card
  ASoC: add mclk-fs to audio graph card binding
  ASoC: rt5514: work around link error
  ASoC: rt5514: mark PM functions as __maybe_unused
  ASoC: rt5663: Check the JD status in the button pushing
  ASoC: amd: Modified DMA transfer Mechanism for Playback
  ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2
  ASoC: sun4i-codec: fixed 32bit audio capture support for H3/H2+
  ASoC: da7213: add support for DSP modes
  ASoC: sun8i-codec: Add a comment on the LRCK inversion
  ASoC: sun8i-codec: Set the BCLK divider
  ASoC: rt5663: Delay and retry reading rt5663 ID register
  ASoC: amd: use do_div rather than 64 bit division to fix 32 bit builds
  ASoC: cs42l56: Fix reset GPIO name in example DT binding
  ASoC: rt5514-spi: check irq status to schedule data copy in resume function
  ...
parents 4008e6a9 7087cb8f
......@@ -65,45 +65,6 @@ Optional properties:
a value that is out of range for a 16 bit register then the chip default
will be used. If present exactly five values must be specified.
- wlf,inmode : A list of INn_MODE register values, where n is the number
of input signals. Valid values are 0 (Differential), 1 (Single-ended) and
2 (Digital Microphone). If absent, INn_MODE registers set to 0 by default.
If present, values must be specified less than or equal to the number of
input signals. If values less than the number of input signals, elements
that have not been specified are set to 0 by default. Entries are:
<IN1, IN2, IN3, IN4> (wm5102, wm5110, wm8280, wm8997)
<IN1A, IN2A, IN1B, IN2B> (wm8998, wm1814)
- wlf,out-mono : A list of boolean values indicating whether each output is
mono or stereo. Position within the list indicates the output affected
(eg. First entry in the list corresponds to output 1). A non-zero value
indicates a mono output. If present, the number of values should be less
than or equal to the number of outputs, if less values are supplied the
additional outputs will be treated as stereo.
- wlf,dmic-ref : DMIC reference voltage source for each input, can be
selected from either MICVDD or one of the MICBIAS's, defines
(ARIZONA_DMIC_xxxx) are provided in <dt-bindings/mfd/arizona.txt>. If
present, the number of values should be less than or equal to the
number of inputs, unspecified inputs will use the chip default.
- wlf,max-channels-clocked : The maximum number of channels to be clocked on
each AIF, useful for I2S systems with multiple data lines being mastered.
Specify one cell for each AIF to be configured, specify zero for AIFs that
should be handled normally.
If present, number of cells must be less than or equal to the number of
AIFs. If less than the number of AIFs, for cells that have not been
specified the corresponding AIFs will be treated as default setting.
- wlf,spk-fmt : PDM speaker data format, must contain 2 cells (OUT5 and OUT6).
See the datasheet for values.
The second cell is ignored for codecs that do not have OUT6 (wm5102, wm8997,
wm8998, wm1814)
- wlf,spk-mute : PDM speaker mute setting, must contain 2 cells (OUT5 and OUT6).
See the datasheet for values.
The second cell is ignored for codecs that do not have OUT6 (wm5102, wm8997,
wm8998, wm1814)
- DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if
they are being externally supplied. As covered in
Documentation/devicetree/bindings/regulator/regulator.txt
......@@ -112,6 +73,7 @@ Optional properties:
Also see child specific device properties:
Regulator - ../regulator/arizona-regulator.txt
Extcon - ../extcon/extcon-arizona.txt
Sound - ../sound/arizona.txt
Example:
......
......@@ -17,6 +17,7 @@ Below are same as Simple-Card.
- bitclock-master
- bitclock-inversion
- frame-inversion
- mclk-fs
- dai-tdm-slot-num
- dai-tdm-slot-width
- clocks / system-clock-frequency
......
......@@ -43,7 +43,7 @@ Example 1. Sampling Rate Conversion
label = "sound-card";
prefix = "codec";
routing = "codec Playback", "DAI0 Playback",
"codec Playback", "DAI1 Playback";
"DAI0 Capture", "codec Capture";
convert-rate = <48000>;
dais = <&cpu_port>;
......@@ -79,7 +79,8 @@ Example 2. 2 CPU 1 Codec (Mixing)
label = "sound-card";
prefix = "codec";
routing = "codec Playback", "DAI0 Playback",
"codec Playback", "DAI1 Playback";
"codec Playback", "DAI1 Playback",
"DAI0 Capture", "codec Capture";
convert-rate = <48000>;
dais = <&cpu_port0
......
......@@ -55,7 +55,7 @@ Example:
codec: codec@4b {
compatible = "cirrus,cs42l56";
reg = <0x4b>;
gpio-reset = <&gpio 10 0>;
cirrus,gpio-nreset = <&gpio 10 0>;
cirrus,chgfreq-divisor = <0x05>;
cirrus.ain1_ref_cfg;
cirrus,micbias-lvl = <5>;
......
RT5514 audio CODEC
This device supports I2C only.
This device supports both I2C and SPI.
Required properties:
- compatible : "realtek,rt5514".
- reg : The I2C address of the device.
- reg : the I2C address of the device for I2C, the chip select
number for SPI.
Optional properties:
- clocks: The phandle of the master clock to the CODEC
- clock-names: Should be "mclk"
- interrupt-parent: The phandle for the interrupt controller.
- interrupts: The interrupt number to the cpu. The interrupt specifier format
depends on the interrupt controller.
- realtek,dmic-init-delay-ms
Set the DMIC initial delay (ms) to wait it ready.
Set the DMIC initial delay (ms) to wait it ready for I2C.
Pins on the device (for linking into audio routes) for RT5514:
Pins on the device (for linking into audio routes) for I2C:
* DMIC1L
* DMIC1R
......
......@@ -19,6 +19,22 @@ Optional properties:
Based on the different PCB layout, add the manual offset value to
compensate the DC offset for each L and R channel, and they are different
between headphone and headset.
- "realtek,impedance_sensing_num"
The matrix row number of the impedance sensing table.
If the value is 0, it means the impedance sensing is not supported.
- "realtek,impedance_sensing_table"
The matrix rows of the impedance sensing table are consisted by impedance
minimum, impedance maximun, volume, DC offset w/o and w/ mic of each L and
R channel accordingly. Example is shown as following.
< 0 300 7 0xffd160 0xffd1c0 0xff8a10 0xff8ab0
301 65535 4 0xffe470 0xffe470 0xffb8e0 0xffb8e0>
The first and second column are defined for the impedance range. If the
detected impedance value is in the range, then the volume value of the
third column will be set to codec. In our codec design, each volume value
should compensate different DC offset to avoid the pop sound, and it is
also different between headphone and headset. In the example, the
"realtek,impedance_sensing_num" is 2. It means that there are 2 ranges of
impedance in the impedance sensing function.
Pins on the device (for linking into audio routes) for RT5663:
......
......@@ -37,7 +37,7 @@ VDDIO 1.8V 2.5V 3.3V
Example:
codec: sgtl5000@0a {
codec: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
clocks = <&clks 150>;
......
......@@ -10,13 +10,21 @@ Required properties:
- reg: Base address and size of SAI common register set.
- clocks: Must contain phandle and clock specifier pairs for each entry
in clock-names.
- clock-names: Must contain "x8k" and "x11k"
- clock-names: Must contain "pclk" "x8k" and "x11k"
"pclk": Clock which feeds the peripheral bus interface.
Mandatory for "st,stm32h7-sai" compatible.
Not used for "st,stm32f4-sai" compatible.
"x8k": SAI parent clock for sampling rates multiple of 8kHz.
"x11k": SAI parent clock for sampling rates multiple of 11.025kHz.
- interrupts: cpu DAI interrupt line shared by SAI sub-blocks
Optional properties:
- resets: Reference to a reset controller asserting the SAI
- st,sync: specify synchronization mode.
By default SAI sub-block is in asynchronous mode.
This property sets SAI sub-block as slave of another SAI sub-block.
Must contain the phandle and index of the sai sub-block providing
the synchronization.
SAI subnodes:
Two subnodes corresponding to SAI sub-block instances A et B can be defined.
......@@ -52,8 +60,8 @@ sai1: sai1@40015800 {
#size-cells = <1>;
ranges = <0 0x40015800 0x400>;
reg = <0x40015800 0x4>;
clocks = <&rcc PLL1_Q>, <&rcc PLL2_P>;
clock-names = "x8k", "x11k";
clocks = <&rcc SAI1_CK>, <&rcc PLL1_Q>, <&rcc PLL2_P>;
clock-names = "pclk", "x8k", "x11k";
interrupts = <87>;
sai1a: audio-controller@40015804 {
......
NXP TFA9879 class-D audio amplifier
Required properties:
- compatible : "nxp,tfa9879"
- reg : the I2C address of the device
Example:
&i2c1 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1>;
status = "okay";
codec: tfa9879@6c {
#sound-dai-cells = <0>;
compatible = "nxp,tfa9879";
reg = <0x6c>;
};
};
Cirrus Logic Arizona class audio SoCs
These devices are audio SoCs with extensive digital capabilities and a range
of analogue I/O.
This document lists sound specific bindings, see the primary binding
document:
../mfd/arizona.txt
Optional properties:
- wlf,inmode : A list of INn_MODE register values, where n is the number
of input signals. Valid values are 0 (Differential), 1 (Single-ended) and
2 (Digital Microphone). If absent, INn_MODE registers set to 0 by default.
If present, values must be specified less than or equal to the number of
input signals. If values less than the number of input signals, elements
that have not been specified are set to 0 by default. Entries are:
<IN1, IN2, IN3, IN4> (wm5102, wm5110, wm8280, wm8997)
<IN1A, IN2A, IN1B, IN2B> (wm8998, wm1814)
- wlf,out-mono : A list of boolean values indicating whether each output is
mono or stereo. Position within the list indicates the output affected
(eg. First entry in the list corresponds to output 1). A non-zero value
indicates a mono output. If present, the number of values should be less
than or equal to the number of outputs, if less values are supplied the
additional outputs will be treated as stereo.
- wlf,dmic-ref : DMIC reference voltage source for each input, can be
selected from either MICVDD or one of the MICBIAS's, defines
(ARIZONA_DMIC_xxxx) are provided in <dt-bindings/mfd/arizona.txt>. If
present, the number of values should be less than or equal to the
number of inputs, unspecified inputs will use the chip default.
- wlf,max-channels-clocked : The maximum number of channels to be clocked on
each AIF, useful for I2S systems with multiple data lines being mastered.
Specify one cell for each AIF to be configured, specify zero for AIFs that
should be handled normally.
If present, number of cells must be less than or equal to the number of
AIFs. If less than the number of AIFs, for cells that have not been
specified the corresponding AIFs will be treated as default setting.
- wlf,spk-fmt : PDM speaker data format, must contain 2 cells (OUT5 and OUT6).
See the datasheet for values.
The second cell is ignored for codecs that do not have OUT6 (wm5102, wm8997,
wm8998, wm1814)
- wlf,spk-mute : PDM speaker mute setting, must contain 2 cells (OUT5 and OUT6).
See the datasheet for values.
The second cell is ignored for codecs that do not have OUT6 (wm5102, wm8997,
wm8998, wm1814)
- wlf,out-volume-limit : The volume limit value that should be applied to each
output channel. See the datasheet for exact values. Channels are specified
in the order OUT1L, OUT1R, OUT2L, OUT2R, etc.
......@@ -82,6 +82,8 @@ tpt460
Lenovo Thinkpad T460/560 setup
dual-codecs
Lenovo laptops with dual codecs
alc700-ref
Intel reference board with ALC700 codec
ALC66x/67x/892
==============
......
ALS-007/ALS-100/ALS-200 based sound cards
=========================================
Support for sound cards based around the Avance Logic
ALS-007/ALS-100/ALS-200 chip is included. These chips are a single
chip PnP sound solution which is mostly hardware compatible with the
Sound Blaster 16 card, with most differences occurring in the use of
the mixer registers. For this reason the ALS code is integrated
as part of the Sound Blaster 16 driver (adding only 800 bytes to the
SB16 driver).
To use an ALS sound card under Linux, enable the following options as
modules in the sound configuration section of the kernel config:
- 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support
- FM synthesizer (YM3812/OPL-3) support
- standalone MPU401 support may be required for some cards; for the
ALS-007, when using isapnptools, it is required
Since the ALS-007/100/200 are PnP cards, ISAPnP support should probably be
compiled in. If kernel level PnP support is not included, isapnptools will
be required to configure the card before the sound modules are loaded.
When using kernel level ISAPnP, the kernel should correctly identify and
configure all resources required by the card when the "sb" module is
inserted. Note that the ALS-007 does not have a 16 bit DMA channel and that
the MPU401 interface on this card uses a different interrupt to the audio
section. This should all be correctly configured by the kernel; if problems
with the MPU401 interface surface, try using the standalone MPU401 module,
passing "0" as the "sb" module's "mpu_io" module parameter to prevent the
soundblaster driver attempting to register the MPU401 itself. The onboard
synth device can be accessed using the "opl3" module.
If isapnptools is used to wake up the sound card (as in 2.2.x), the settings
of the card's resources should be passed to the kernel modules ("sb", "opl3"
and "mpu401") using the module parameters. When configuring an ALS-007, be
sure to specify different IRQs for the audio and MPU401 sections - this card
requires they be different. For "sb", "io", "irq" and "dma" should be set
to the same values used to configure the audio section of the card with
isapnp. "dma16" should be explicitly set to "-1" for an ALS-007 since this
card does not have a 16 bit dma channel; if not specified the kernel will
default to using channel 5 anyway which will cause audio not to work.
"mpu_io" should be set to 0. The "io" parameter of the "opl3" module should
also agree with the setting used by isapnp. To get the MPU401 interface
working on an ALS-007 card, the "mpu401" module will be required since this
card uses separate IRQs for the audio and MPU401 sections and there is no
parameter available to pass a different IRQ to the "sb" driver (whose
inbuilt MPU401 driver would otherwise be fine). Insert the mpu401 module
passing appropriate values using the "io" and "irq" parameters.
The resulting sound driver will provide the following capabilities:
- 8 and 16 bit audio playback
- 8 and 16 bit audio recording
- Software selection of record source (line in, CD, FM, mic, master)
- Record and playback of midi data via the external MPU-401
- Playback of midi data using inbuilt FM synthesizer
- Control of the ALS-007 mixer via any OSS-compatible mixer programs.
Controls available are Master (L&R), Line in (L&R), CD (L&R),
DSP/PCM/audio out (L&R), FM (L&R) and Mic in (mono).
Jonathan Woithe
jwoithe@just42.net
30 March 1998
Modified 2000-02-26 by Dave Forrest, drf5n@virginia.edu to add ALS100/ALS200
Modified 2000-04-10 by Paul Laufer, pelaufer@csupomona.edu to add ISAPnP info.
Modified 2000-11-19 by Jonathan Woithe, jwoithe@just42.net
- updated information for kernel 2.4.x.
Driver
------
Information about Audio Excel DSP 16 driver can be found in the source
file aedsp16.c
Please, read the head of the source before using it. It contain useful
information.
Configuration
-------------
The Audio Excel configuration, is now done with the standard Linux setup.
You have to configure the sound card (Sound Blaster or Microsoft Sound System)
and, if you want it, the Roland MPU-401 (do not use the Sound Blaster MPU-401,
SB-MPU401) in the main driver menu. Activate the lowlevel drivers then select
the Audio Excel hardware that you want to initialize. Check the IRQ/DMA/MIRQ
of the Audio Excel initialization: it must be the same as the SBPRO (or MSS)
setup. If the parameters are different, correct it.
I you own a Gallant's audio card based on SC-6600, activate the SC-6600 support.
If you want to change the configuration of the sound board, be sure to
check off all the configuration items before re-configure it.
Module parameters
-----------------
To use this driver as a module, you must configure some module parameters, to
set up I/O addresses, IRQ lines and DMA channels. Some parameters are
mandatory while some others are optional. Here a list of parameters you can
use with this module:
Name Description
==== ===========
MANDATORY
io I/O base address (0x220 or 0x240)
irq irq line (5, 7, 9, 10 or 11)
dma dma channel (0, 1 or 3)
OPTIONAL
mss_base I/O base address for activate MSS mode (default SBPRO)
(0x530 or 0xE80)
mpu_base I/O base address for activate MPU-401 mode
(0x300, 0x310, 0x320 or 0x330)
mpu_irq MPU-401 irq line (5, 7, 9, 10 or 0)
A configuration file in /etc/modprobe.d/ directory will have lines like this:
options opl3 io=0x388
options ad1848 io=0x530 irq=11 dma=3
options aedsp16 io=0x220 irq=11 dma=3 mss_base=0x530
Where the aedsp16 options are the options for this driver while opl3 and
ad1848 are the corresponding options for the MSS and OPL3 modules.
Loading MSS and OPL3 needs to pre load the aedsp16 module to set up correctly
the sound card. Installation dependencies must be written in configuration
files under /etc/modprobe.d/ directory:
softdep ad1848 pre: aedsp16
softdep opl3 pre: aedsp16
Then you must load the sound modules stack in this order:
sound -> aedsp16 -> [ ad1848, opl3 ]
With the above configuration, loading ad1848 or opl3 modules, will
automatically load all the sound stack.
Sound cards supported
---------------------
This driver supports the SC-6000 and SC-6600 based Gallant's sound card.
It don't support the Audio Excel DSP 16 III (try the SC-6600 code).
I'm working on the III version of the card: if someone have useful
information about it, please let me know.
For all the non-supported audio cards, you have to boot MS-DOS (or WIN95)
activating the audio card with the MS-DOS device driver, then you have to
<ctrl>-<alt>-<del> and boot Linux.
Follow these steps:
1) Compile Linux kernel with standard sound driver, using the emulation
you want, with the parameters of your audio card,
e.g. Microsoft Sound System irq10 dma3
2) Install your new kernel as the default boot kernel.
3) Boot MS-DOS and configure the audio card with the boot time device
driver, for MSS irq10 dma3 in our example.
4) <ctrl>-<alt>-<del> and boot Linux. This will maintain the DOS configuration
and will boot the new kernel with sound driver. The sound driver will find
the audio card and will recognize and attach it.
Reports on User successes
-------------------------
> Date: Mon, 29 Jul 1996 08:35:40 +0100
> From: Mr S J Greenaway <sjg95@unixfe.rl.ac.uk>
> To: riccardo@cdc8g5.cdc.polimi.it (Riccardo Facchetti)
> Subject: Re: Audio Excel DSP 16 initialization code
>
> Just to let you know got my Audio Excel (emulating a MSS) working
> with my original SB16, thanks for the driver!
Last revised: 20 August 1998
Riccardo Facchetti
fizban@tin.it
Documentation for CMI 8330 (SoundPRO)
-------------------------------------
Alessandro Zummo <azummo@ita.flashnet.it>
( Be sure to read Documentation/sound/oss/SoundPro too )
This adapter is now directly supported by the sb driver.
The only thing you have to do is to compile the kernel sound
support as a module and to enable kernel ISAPnP support,
as shown below.
CONFIG_SOUND=m
CONFIG_SOUND_SB=m
CONFIG_PNP=y
CONFIG_ISAPNP=y
and optionally:
CONFIG_SOUND_MPU401=m
for MPU401 support.
(I suggest you to use "make menuconfig" or "make xconfig"
for a more comfortable configuration editing)
Then you can do
modprobe sb
and everything will be (hopefully) configured.
You should get something similar in syslog:
sb: CMI8330 detected.
sb: CMI8330 sb base located at 0x220
sb: CMI8330 mpu base located at 0x330
sb: CMI8330 mail reports to Alessandro Zummo <azummo@ita.flashnet.it>
sb: ISAPnP reports CMI 8330 SoundPRO at i/o 0x220, irq 7, dma 1,5
The old documentation file follows for reference
purposes.
How to enable CMI 8330 (SOUNDPRO) soundchip on Linux
------------------------------------------
Stefan Laudat <Stefan.Laudat@asit.ro>
[Note: The CMI 8338 is unrelated and is supported by cmpci.o]
In order to use CMI8330 under Linux you just have to use a proper isapnp.conf, a good isapnp and a little bit of patience. I use isapnp 1.17, but
you may get a better one I guess at http://www.roestock.demon.co.uk/isapnptools/.
Of course you will have to compile kernel sound support as module, as shown below:
CONFIG_SOUND=m
CONFIG_SOUND_OSS=m
CONFIG_SOUND_SB=m
CONFIG_SOUND_ADLIB=m