[alsa-devel] [PATCH 0/2] wm8904: adapt driver for use with audio-graph-card

Michał Mirosław mirq-linux at rere.qmqm.pl
Mon Jul 22 19:57:19 CEST 2019


This series allows to use WM8904 codec as audio-graph-card component.
It is a rewrite of an earlier approach from
https://patchwork.kernel.org/patch/10738097/

Series based on tiwai/sound/for-next tree. You can also pull from:
   https://rere.qmqm.pl/git/linux
branch:
   wm8904

Example DTS:

/ {
        sound { 
                compatible = "audio-graph-card"; 

                widgets = 
                        "Speaker", "Loudspeaker", 
                        "Headphone", "Headphone Jack", 
                        "Microphone", "Internal Mic", 

                routing = 
                        "Headphone Jack", "HPOUTL", 
                        "Headphone Jack", "HPOUTR", 
                        "Amplifier", "LINEOUTL",
                        "Amplifier", "LINEOUTR",
                        "Loudspeaker", "Amplifier",
                        "IN1L", "MICBIAS",
                        "IN1L", "Internal Mic";

                dais = <&ssc0_port>;
        };
};

&i2c1 {
        status = "okay";

        wm8904: acodec at 1a {
                compatible = "wlf,wm8904";
                reg = <0x1a>;
                clocks = <&rtc_32k>;
                clock-names = "mclk";
                interrupts-extended = <&pioA PIN_PB3 IRQ_TYPE_LEVEL_HIGH>;

                #sound-dai-cells = <0>;

                codec_port: port {         
                        codec_ep: endpoint {
                                remote-endpoint = <&ssc0_ep>;
                                dai-format = "left_j";
                                bitclock-master;
                                frame-master;
                                mclk-fs = <256>;
                        };
                };
        };
};

&ssc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_ssc0_default>;
        status = "okay";

        atmel,shared-fs-pin;
        #sound-dai-cells = <0>;

        ssc0_port: port {
                ssc0_ep: endpoint {
                        remote-endpoint = <&codec_ep>;
                };
        };
};


Michał Mirosław (2):
  ASoC: wm8904: rework FLL handling
  ASoC: wm8904: automatically choose clock source

 .../devicetree/bindings/sound/wm8904.txt      |   4 +
 sound/soc/atmel/atmel_wm8904.c                |  11 +-
 sound/soc/codecs/Kconfig                      |   4 +
 sound/soc/codecs/Makefile                     |   2 +
 sound/soc/codecs/wm8904.c                     | 494 ++++++------------
 sound/soc/codecs/wm8904.h                     |   5 -
 sound/soc/codecs/wm_fll.c                     | 339 ++++++++++++
 sound/soc/codecs/wm_fll.h                     |  26 +
 8 files changed, 531 insertions(+), 354 deletions(-)
 create mode 100644 sound/soc/codecs/wm_fll.c
 create mode 100644 sound/soc/codecs/wm_fll.h

-- 
2.20.1



More information about the Alsa-devel mailing list