Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,143
    hi mff,

    Sorry I can not be much help to you, my knowledge of ALSA is limited.

    Just a few points in case it is something obvious.

    You are editing /etc/asound.conf?
    You need to do a backup to make the changes persistent ($ pcp bu)

    My limited ALSA knowledge is shown on the asound web pages. These are my attempts to understand ALSA.

    1. [Main page] in [Beta] mode > [Extras] > [Asound]
    2. [Main page] in [Beta] mode > [Diagnostics] > [Sound] (be careful your amp is not on loud)

    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.

    regards
    Greg

  2. #12
    Junior Member
    Join Date
    Aug 2016
    Location
    Europe
    Posts
    10

    SOLVED - Splitting 7.1 channel sound card

    Hi Greg,


    Quote Originally Posted by Greg Erskine View Post
    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!

    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

  3. #13
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,143
    hi mff,

    Great news! I have booked marked this for future reference.

    Thanks
    Greg

  4. #14
    Junior Member
    Join Date
    Apr 2017
    Posts
    1
    Great job.
    All channels work ok for me. Could you describe hot to start 4 instances of squezzelite on piCorePlayer image?
    I'm also wonder if you finished (de)activation part.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •