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 audio support #9

Open
Ham22 opened this issue Feb 13, 2017 · 4 comments
Open

Add audio support #9

Ham22 opened this issue Feb 13, 2017 · 4 comments

Comments

@Ham22
Copy link
Member

Ham22 commented Feb 13, 2017

Port over all the audio patches including synchronisation features:
CreatorDev/openwrt#237 and CreatorDev/openwrt#242 were closed down after cleanup but the work was just pushed to a temporary branch for now TODO-put-link-to-branch-here in order to simplify upstreaming.

Main considerations are:

  • start_at implementation including abort functions
  • atu driver
  • event timer driver
  • pistachio sound card (based on upstream dts because it's different to internal repos)
  • lede kmod for pistachio-sound-soc

Acceptance criteria:

  • alsa-utils speaker test needs to build and be working
@ghost ghost added s: development and removed s: design labels Feb 14, 2017
@ghost ghost self-assigned this Feb 14, 2017
@ghost
Copy link

ghost commented Feb 14, 2017

It seems that there is a bug within binutils-2.25. I managed building speaker-test with binutil-2.27.
Also, to avoid the CPU DAI (null) not registered error at boot, I had to load some modules before pistachio.ko:

diff --git a/target/linux/pistachio/modules.mk b/target/linux/pistachio/modules.mk
index 3e69c3997ccf..a85e8cfda8e1 100644
--- a/target/linux/pistachio/modules.mk
+++ b/target/linux/pistachio/modules.mk
@@ -30,7 +30,7 @@ define KernelPackage/sound-pistachio-soc
        $(LINUX_DIR)/sound/soc/img/pistachio-internal-dac.ko \
        $(LINUX_DIR)/sound/soc/img/pistachio-event-timer.ko \
        $(LINUX_DIR)/sound/soc/img/pistachio-event-timer-atu.ko
-  AUTOLOAD:=$(call AutoLoad,68,pistachio pistachio-internal-dac pistachio-event-timer-atu)
+  AUTOLOAD:=$(call AutoLoad,68,img-i2s-in img-i2s-out img-parallel-out img-spdif-in img-spdif-out pistachio-internal-dac pistachio-event-timer-atu pistachio)
   $(call AddDepends/sound)
 endef

@ghost
Copy link

ghost commented Feb 14, 2017

Adding packages I enabled by default for audio support:

diff --git a/target/linux/pistachio/profiles/00-default.mk b/target/linux/pistachio/profiles/00-default.mk
index f40be3d66774..2776c04d8923 100644
--- a/target/linux/pistachio/profiles/00-default.mk
+++ b/target/linux/pistachio/profiles/00-default.mk
@@ -8,7 +8,7 @@
 define Profile/Default
   NAME:=Default Profile
   PRIORITY:=1
-  PACKAGES:=
+  PACKAGES:=kmod-sound-pistachio-soc alsa-lib alsa-utils alsa-utils-tests
 endef
 
 define Profile/Default/Description

@ghost ghost removed their assignment Feb 14, 2017
@ghost ghost assigned ghost and unassigned ghost Feb 15, 2017
@ghost ghost added s: design and removed s: development labels Feb 17, 2017
@Ham22 Ham22 self-assigned this Feb 20, 2017
@Ham22 Ham22 removed their assignment Feb 24, 2017
@Ham22
Copy link
Member Author

Ham22 commented Feb 24, 2017

With above changes and the dts changed to include the following config this has been seen to work using speaker-test -D hw:0,2 -F S32_LE -c 2 as a test vector but all the code hasn't yet been added to a nice commit.

pistachio_audio_card {             
        img,i2s-clk-loopback;      
        i2s-out {                  
                continuous-clock;  
        };                         
};                                 
&gpio4 {                                        
        hp_amp_en {                             
                gpio-hog;                       
                gpios = <15 GPIO_ACTIVE_LOW>;   
                output-high;                    
                line-name = "hp-amp-en";        
        };                                      
};   

@ghost ghost changed the title Add audio support Add audio suppor 1 t Mar 3, 2017
@Shpinkso Shpinkso changed the title Add audio suppor 1 t Add audio support Mar 3, 2017
@Ham22
Copy link
Member Author

Ham22 commented Mar 7, 2017

The current issues so far have been down to porting the sound card to kernel 4.9 hence have created a ticket in the linux repo to track that work. This task is blocked on completing it CreatorDev/linux#5 .

@Ham22 Ham22 added this to the LEDE Ci40 platform bringup milestone Mar 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants