Commit 98be58f2 authored by Mark Brown's avatar Mark Brown

Add Chameleon v3 ASoC audio

Merge series from Paweł Anikiel <pan@semihalf.com>:

The Google Chameleon v3 is a device made for testing audio and video
paths of other devices. This patchset adds support for ASoC audio on
this device. It has two audio sources: HDMI audio from the it68051 chip
(RX only), and analog audio from the ssm2603 chip (RX and TX).

The patchset adds the ASoC platform and codec drivers.
parents 9b6d1b0c 6f2c1e7c
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/google,chv3-codec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Google Chameleon v3 audio codec
maintainers:
- Paweł Anikiel <pan@semihalf.com>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: google,chv3-codec
"#sound-dai-cells":
const: 0
required:
- compatible
additionalProperties: false
examples:
- |
audio-codec {
compatible = "google,chv3-codec";
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/google,chv3-i2s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Google Chameleon v3 I2S device
maintainers:
- Paweł Anikiel <pan@semihalf.com>
description: |
I2S device for the Google Chameleon v3. The device handles both RX
and TX using a producer/consumer ring buffer design.
properties:
compatible:
const: google,chv3-i2s
reg:
items:
- description: core registers
- description: irq registers
interrupts:
maxItems: 1
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
i2s@c0060300 {
compatible = "google,chv3-i2s";
reg = <0xc0060300 0x100>,
<0xc0060f00 0x10>;
interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
};
...@@ -75,6 +75,7 @@ source "sound/soc/bcm/Kconfig" ...@@ -75,6 +75,7 @@ source "sound/soc/bcm/Kconfig"
source "sound/soc/cirrus/Kconfig" source "sound/soc/cirrus/Kconfig"
source "sound/soc/dwc/Kconfig" source "sound/soc/dwc/Kconfig"
source "sound/soc/fsl/Kconfig" source "sound/soc/fsl/Kconfig"
source "sound/soc/google/Kconfig"
source "sound/soc/hisilicon/Kconfig" source "sound/soc/hisilicon/Kconfig"
source "sound/soc/jz4740/Kconfig" source "sound/soc/jz4740/Kconfig"
source "sound/soc/kirkwood/Kconfig" source "sound/soc/kirkwood/Kconfig"
......
...@@ -43,6 +43,7 @@ obj-$(CONFIG_SND_SOC) += bcm/ ...@@ -43,6 +43,7 @@ obj-$(CONFIG_SND_SOC) += bcm/
obj-$(CONFIG_SND_SOC) += cirrus/ obj-$(CONFIG_SND_SOC) += cirrus/
obj-$(CONFIG_SND_SOC) += dwc/ obj-$(CONFIG_SND_SOC) += dwc/
obj-$(CONFIG_SND_SOC) += fsl/ obj-$(CONFIG_SND_SOC) += fsl/
obj-$(CONFIG_SND_SOC) += google/
obj-$(CONFIG_SND_SOC) += hisilicon/ obj-$(CONFIG_SND_SOC) += hisilicon/
obj-$(CONFIG_SND_SOC) += jz4740/ obj-$(CONFIG_SND_SOC) += jz4740/
obj-$(CONFIG_SND_SOC) += img/ obj-$(CONFIG_SND_SOC) += img/
......
...@@ -57,6 +57,7 @@ config SND_SOC_ALL_CODECS ...@@ -57,6 +57,7 @@ config SND_SOC_ALL_CODECS
imply SND_SOC_AW88395 imply SND_SOC_AW88395
imply SND_SOC_BT_SCO imply SND_SOC_BT_SCO
imply SND_SOC_BD28623 imply SND_SOC_BD28623
imply SND_SOC_CHV3_CODEC
imply SND_SOC_CQ0093VC imply SND_SOC_CQ0093VC
imply SND_SOC_CROS_EC_CODEC imply SND_SOC_CROS_EC_CODEC
imply SND_SOC_CS35L32 imply SND_SOC_CS35L32
...@@ -644,6 +645,13 @@ config SND_SOC_BD28623 ...@@ -644,6 +645,13 @@ config SND_SOC_BD28623
config SND_SOC_BT_SCO config SND_SOC_BT_SCO
tristate "Dummy BT SCO codec driver" tristate "Dummy BT SCO codec driver"
config SND_SOC_CHV3_CODEC
tristate "Google Chameleon v3 codec driver"
help
Enable support for the Google Chameleon v3 audio codec.
This codec does not have a control interface, it always outputs
8 channel S32_LE audio.
config SND_SOC_CPCAP config SND_SOC_CPCAP
tristate "Motorola CPCAP codec" tristate "Motorola CPCAP codec"
depends on MFD_CPCAP || COMPILE_TEST depends on MFD_CPCAP || COMPILE_TEST
......
...@@ -51,6 +51,7 @@ snd-soc-aw88395-objs := aw88395/aw88395.o \ ...@@ -51,6 +51,7 @@ snd-soc-aw88395-objs := aw88395/aw88395.o \
aw88395/aw88395_device.o aw88395/aw88395_device.o
snd-soc-bd28623-objs := bd28623.o snd-soc-bd28623-objs := bd28623.o
snd-soc-bt-sco-objs := bt-sco.o snd-soc-bt-sco-objs := bt-sco.o
snd-soc-chv3-codec-objs := chv3-codec.o
snd-soc-cpcap-objs := cpcap.o snd-soc-cpcap-objs := cpcap.o
snd-soc-cq93vc-objs := cq93vc.o snd-soc-cq93vc-objs := cq93vc.o
snd-soc-cros-ec-codec-objs := cros_ec_codec.o snd-soc-cros-ec-codec-objs := cros_ec_codec.o
...@@ -427,6 +428,7 @@ obj-$(CONFIG_SND_SOC_AW88395_LIB) += snd-soc-aw88395-lib.o ...@@ -427,6 +428,7 @@ obj-$(CONFIG_SND_SOC_AW88395_LIB) += snd-soc-aw88395-lib.o
obj-$(CONFIG_SND_SOC_AW88395) +=snd-soc-aw88395.o obj-$(CONFIG_SND_SOC_AW88395) +=snd-soc-aw88395.o
obj-$(CONFIG_SND_SOC_BD28623) += snd-soc-bd28623.o obj-$(CONFIG_SND_SOC_BD28623) += snd-soc-bd28623.o
obj-$(CONFIG_SND_SOC_BT_SCO) += snd-soc-bt-sco.o obj-$(CONFIG_SND_SOC_BT_SCO) += snd-soc-bt-sco.o
obj-$(CONFIG_SND_SOC_CHV3_CODEC) += snd-soc-chv3-codec.o
obj-$(CONFIG_SND_SOC_CQ0093VC) += snd-soc-cq93vc.o obj-$(CONFIG_SND_SOC_CQ0093VC) += snd-soc-cq93vc.o
obj-$(CONFIG_SND_SOC_CPCAP) += snd-soc-cpcap.o obj-$(CONFIG_SND_SOC_CPCAP) += snd-soc-cpcap.o
obj-$(CONFIG_SND_SOC_CROS_EC_CODEC) += snd-soc-cros-ec-codec.o obj-$(CONFIG_SND_SOC_CROS_EC_CODEC) += snd-soc-cros-ec-codec.o
......
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/module.h>
#include <sound/soc.h>
static struct snd_soc_dai_driver chv3_codec_dai = {
.name = "chv3-codec-hifi",
.capture = {
.stream_name = "Capture",
.channels_min = 8,
.channels_max = 8,
.rates = SNDRV_PCM_RATE_CONTINUOUS,
.formats = SNDRV_PCM_FMTBIT_S32_LE,
},
};
static const struct snd_soc_component_driver soc_component_dev_chv3_codec = {
};
static int chv3_codec_probe(struct platform_device *pdev)
{
return devm_snd_soc_register_component(&pdev->dev,
&soc_component_dev_chv3_codec, &chv3_codec_dai, 1);
}
static const struct of_device_id chv3_codec_of_match[] = {
{ .compatible = "google,chv3-codec", },
{ }
};
static struct platform_driver chv3_codec_platform_driver = {
.driver = {
.name = "chv3-codec",
.of_match_table = chv3_codec_of_match,
},
.probe = chv3_codec_probe,
};
module_platform_driver(chv3_codec_platform_driver);
MODULE_DESCRIPTION("ASoC Chameleon v3 codec driver");
MODULE_AUTHOR("Pawel Anikiel <pan@semihalf.com>");
MODULE_LICENSE("GPL");
# SPDX-License-Identifier: GPL-2.0-only
config SND_SOC_CHV3_I2S
tristate "Google Chameleon v3 I2S device"
help
Enable support for the Google Chameleon v3 I2S device.
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_SND_SOC_CHV3_I2S) += chv3-i2s.o
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment