diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2020-04-13 09:47:38 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2020-08-14 01:55:15 +0200 |
commit | 7d980f44409812237879800b7520a5cc4b252792 (patch) | |
tree | 8b5d64d2742e10d2b076ad3f92e4ea002242c877 | |
parent | f07e9d1baaf8e5941356f8f1dd460c231dfae1e0 (diff) | |
download | openfirmware-7d980f44409812237879800b7520a5cc4b252792.tar.gz |
olpc/sound: make /audio-complex compatible with audio-graph-card
-rw-r--r-- | cpu/arm/olpc/sound.fth | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/cpu/arm/olpc/sound.fth b/cpu/arm/olpc/sound.fth index 56d629fd..93f947a7 100644 --- a/cpu/arm/olpc/sound.fth +++ b/cpu/arm/olpc/sound.fth @@ -9,6 +9,17 @@ new-device : close ( -- ) ; : codec@ ( reg# -- w ) " reg-w@" $call-parent ; : codec! ( w reg# -- ) " reg-w!" $call-parent ; + + new-device + " port" device-name + new-device + " endpoint" device-name + d# 256 " mclk-fs" integer-property + " /audio-clocks" encode-phandle + mmp2-audio-sys-clk# encode-int encode+ + " clocks" property + finish-device + finish-device finish-device device-end @@ -185,6 +196,16 @@ d# 2 " interrupts" integer-property " dmas" property " tx" encode-string " rx" encode-string encode+ " dma-names" property +new-device + " port" device-name + new-device + " endpoint" device-name + " i2s" " dai-format" string-property + 0 0 " bitclock-master" property + 0 0 " frame-master" property + finish-device +finish-device + 0 value sspa-base \ E.g. h# 2a.0c00 +io 0 value adma-base \ E.g. h# 2a.0800 +io : sspa! ( n offset -- ) sspa-base + rl! ; \ Write a register in SSPA1 @@ -1025,14 +1046,26 @@ device-end [ifdef] olpc-cl2 " olpc,xo1.75-audio" +compatible [then] + : +string encode-string encode+ ; + + " audio-graph-card" +compatible + " OLPC XO" " label" string-property + 0 0 encode-bytes + " Headphones" +string " HPOL" +string + " Headphones" +string " HPOR" +string + " MIC2" +string " Mic Jack" +string + " routing" property + 0 0 encode-bytes + " Headphone" +string " Headphones" +string + " Microphone" +string " Mic Jack" +string + " widgets" property + " /audio/port" encode-phandle " dais" property \ The name that was hardcoded in the Linux driver was OLPC XO-1.75 " OLPC XO" " model" string-property 0 0 reg \ So linux will assign a static device name - : +string encode-string encode+ ; - 0 0 encode-bytes " Headphone Jack" +string " HPOL" +string " Headphone Jack" +string " HPOR" +string @@ -1054,6 +1087,8 @@ device-end h# 4101 " dai-format" encode-int end-package +" /audio/port/endpoint" " /audio-codec/port/endpoint" link-endpoints + \ LICENSE_BEGIN \ Copyright (c) 2011 FirmWorks \ |