Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ASoC support for boards/HATs using ESS Sabre ES9023 DAC #1459

Closed
5 changes: 5 additions & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ endif
dtbo-$(RPI_DT_OVERLAYS) += adau1977-adc.dtbo
dtbo-$(RPI_DT_OVERLAYS) += ads1015.dtbo
dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo
dtbo-$(RPI_DT_OVERLAYS) += akkordion-es9023-audio.dtbo
dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo
dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo
dtbo-$(RPI_DT_OVERLAYS) += audioinjector-wm8731-audio.dtbo
Expand All @@ -25,15 +26,18 @@ dtbo-$(RPI_DT_OVERLAYS) += dpi24.dtbo
dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo
dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo
dtbo-$(RPI_DT_OVERLAYS) += enc28j60.dtbo
dtbo-$(RPI_DT_OVERLAYS) += es9023-audio.dtbo
dtbo-$(RPI_DT_OVERLAYS) += gpio-ir.dtbo
dtbo-$(RPI_DT_OVERLAYS) += gpio-poweroff.dtbo
dtbo-$(RPI_DT_OVERLAYS) += hifiberry-amp.dtbo
dtbo-$(RPI_DT_OVERLAYS) += hifiberry-dac.dtbo
dtbo-$(RPI_DT_OVERLAYS) += hifiberry-dacplus.dtbo
dtbo-$(RPI_DT_OVERLAYS) += hifiberry-dacpluslight-es9023-audio.dtbo
dtbo-$(RPI_DT_OVERLAYS) += hifiberry-digi.dtbo
dtbo-$(RPI_DT_OVERLAYS) += hifiberry-digi-pro.dtbo
dtbo-$(RPI_DT_OVERLAYS) += hy28a.dtbo
dtbo-$(RPI_DT_OVERLAYS) += hy28b.dtbo
dtbo-$(RPI_DT_OVERLAYS) += i-sabre-dac-es9023-audio.dtbo
dtbo-$(RPI_DT_OVERLAYS) += i2c-gpio.dtbo
dtbo-$(RPI_DT_OVERLAYS) += i2c-mux.dtbo
dtbo-$(RPI_DT_OVERLAYS) += i2c-pwm-pca9685a.dtbo
Expand All @@ -48,6 +52,7 @@ dtbo-$(RPI_DT_OVERLAYS) += iqaudio-digi-wm8804-audio.dtbo
dtbo-$(RPI_DT_OVERLAYS) += justboom-dac.dtbo
dtbo-$(RPI_DT_OVERLAYS) += justboom-digi.dtbo
dtbo-$(RPI_DT_OVERLAYS) += lirc-rpi.dtbo
dtbo-$(RPI_DT_OVERLAYS) += mamboberry-dacplus-es9023-audio.dtbo
dtbo-$(RPI_DT_OVERLAYS) += mcp23017.dtbo
dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can0.dtbo
dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can1.dtbo
Expand Down
95 changes: 95 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,26 @@ Params: cs SPI bus Chip Select (default 1)
www.kernel.org/doc/Documentation/devicetree/bindings/input/ads7846.txt


Name: akkordion-es9023-audio
Info: Configures the Digital Dreamtime Akkordion Music Player (with ESS Sabre
ES9023 DAC).
Load: dtoverlay=akkordion-es9023-audio,<param>
Params: 384k Instructs the es9023 codec driver to support
352k8 and 384k sample rates.
bclk_ratio_int_div Use bclk_ratio=50 for 16/24bps and
bclk_ratio=100 for 32bps media when sample
rate is a multiple of 8kHz and less than
192kHz. Which causes the selection of the 19M2
OSC as the parent for the PCM clock with an
integer divider, rather than PLLD with
fractional divider and MASH noise shaping.
card_name Override the default, "Akkordion", card name.
dai_name Override the default, "Akkordion DAC",
dai name.
dai_stream_name Override the default, "Akkordion DAC HiFi",
dai stream name.


Name: akkordion-iqdacplus
Info: Configures the Digital Dreamtime Akkordion Music Player (based on the
OEM IQAudIO DAC+ or DAC Zero module).
Expand Down Expand Up @@ -314,6 +334,24 @@ Params: int_pin GPIO used for INT (default 25)
speed SPI bus speed (default 12000000)


