Hi Greg,

Greg Erskine wrote: 
> 
> The piCore implementation of ALSA may be missing a few things. ALSA did
> change a few version back, you could try pCP2.03 or so.
> 

I found that ALSA really changed! All "old" config hints I found were
useless! Seems that pCP comes with a newer ALSA version than most other
distributions. But...

I FINALLY DID IT! :cool:

So here is my working asound.conf for the recent (3.02) version of
piCorePlayer:

Code:
--------------------
    
  pcm.logilink {                # alias for our sound card
        type hw                 # must be hw in our case
        card 1                  # check your correct card number by typing
        device 0                # 'aplay -l' in your terminal
  }                                     # the 1st usb card on the Raspi shows as
                                        # card 1: Device [USB Sound Device], 
device 0: USB Audio [USB Audio]
  
  ctl.logilink {      
        type hw
        card 1
        device 0
  }
  
  pcm.dmixer {
        type dmix
        ipc_key 1024    
        ipc_perm 0666                   # neccesary for normal user to have 
access to outputs
        slave.pcm "logilink"
        slave {
                period_time 0
                period_size 1024
                buffer_size 4096
                rate 44100
                channels 8
        }
        bindings {
                0 0
                1 1 
                2 2 
                3 3 
                4 4 
                5 5 
                6 6 
                7 7 
                }
        
  }     
  
  pcm.!default {
        type plug
        slave.pcm "dmixer"
  }
  
  pcm.stereofront {               # the name of our splitted output
        type plug
        slave {
                pcm "dmixer"
                channels 8
        }
        ttable.0.0 1
        ttable.1.1 1
  }
  
  pcm.stereocenter {
        type plug
        slave {
                pcm "dmixer"
                channels 8
        }
        ttable.0.2 1
        ttable.1.3 1
  }
  
  pcm.stereoback {
        type plug
        slave {
                pcm "dmixer"
                channels 8
        }
        ttable.0.4 1
        ttable.1.5 1
  }
  
  pcm.stereosurround {
        type plug
        slave {
                pcm "dmixer"
                channels 8
        }
        ttable.0.6 1
        ttable.1.7 1
  }
  
  pcm.stereoall {
        type plug
        slave {
                pcm "dmixer"
                channels 8
        }
        ttable.0.0 1
        ttable.1.1 1
        ttable.0.2 1
        ttable.1.3 1
        ttable.0.4 1
        ttable.1.5 1
        ttable.0.6 1
        ttable.1.7 1
  }
  
--------------------


The available outputs are
-stereofront
stereosurround
stereocenter
stereoback
stereoall-

This additional outputs are NOT(!) shown by typing

Code:
--------------------
    /mnt/mmcblk0p2/tce/squeezelite-armv6hf -l
--------------------

in your terminal. This make it hard to find config errors.

But you can see some error output if your asound.conf is misconfigured
or has typo errors
like:

Code:
--------------------
    
  ALSA lib conf.c:1698:(snd_config_load1) _toplevel_:53:1:Unexpected char
  ALSA lib conf.c:3458:(config_file_open) /etc/asound.conf may be old or 
corrupted: consider to remove or fix it
  ALSA lib conf.c:3380:(snd_config_hooks_call) function snd_config_hook_load 
returned error: Invalid argument
  ALSA lib conf.c:3829:(snd_config_update_r) hooks failed, removing 
configuration
  
--------------------


And yes, don't forget to 

Code:
--------------------
    sudo filetool.sh -b
--------------------
 on every config file change to save it.

With 'stereoall' you can put sound to all 4 stereo outs together. You
even can split the card to mono channels so theoretically 8 single
mono-mixed outs would be possible (already tested). Perhaps more than a
normal raspi could handle.
Btw. with 4 instances streaming on my Raspberry 1B top shows a load
between 1.00 and about 1.5 as long as LMS runs on a different machine.

I hope this can help in some way for future development of piCorePlayer.


Perhaps showing the instances on their own pages in browser would be a
great feature.

My next goal is to set the right GPIO pins for (de-)activating the
corresponding amps for each output.

Special thanks to Greg for the right hints with ALSA changes... ;)

greetings
mff


------------------------------------------------------------------------
mff's Profile: http://forums.slimdevices.com/member.php?userid=65949
View this thread: http://forums.slimdevices.com/showthread.php?t=105973

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to