linux/sound/pci
Vitaly Rodionov 6cc7e93f46 ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec.
Dell's laptops Inspiron 3500, Inspiron 3501, Inspiron 3505 are using Cirrus Logic
CS8409 HDA bridge with CS42L42 companion codec.

The CS8409 is a multichannel HD audio routing controller.
CS8409 includes support for four channels of digital
microphone data and two bidirectional ASPs for up to 32
channels of TDM data or 4 channels of I2S data. The CS8409 is
intended to be used with a remote companion codec that implements
high performance analog functions in close physical
proximity to the end-equipment audio port or speaker driver.

The CS42L42 is a low-power audio codec with integrated MIPI
SoundWire interface or I2C/I2S/TDM interfaces designed
for portable applications. It provides a high-dynamic range,
stereo DAC for audio playback and a mono high-dynamic-range
ADC for audio capture

CS42L42 is connected to CS8409 HDA bridge via I2C and I2S.

CS8409          CS42L42
-------         --------
ASP1.A TX  -->  ASP_SDIN
ASP1.A RX  <--  ASP_SDOUT
GPIO5      -->  RST#
GPIO4      <--  INT#
GPIO3      <--  WAKE#
GPIO7      <->  I2C SDA
GPIO6      -->  I2C CLK

Tested on DELL Inspiron-3500, DELL Inspiron-3501, DELL Inspiron-3505

This patch will register CS8409 with sound card and create
input/output paths and two input devices, initialise CS42L42
companion codec and configure it for ASP TX/RX TDM mode,
24bit, 48kHz.

cat /proc/asound/pcm
00-00: CS8409 Analog : CS8409 Analog : playback 1 : capture 1
00-03: HDMI 0 : HDMI 0 : playback 1

dmesg
snd_hda_codec_cirrus hdaudioC0D0: autoconfig for CS8409: line_outs=1 (0x2c/0x0/0x0/0x0/0x0) type:speaker
snd_hda_codec_cirrus hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
snd_hda_codec_cirrus hdaudioC0D0:    hp_outs=1 (0x24/0x0/0x0/0x0/0x0)
snd_hda_codec_cirrus hdaudioC0D0:    mono: mono_out=0x0
snd_hda_codec_cirrus hdaudioC0D0:    inputs:
snd_hda_codec_cirrus hdaudioC0D0:      Internal Mic=0x44
snd_hda_codec_cirrus hdaudioC0D0:      Mic=0x34
input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8
input: HDA Intel PCH Headset Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9

Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210306111934.4832-3-vitalyr@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-03-07 09:17:44 +01:00
..
ac97 ALSA: Replace the word "slave" in vmaster API 2020-07-20 10:10:47 +02:00
ali5451 ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
asihpi ALSA: asihpi: Use DIV_ROUND_UP() instead of open-coding it 2020-12-25 09:11:48 +01:00
au88x0 ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
aw2 ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
ca0106 ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
cs46xx ALSA: cx46xx: Use DIV_ROUND_UP() instead of open-coding it 2020-12-25 09:11:49 +01:00
cs5535audio ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
ctxfi ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits 2021-02-28 09:12:41 +01:00
echoaudio ALSA: echoaudio: Fix potential Oops in snd_echo_resume() 2020-08-13 11:21:05 +02:00
emu10k1 ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
hda ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec. 2021-03-07 09:17:44 +01:00
ice1712 ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
korg1212 ALSA: pci/korg1212: remove 'set but not used' warnings 2020-07-07 12:10:21 +02:00
lola ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
lx6464es ALSA: lx6464es: More constifications 2020-01-05 16:15:07 +01:00
mixart ALSA: pci: mixart: fix kernel-doc warning 2021-03-03 09:25:15 +01:00
nm256 ALSA: nm256: Replace the words blacklist 2020-07-15 14:31:56 +02:00
oxygen ALSA: pci: delete repeated words in comments 2020-08-06 09:30:02 +02:00
pcxhr ALSA: pcxhr: More constifications 2020-01-05 16:14:47 +01:00
riptide ALSA: riptide: Replace tasklet with threaded irq 2020-09-09 18:34:10 +02:00
rme9652 ALSA: hdsp: hardware output loopback 2021-02-02 10:34:27 +01:00
trident ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
vx222 ALSA: pci: vx222: fix kernel-doc warning 2021-03-03 09:25:22 +01:00
ymfpci ALSA: Use fallthrough pseudo-keyword 2020-07-09 13:01:29 +02:00
ad1889.c ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
ad1889.h
ak4531_codec.c ALSA: ak4531: More constification 2020-01-05 16:15:09 +01:00
als300.c ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
als4000.c ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
atiixp_modem.c ALSA: atiixp: More constifications 2020-01-05 16:14:54 +01:00
atiixp.c ALSA: Use fallthrough pseudo-keyword 2020-07-09 13:01:29 +02:00
azt3328.c ALSA: azt3328: Assign boolean values to a bool variable 2021-02-07 09:49:04 +01:00
azt3328.h
bt87x.c ALSA: bt87x: Use DIV_ROUND_UP() instead of open-coding it 2020-12-25 09:11:48 +01:00
cmipci.c ALSA: cmipci: More constifications 2020-01-05 16:14:55 +01:00
cs4281.c ALSA: cs4281: More constification 2020-01-05 16:15:10 +01:00
cs5530.c ALSA: pci: Constify snd_device_ops definitions 2020-01-03 09:23:56 +01:00
ens1370.c ALSA: ens1370: Use DIV_ROUND_CLOSEST() instead of open-coding it 2020-12-25 09:11:56 +01:00
ens1371.c
es1938.c ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
es1968.c ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
fm801.c ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
intel8x0.c ALSA: intel8x0: Replace the words white/blacklist 2020-07-15 14:31:56 +02:00
intel8x0m.c ALSA: intel8x0: Fix missing check in snd_intel8x0m_create 2021-02-01 09:17:01 +01:00
Kconfig sound: Fix Kconfig indentation 2019-10-07 03:53:03 +02:00
maestro3.c ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
Makefile
rme32.c ALSA: remove unneeded break 2020-10-26 15:27:13 +01:00
rme96.c sound updates for 5.6-rc1 2020-01-28 16:26:57 -08:00
sis7019.c ALSA: sis7019: Use DIV_ROUND_CLOSEST() instead of open-coding it 2020-12-25 09:11:56 +01:00
sis7019.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 274 2019-06-05 17:30:30 +02:00
sonicvibes.c ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
via82xx_modem.c ALSA: pci/via82xx: remove 'set but not used' warnings 2020-07-07 12:12:38 +02:00
via82xx.c ALSA: via82xx: Replace the words whitelist 2020-07-15 14:31:57 +02:00