Name: es9023-audio
Info: Configures a generic board or HAT using ESS Sabre ES9023 DAC
Load: dtoverlay=es9023-audio,<param>
Params: 384k Instructs the es9023 codec driver to support
352k8 and 384k sample rates.
bclk_ratio_int_div Use bclk_ratio=50 for 16/24bps and
bclk_ratio=100 for 32bps media when sample
rate is a multiple of 8kHz and less than
192kHz. Which causes the selection of the 19M2
OSC as the parent for the PCM clock with an
integer divider, rather than PLLD with
fractional divider and MASH noise shaping.
card_name Override the default, "es9023", card name.
dai_name Override the default, "ES9023 DAC" dai name.
dai_stream_name Override the default, "ES9023 DAC HiFi",
dai stream name.


Name: gpio-ir
Info: Use GPIO pin as rc-core style infrared receiver input. The rc-core-
based gpio_ir_recv driver maps received keys directly to a
Expand Down Expand Up @@ -376,6 +414,26 @@ Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec
master for bit clock and frame clock.


Name: hifiberry-dacpluslight-es9023-audio
Info: Configures the HiFiBerry DAC+ Light audio card
Load: dtoverlay=hifiberry-dacpluslight-es9023-audio,<param>
Params: 384k Instructs the es9023 codec driver to support
352k8 and 384k sample rates.
bclk_ratio_int_div Use bclk_ratio=50 for 16/24bps and
bclk_ratio=100 for 32bps media when sample
rate is a multiple of 8kHz and less than
192kHz. Which causes the selection of the 19M2
OSC as the parent for the PCM clock with an
integer divider, rather than PLLD with
fractional divider and MASH noise shaping.
card_name Override the default, "snd_rpi_hifiberry_dac",
card name.
dai_name Override the default, "HifiBerry DAC",
dai name.
dai_stream_name Override the default, "HifiBerry DAC HiFi",
dai stream name.


Name: hifiberry-digi
Info: Configures the HifiBerry Digi and Digi+ audio card
Load: dtoverlay=hifiberry-digi
Expand Down Expand Up @@ -426,6 +484,24 @@ Params: speed Display SPI bus speed
ledgpio GPIO used to control backlight


Name: i-sabre-dac-es9023-audio
Info: Configures the Audiophonics I-Sabre DAC
Load: dtoverlay=i-sabre-dac-es9023-audio,<param>
Params: 384k Instructs the es9023 codec driver to support
352k8 and 384k sample rates.
bclk_ratio_int_div Use bclk_ratio=50 for 16/24bps and
bclk_ratio=100 for 32bps media when sample
rate is a multiple of 8kHz and less than
192kHz. Which causes the selection of the 19M2
OSC as the parent for the PCM clock with an
integer divider, rather than PLLD with
fractional divider and MASH noise shaping.
card_name Override the default, "ISabre", card name.
dai_name Override the default, "ISabre DAC", dai name.
dai_stream_name Override the default, "ISabre DAC HiFi",
dai stream name.


Name: i2c-gpio
Info: Adds support for software i2c controller on gpio pins
Load: dtoverlay=i2c-gpio,<param>=<val>
Expand Down Expand Up @@ -619,6 +695,25 @@ Params: gpio_out_pin GPIO for output (default "17")
(default "off")


Name: mamboberry-dacplus-es9023-audio
Info: Configures the Collybia Mamboberry HiFi DAC+
Load: dtoverlay=mamboberry-dacplus-es9023-audio,<param>
Params: 384k Instructs the es9023 codec driver to support
352k8 and 384k sample rates.
bclk_ratio_int_div Use bclk_ratio=50 for 16/24bps and
bclk_ratio=100 for 32bps media when sample
rate is a multiple of 8kHz and less than
192kHz. Which causes the selection of the 19M2
OSC as the parent for the PCM clock with an
integer divider, rather than PLLD with
fractional divider and MASH noise shaping.
card_name Override the default, "Mamboberry", card name.
dai_name Override the default, "Mamboberry DAC+",
dai name.
dai_stream_name Override the default, "Mamboberry DAC+ HiFi",
dai stream name.


Name: mcp23017
Info: Configures the MCP23017 I2C GPIO expander
Load: dtoverlay=mcp23017,<param>=<val>
Expand Down
57 changes: 57 additions & 0 deletions arch/arm/boot/dts/overlays/akkordion-es9023-audio-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Definitions for Digital Dreamtime Akkordion using ESS Sabre ES9023 DAC
/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2708";

fragment@0 {
target = <&i2s>;
__overlay__ {
status = "okay";
};
};

