All times are UTC - 6 hours




Post new topic Reply to topic  [ 36 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Fri Jun 19, 2009 8:54 am 
Offline


Wed Aug 01, 2007 8:04 pm

21

Wellesley, MA
AC97 driver for Efika is in Linus' tree now. Of course it won't build because one of the other trees it depends on hasn't been merged yet.

It is waiting for this macro to land. You can add it in manually if you are impatient.

Code:
+#define spin_event_timeout(condition, timeout, delay)                         \
+({                                                                            \
+       typeof(condition) __ret;                                               \
+       unsigned long __loops = tb_ticks_per_usec * timeout;                   \
+       unsigned long __start = get_tbl();                                     \
+       while (!(__ret = (condition)) && (tb_ticks_since(__start) <= __loops)) \
+               if (delay)                                                     \
+                       udelay(delay);                                         \
+               else                                                           \
+                       cpu_relax();                                           \
+       __ret;                                                                 \
+})
+


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 05, 2009 2:23 am 
Offline


Thu Oct 19, 2006 7:19 am

269

Italy/Greece
hi, i'm still unable to get audio. I've tested 2.6.31.x and now 2.6.32-rc1 .


Code:
root@efika:~# uname -a
Linux efika 2.6.32-rc2 #1 Mon Oct 5 04:28:26 CEST 2009 ppc G2_LE Efika 5200B PowerPC System GNU/Linux
root@efika:~# lsmod
Module                  Size  Used by
mpc5200_psc_ac97        7425  0
mpc5200_dma             8734  1 mpc5200_psc_ac97
bestcomm_gen_bd         6193  1 mpc5200_dma
snd_soc_core           41321  2 mpc5200_psc_ac97,mpc5200_dma
snd_pcm                61995  2 mpc5200_dma,snd_soc_core
fec_mpc52xx            15617  0
snd_timer              20176  1 snd_pcm
bestcomm_fec            6043  1 fec_mpc52xx
snd_page_alloc          8701  2 mpc5200_dma,snd_pcm
ac97_bus                4282  1 snd_soc_core
fec_mpc52xx_phy         5935  1 fec_mpc52xx
root@efika:~# modprobe efika-audio-fabric
FATAL: Error inserting efika_audio_fabric (/lib/modules/2.6.32-rc2/kernel/sound/soc/fsl/efika-audio-fabric.ko): No such device
acrux _at_ linuxmail _dot_ org


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 05, 2009 5:37 am 
Offline


Wed Aug 01, 2007 8:04 pm

21

Wellesley, MA
It starts off in muted state. You need to use alsamixer to unmute it.

After you get it unmuted. Use alsactl to save the state.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 05, 2009 5:50 am 
Offline


Thu Oct 19, 2006 7:19 am

269

Italy/Greece
hi, thanks for your reply.

i'm unable to get a working sound device (no pcm) because, maybe, i can't load efika_audio_fabric module.

Code:
root@efika:~# pkginfo -i|grep alsa
alsa-lib 1.0.21a-1
alsa-utils 1.0.21-1
root@efika:~# alsamixer
cannot open mixer: No such file or directory
root@efika:~# ls -laR /dev/snd/
/dev/snd/:
total 0
drwxr-xr-x  2 root root      60 Oct  5  2009 .
drwxr-xr-x 12 root root   13280 Oct  5 12:03 ..
crw-rw----  1 root audio 116, 2 Oct  5  2009 timer


Code:
CONFIG_SOUND=y
# CONFIG_SOUND_OSS_CORE is not set
CONFIG_SND=y
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_JACK=y
# CONFIG_SND_SEQUENCER is not set
# CONFIG_SND_MIXER_OSS is not set
# CONFIG_SND_PCM_OSS is not set
CONFIG_SND_DYNAMIC_MINORS=y
# CONFIG_SND_SUPPORT_OLD_API is not set
CONFIG_SND_VERBOSE_PROCFS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
# CONFIG_SND_RAWMIDI_SEQ is not set
# CONFIG_SND_OPL3_LIB_SEQ is not set
# CONFIG_SND_OPL4_LIB_SEQ is not set
# CONFIG_SND_SBAWE_SEQ is not set
# CONFIG_SND_EMU10K1_SEQ is not set
CONFIG_SND_MPU401_UART=m
CONFIG_SND_DRIVERS=y
CONFIG_SND_DUMMY=m
CONFIG_SND_MTPAV=m
CONFIG_SND_SERIAL_U16550=m
CONFIG_SND_MPU401=m
# CONFIG_SND_PCI is not set
# CONFIG_SND_PPC is not set
CONFIG_SND_SPI=y
# CONFIG_SND_USB is not set
CONFIG_SND_SOC=m
CONFIG_SND_SOC_AC97_BUS=y
CONFIG_SND_MPC52xx_DMA=m
# CONFIG_SND_SOC_MPC5200_I2S is not set
CONFIG_SND_SOC_MPC5200_AC97=m
CONFIG_SND_MPC52xx_SOC_EFIKA=m
CONFIG_SND_SOC_I2C_AND_SPI=m
# CONFIG_SND_SOC_ALL_CODECS is not set
CONFIG_SND_SOC_STAC9766=m
# CONFIG_SOUND_PRIME is not set
CONFIG_AC97_BUS=m
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
# CONFIG_HIDRAW is not set


i suppose you have a vanilla kernel like me then, please, can you provide a working kernel .config? Don't you have any kind of device tree supplement forth script, right?

thanks, again.
acrux _at_ linuxmail _dot_ org


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 05, 2009 8:15 am 
Offline


Wed Aug 01, 2007 8:04 pm

21

Wellesley, MA
I emailed a script that updates the device tree to match what the kernel wants.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 06, 2009 11:03 am 
Offline


Thu Aug 27, 2009 1:07 pm

14

Bohemia
jonsmirl wrote:
I emailed a script that updates the device tree to match what the kernel wants.

Can you post the script here as well, please? I have the same problem and I don't know Forth, so I can't write such thing myself.
Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 06, 2009 11:45 am 
Offline


Wed Aug 01, 2007 8:04 pm

21

Wellesley, MA
Code:
\ FORTH

." Efika 5200B Device Tree Supplement 20071114" cr
." (c) 2007 Genesi USA, Inc." cr
." http://www.powerdeveloper.org/ for support" cr cr

\ headerless

s" /openprom" find-device
       d# 20071114 encode-int s" device-tree-version" property
device-end

s" /builtin/ata" find-device
       s" mpc5200-ata" encode-string
       s" mpc5200b-ata" encode-string encode+
       s" compatible" property
device-end

s" /builtin/sound" find-device
   s" fsl,mpc5200-psc-ac97" encode-string
   s" fsl,mpc5200b-psc-ac97" encode-string encode+
   s" compatible" property
   
   0x2 encode-int
   0x2 encode-int encode+
   0x3 encode-int encode+
   s" interrupts" property
   
   \ Audio is on PSC2, just for informational purposes
   1 encode-int s" cell-index" property
      
   new-device
      s" codec@0" 2dup device-name device-type
      0x1 0x1 reg
      
      s" sound" encode-string
      s" device_type" property
      
      s" idt,stac9766" encode-string
      s" ac97-audio" encode-string encode+
      s" compatible" property
   finish-device
device-end

\ Quick test to see if AC97 is enabled
0xf0000b00 dup dup l@ 0x20 and
0= if
       ." Enabling AC97" cr
       dup l@ 0x20 or
       swap l!
else
       drop
then

\ SRAM compatibles
s" /builtin/sram" find-device
       s" mpc5200-sram" encode-string
       s" mpc5200b-sram" encode-string encode+
       s" compatible" property

       s" sram" device-type \ this is a contentious one
device-end

\ PIC compatibles
s" /builtin/pic" find-device
       s" mpc5200-pic" encode-string
       s" mpc5200b-pic" encode-string encode+
       s" compatible" property
device-end

\ Serial compatibles. Also fix cell-index and port-number as per bindings
s" /builtin/serial" find-device
       s" mpc5200-psc-uart" encode-string
       s" mpc5200b-psc-uart" encode-string encode+
       s" compatible" property

       \ Serial port is PSC1 for informational purposes, Linux 0-indexes it
       0 encode-int s" cell-index" property
       \ Since this is the main, always there, preferred serial port..
       0 encode-int s" port-number" property
device-end

\ Ethernet compatibles
s" /builtin/ethernet" find-device
       s" mpc5200-fec" encode-string
       s" mpc5200b-fec" encode-string encode+
       s" compatible" property
device-end

\ BestComm compatibles, interrupt mess
s" /builtin/bestcomm" find-device
       s" mpc5200-bestcomm" encode-string
       s" mpc5200b-bestcomm" encode-string
       encode+
       s" compatible" property

       \ make 16 interrupt property in a batch. We have to do the first one by
       \ hand simply because of the way encode+ works.

       0x3 encode-int 0x0 encode-int 0x3 encode-int encode+ encode+
       0x10 1 do
               0x3 encode-int encode+ i encode-int encode+ 0x3 encode-int encode+
       loop

       \ now we can store the damn thing
       s" interrupts" property
device-end

\ New USB binding - change one of the numbers here to disable it for older kernels
\ as this is a destructive change
1 1 = if
s" /builtin/usb" find-device
       s" usb-ohci" device-type
       s" " encode-string s" big-endian" property

       s" mpc5200-ohci" encode-string
       s" mpc5200-usb-ohci" encode-string encode+
       s" ohci-be" encode-string encode+
       s" compatible" property
device-end
then

\ Go into the root node and kill off any mention of CHRP
s" /" find-device
       s" efika" device-type
       s" Efika 5200B" encode-string s" CODEGEN,board" property
       s" Efika 5200B PowerPC System" encode-string s" CODEGEN,description" property
       s" bplan,efika" encode-string
       s" compatible" property
device-end

\ Fix the /builtin device-type for Linux
s" /builtin" find-device
       s" soc" device-type
device-end

\ ADDING NEW ENTRIES TO THE DEVICE TREE
\
\ Clock Distribution Module - need this to change baud rates etc. and turn off
\ clocks for power management. Useful little thing. Needs an entry to find the
\ address without guessing (in case they change it in the 512X)

\ Clock Distribution Module
." Adding Clock Distribution Module" cr

s" /builtin" find-device
new-device
       " cdm" 2dup device-name device-type
       " MPC52xx Clock Distribution Module" encode-string " .description" property
       0xf0000200 0x38 reg

       " mpc5200-cdm" encode-string
       " mpc5200b-cdm" encode-string
       encode+
       " compatible" property

finish-device

\ GPIO (Simple) Module
." Adding Simple GPIO Module" cr

s" /builtin" find-device
new-device
       s" gpio" 2dup device-name device-type
       s" MPC52xx Simple GPIO" encode-string s" .description" property
       0xf0000b00 0x40 reg

       s" mpc5200-gpio" encode-string
       s" mpc5200b-gpio" encode-string encode+
       s" compatible" property

       0x10000000 encode-int s" gpio-mask" property

       0x1 encode-int
       0x7 encode-int
       0x3 encode-int
       encode+ encode+
       s" interrupts" property
finish-device

\ GPIO (Wakeup) Module
." Adding Wakeup GPIO Module" cr

s" /builtin" find-device
new-device
       s" gpio-wkup" 2dup device-name device-type
       s" MPC52xx Wakeup GPIO" encode-string s" .description" property
       0xf0000c00 0x28 reg

       s" mpc5200-gpio-wkup" encode-string
       s" mpc5200b-gpio-wkup" encode-string
       encode+
       s" compatible" property

       0x30000000 encode-int s" gpio-mask" property

       0x1 encode-int
       0x8 encode-int encode+
       0x3 encode-int encode+
       0x1 encode-int encode+
       0x3 encode-int encode+
       0x3 encode-int encode+
       s" interrupts" property
finish-device

\
\ High resolution (General Purpose and Slice) Timers
\
\ We ignore slice timer 0 since critical interrupt handling in Linux
\ is curiously missing
." Adding Slice Timer 1" cr

s" /builtin" find-device
new-device
       s" slt" 2dup device-name device-type
       s" MPC52xx Slice Timer 1" encode-string " .description" property
       0xf0000710 0x10 reg

       s" mpc5200-slt" encode-string
       s" mpc5200b-slt" encode-string
       encode+
       s" compatible" property

       1 encode-int " cell-index" property

       \ The interrupt listed here is probably wrong
       0x1 encode-int
       0x0 encode-int encode+
       0x3 encode-int encode+
       s" interrupts" property
finish-device

\ Add all the GPTs to the device-tree
\ : gpt-add ( gpt-id -- )
\ depth
\ 1 > if
8 0 do i
       dup 7 <= if
               dup
               0x9 +
               swap dup
               0x10 *
               0xf0000600 +
               swap dup

               ." Adding General Purpose Timer " .d cr

               s" /builtin" find-device
               new-device

               s" gpt" 2dup device-name device-type
               swap 0x10 reg

               encode-int s" cell-index" property

               s" MPC52xx General Purpose Timer X"
               2dup + 1 -              \ get the character position of the X
               0x30 i + swap c!        \ store ascii character of timer number
               encode-string s" .description" property

               s" mpc5200-gpt" encode-string
               s" mpc5200b-gpt" encode-string encode+
               s" fsl,mpc5200-gpt" encode-string encode+
               s" fsl,mpc5200b-gpt" encode-string encode+
               s" compatible" property

               0x1 encode-int
               2 pick encode-int encode+
               0x3 encode-int encode+
               s" interrupts" property

               finish-device
       then
loop
\ then
\ ;

\ Add watchdog marker to GPT0
s" /builtin/gpt@f0000600" find-device
       s" " encode-string s" has-wdt" property
       s" " encode-string s" fsl,has-wdt" property
device-end

\ PHY for ethernet. Thanks to Domen Puncer for this.
." Adding Ethernet PHY" cr

s" /builtin" find-device
new-device
       1 encode-int s" #address-cells" property
       0 encode-int s" #size-cells" property
       s" mdio" 2dup device-name device-type
       s" mpc5200b-fec-phy" encode-string s" compatible" property
       0xf0003000 0x400 reg

       0x2 encode-int
       0x5 encode-int encode+
       0x3 encode-int encode+
       s" interrupts" property

       new-device
               s" ethernet-phy" 2dup device-name device-type
               0x10 encode-int s" reg" property

               my-self         \ save our phandle to stack
               ihandle>phandle
       finish-device
finish-device

s" /builtin/ethernet" find-device
       encode-int              \ phy's phandle
       s" phy-handle" property
device-end

\
\ HERE BE DRAGONS

\ SDRAM Controller (needed to enter deep sleep and turn off RAM clocks)
." Adding SDRAM Controller" cr

s" /builtin" find-device
new-device
       s" sdram" device-name
       s" memory-controller" device-type

       0xf0000100 0x10 reg

       s" MPC52xx SDRAM Memory Controller" encode-string s" .description" property

       s" mpc5200b-sdram" encode-string
       s" mpc5200-sdram" encode-string encode+
       s" compatible" property
finish-device

\ XLB Arbiter (pipeline/bestcomm stuff enabled here)
." Adding XLB Arbiter" cr

s" /builtin" find-device
new-device
       s" xlb" 2dup device-name device-type

       0xf0001f00 0x100 reg

       s" MPC52xx XLB Arbiter" encode-string s" .description" property

       s" mpc5200-xlb" encode-string
       s" mpc5200b-xlb" encode-string encode+
       s" compatible" property
finish-device

\ Optionally uncomment and boot your Linux
s" eth:192.168.1.4 zImage.chrp debug console=ttyPSC0,115200 rw root=/dev/nfs ip=dhcp nfsroot=192.168.1.4:/home/apps/OSELAS.BSP-Phytec-phyCORE-12-1/platform-phyCORE-MPC5200B-tiny/root,v3,tcp" $boot


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 07, 2009 9:29 am 
Offline


Thu Aug 27, 2009 1:07 pm

14

Bohemia
Thanks! The sound is working now, even though it's not exactly HiFi, but I don't need superb quality anyway, that's what my CD player is for ^_^.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 08, 2009 10:34 am 
Offline


Thu Oct 19, 2006 7:19 am

269

Italy/Greece
jonsmirl wrote:
I emailed a script that updates the device tree to match what the kernel wants.


well, thank you. But i'm still having troubles.

That's from a 2.6.31.3
Code:
STAC9766 SoC Audio Codec 0.10
asoc: stac9766 analog <-> AC97 mapping ok
asoc: stac9766 IEC958 <-> SPDIF mapping ok
timeout on ac97 read (val) c48
timeout on ac97 bus (rdy)
timeout on ac97 bus (rdy)
Failed to reset STAC9766: AC97 link error


and here from a 2.6.32-rc3 (it seems to work but no sound only the beeper works..)
Code:
STAC9766 SoC Audio Codec 0.10
asoc: stac9766 analog <-> AC97 mapping ok
asoc: stac9766 IEC958 <-> SPDIF mapping ok


i'm doing something wrong but i'm unable to locate it.

JVid wrote:
Thanks! The sound is working now, even though it's not exactly HiFi, but I don't need superb quality anyway, that's what my CD player is for ^_^.

But do you use S/PDIF or analogic?
Please, can you send to me your working kernel config? Thanks.
acrux _at_ linuxmail _dot_ org


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 08, 2009 10:42 am 
Offline


Wed Aug 01, 2007 8:04 pm

21

Wellesley, MA
Reset was unreliable. Some patches have been done trying to make it more reliable. No one has put a scope onto the reset line to see why it is unreliable.

The audio starts off muted. Use alsamixer to turn the volume up.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 08, 2009 11:47 am 
Offline


Thu Aug 27, 2009 1:07 pm

14

Bohemia
acrux wrote:
But do you use S/PDIF or analogic?
Please, can you send to me your working kernel config? Thanks.

Analog. Here are the relevant parts of the config, it's for 2.6.31:
Code:
CONFIG_SOUND=m
CONFIG_SOUND_OSS_CORE=y
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_JACK=y
CONFIG_SND_SEQUENCER=m
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_HRTIMER=m
CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
# CONFIG_SND_DYNAMIC_MINORS is not set
# CONFIG_SND_SUPPORT_OLD_API is not set
# CONFIG_SND_VERBOSE_PROCFS is not set
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
# CONFIG_SND_RAWMIDI_SEQ is not set
# CONFIG_SND_OPL3_LIB_SEQ is not set
# CONFIG_SND_OPL4_LIB_SEQ is not set
# CONFIG_SND_SBAWE_SEQ is not set
# CONFIG_SND_EMU10K1_SEQ is not set
# CONFIG_SND_DRIVERS is not set
# CONFIG_SND_PCI is not set
# CONFIG_SND_PPC is not set
# CONFIG_SND_SPI is not set
# CONFIG_SND_USB is not set
CONFIG_SND_SOC=m
CONFIG_SND_SOC_AC97_BUS=y
CONFIG_SND_MPC52xx_DMA=m
# CONFIG_SND_SOC_MPC5200_I2S is not set
CONFIG_SND_SOC_MPC5200_AC97=m
CONFIG_SND_MPC52xx_SOC_EFIKA=m
CONFIG_SND_SOC_I2C_AND_SPI=m
# CONFIG_SND_SOC_ALL_CODECS is not set
CONFIG_SND_SOC_STAC9766=m
# CONFIG_SOUND_PRIME is not set
CONFIG_AC97_BUS=m


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 08, 2009 12:11 pm 
Offline


Wed Aug 01, 2007 8:04 pm

21

Wellesley, MA
SPDIF is not completely working right. I got it to make noise, but I'm not sure if I left the kernel ALSA driver in a working state.

You need to turn on SPDIF using ALSA mixer. Then look at the datasheet and make sure things are routed through the mixers right so that your music is ending up on the SPDIF output.

When SPDIF is enabled right you can see the red light on the cable.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 13, 2009 9:05 am 
Offline


Thu Oct 19, 2006 7:19 am

269

Italy/Greece
damn.. i'm surely doing something wrong..
I'm tryng green analog output (speacker) i got only the beeper sound.

Code:
root@efika:~# uname -a
Linux efika 2.6.32-rc4 #1 Mon Oct 12 17:09:15 CEST 2009 ppc G2_LE Efika 5200B PowerPC System GNU/Linux
root@efika:~# lsmod
Module                  Size  Used by
efika_audio_fabric      4177  0 [permanent]
snd_soc_stac9766       10705  1 efika_audio_fabric
mpc5200_psc_ac97        7425  2 efika_audio_fabric,snd_soc_stac9766
mpc5200_dma             8734  2 efika_audio_fabric,mpc5200_psc_ac97
bestcomm_gen_bd         6193  1 mpc5200_dma
snd_soc_core           41353  3 snd_soc_stac9766,mpc5200_psc_ac97,mpc5200_dma
ohci_hcd               33969  0
snd_pcm                57520  2 mpc5200_dma,snd_soc_core
snd_timer              20176  1 snd_pcm
fec_mpc52xx            15617  0
snd                    41658  3 snd_soc_core,snd_pcm,snd_timer
bestcomm_fec            6035  1 fec_mpc52xx
snd_page_alloc          8701  2 mpc5200_dma,snd_pcm
fec_mpc52xx_phy         5935  1 fec_mpc52xx
ac97_bus                4282  1 snd_soc_core
usbcore               126800  2 ohci_hcd


here my config: http:// clinker.cruxppc.org/~acrux/efika-config-2.6.32-rc4

and here my alsamixer output: http:// clinker.cruxppc.org/~acrux/efika-alsamixer.jpg
acrux _at_ linuxmail _dot_ org


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 13, 2009 9:43 am 
Offline


Wed Aug 01, 2007 8:04 pm

21

Wellesley, MA
My Efika is in a storage container so I can't get to it for a while.

http://www.idt.com/products/getDoc.cfm?docID=13134007

Look at the mixer diagram on page 42. Make sure you have things set in ALSA mixer so that the music is coming out of LINE_OUT. You probably have a MUX set the wrong way or something is muted.


Top
 Profile  
 
PostPosted: Sun Mar 14, 2010 4:17 am 
Offline


Sat Mar 13, 2010 6:28 pm

13
hello

I am new here but I have Efika and I have some problems...

I'm using stuff from here : http://www.efika.de/index_en.html

I patch kernel with sound_patch...modules are loaded and lsmod show that everything is fine,but alsaconf detect no sound-card ? why?

second thing: I use or try tu use tp-link tl-wn321G wifi card

efika doesn't rekognize it and when I try install some drivers it stop becouse error occured

little help please :roll:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 36 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group