fragment@1 {
target-path = "/";
__overlay__ {
es9023_codec: es9023-codec {
#sound-dai-cells = <0>;
compatible = "ess,es9023";
status = "okay";
};
};
};

fragment@2 {
target = <&sound>;
es9023_dac: __overlay__ {
compatible = "digitaldreamtime,es9023-akkordion-dac";
/*
* These are the default names that will be
* applied by the es9023-dac machine driver
* based on the compatible parameter.
*
* es9023-dac,card-name = "Akkordion"
* es9023-dac,dai-name = "Akkordion DAC";
* es9023-dac,dai-stream-name = "Akkordion DAC HiFi";
*/
status = "okay";
es9023-dac,cpu {
sound-dai = <&i2s>;
};
es9023-dac,codec {
sound-dai = <&es9023_codec>;
};
};
};

__overrides__ {
384k = <&es9023_codec>,"es9023,384k?";
bclk_ratio_int_div =
<&es9023_dac>,"es9023-dac,bclk-ratio-int-div?";
card_name = <&es9023_dac>,"es9023-dac,card-name";
dai_name = <&es9023_dac>,"es9023-dac,dai-name";
dai_stream_name = <&es9023_dac>,"es9023-dac,dai-stream-name";
};
};
64 changes: 64 additions & 0 deletions arch/arm/boot/dts/overlays/es9023-audio-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Definitions for a generic board or HAT using ESS Sabre ES9023 DAC

// NB. Manufacturers of ES9023 DAC boards wishing to use their own ALSA names
// in preference to the generic names defined here, should copy this
// file, rename and edit it. Do not change the card, dai, and dai stream
// names being set below, in this generic es9023-audio overlay!
// (eg. akkordion-es9023-audio and i-sabre-dac-es9023-audio.)

/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2708";

fragment@0 {
target = <&i2s>;
__overlay__ {
status = "okay";
};
};

fragment@1 {
target-path = "/";
__overlay__ {
es9023_codec: es9023-codec {
#sound-dai-cells = <0>;
compatible = "ess,es9023";
status = "okay";
};
};
};

fragment@2 {
target = <&sound>;
es9023_dac: __overlay__ {
compatible = "es9023-dac";
/*
* These are the default names that will be
* applied by the es9023-dac machine driver
* based on the compatible parameter.
*
* es9023-dac,card-name = "es9023";
* es9023-dac,dai-name = "ES9023 DAC";
* es9023-dac,dai-stream-name = "ES9023 DAC HiFi";
*/
status = "okay";
es9023-dac,cpu {
sound-dai = <&i2s>;
};
es9023-dac,codec {
sound-dai = <&es9023_codec>;
};
};
};

__overrides__ {
384k = <&es9023_codec>,"es9023,384k?";
bclk_ratio_int_div =
<&es9023_dac>,"es9023-dac,bclk-ratio-int-div?";
card_name = <&es9023_dac>,"es9023-dac,card-name";
dai_name = <&es9023_dac>,"es9023-dac,dai-name";
dai_stream_name = <&es9023_dac>,"es9023-dac,dai-stream-name";
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Definitions for HiFiBerry DAC+ Light using ESS Sabre ES9023 DAC
/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2708";

fragment@0 {
target = <&i2s>;
__overlay__ {
status = "okay";
};
};

fragment@1 {
target-path = "/";
__overlay__ {
es9023_codec: es9023-codec {
#sound-dai-cells = <0>;
compatible = "ess,es9023";
status = "okay";
};
};
};

fragment@2 {
target = <&sound>;
es9023_dac: __overlay__ {
compatible = "hifiberry,es9023-dacpluslight";
/*
* These are the default names that will be
* applied by the es9023-dac machine driver
* based on the compatible parameter.
*
* es9023-dac,card-name = "snd_rpi_hifiberry_dac";
* es9023-dac,dai-name = "HifiBerry DAC";
* es9023-dac,dai-stream-name = "HifiBerry DAC HiFi";
*/
status = "okay";
es9023-dac,cpu {
sound-dai = <&i2s>;
};
es9023-dac,codec {
sound-dai = <&es9023_codec>;
};
};
};

__overrides__ {
384k = <&es9023_codec>,"es9023,384k?";
bclk_ratio_int_div =
<&es9023_dac>,"es9023-dac,bclk-ratio-int-div?";
card_name = <&es9023_dac>,"es9023-dac,card-name";
dai_name = <&es9023_dac>,"es9023-dac,dai-name";
dai_stream_name = <&es9023_dac>,"es9023-dac,dai-stream-name";
};
};
Loading