Tiny Core Linux
Tiny Core Base => Micro Core => Topic started by: Maurits on November 18, 2015, 12:57:01 PM
-
Hello,
I'm using Picoreplayer on micro core as an audiostreamer on a Rasp 1 B+. Audio out via a Audio-GD hdmi output module makin use of the i2s GPIO pins. All works fine but one small detail: the left and right audio channel are the wrong way around. This is because the left-right configuration of the audio-gd module is opposite of the right-left ( ;)) config of my Dac (Pink Faun).
To solve this I thought of swapping the channels in linux. Biggest problem with that so far: I'm a absolute Linux n00b...
The possible solution i did find is switching the channels in /etc/pulse/deamon.conf
; default-sample-channels = 2
; default-channel-map = front-left,front-right
to
default-sample-channels = 2
default-channel-map = front-right,front-left
But i can't find this file, or edit any other file that seems to haveanything to do with audio.
Can anyone help me out? Solving this will make this an ultimate low cost, high end streamer.
-
Wyy don't you swap the Left/Rigth cables? No LINUX knowledge needed, fast, easy and cheap.
-
Wyy don't you swap the Left/Rigth cables? No LINUX knowledge needed, fast, easy and cheap.
Would work fine if the pi was the only source feeding my dac. Tv is also connecter to the dac, switched left right watching a movie is not what i prefer.
The connection between pi and dac is i2s over hdmi, no chance of swithingthat around...
-
Not between RPi. I mean the analog cable.
-
Not between RPi. I mean the analog cable.
This would change the left-right channels for every source that's connected to the dac... Tv is on the spdif input, can't change that either
-
I found this on another forum, but could not edit the asound.conf file
Add this to your /etc/asound.conf...
Code:
pcm.swapped {
type route
slave.pcm "hw:0"
ttable.0.1 1
ttable.1.0 1
}
-
Been working on my SSH skills ;)
So far i've learned to use vi to edit files, and filetool.sh -b to save changes I made.
I've enriched asound.conf, which now looks like this
pcm.!default {
type plug
slave.pcm hw
}
pcm.swapped {
type route
slave.pcm "default"
ttable.0.1 1
ttable.1.0 1
}
I'm not yet able to test because away from home for a few days. This at least doesn't cause any errors booting Picore.
What do you guys think, will this swap the channels? Shouldn't I point another rule to use the pcm.swapped instead of pcm.default?
-
hi Maurits,
piCorePlayer doesn't use pulse audio.
Welcome to the ALSA world!
This /etc/asound.conf should work.
# swap - Generated by piCorePlayer
pcm.!default {
type route
slave.pcm "hw:0,0"
ttable {
0.1 1
1.0 1
}
}
Your on board audio should be card 0, so the above code should be OK.
Remember to do a backup and restart squeezelite, both buttons on main page.
I have added a screen capture of a "possible" piCorePlayer tool to play with asound.conf. We are just trying to work out to make is generic and simple enough to use.
regards
Greg
-
Hello Greg,
Thanks for the reply. I've deleted the previous code and added the code you gave in your reply. Tomorrow i'll be able to hook up the Pi to the DAC and test, keep you posted on the results.
The screenshot looks like something that i could work with :). Is this beta or even before beta stage?
One more question, it's a n00b-one i'm afraid... The output card I use is card 1, not 0. I'm using the Hifiberry output, see aplay -l:
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0
How do i use card 1? Is it as easy as "hw:1,0"?
-
How do i use card 1? Is it as easy as "hw:1,0"?
Hi Maurits,
Yes.
I thought you were talking about HDMI audio out?
# swap - Generated by piCorePlayer
pcm.!default {
type route
slave.pcm "hw:1,0"
ttable {
0.1 1
1.0 1
}
}
or this. Sometimes I had to use plughw.
# swap - Generated by piCorePlayer
pcm.!default {
type route
slave.pcm "plughw:1,0"
ttable {
0.1 1
1.0 1
}
}
Remember to:
- Clear Output setting in Squeezelite setting page
- Backup
- Restart Squeezelite
regards
Greg
-
Thanks a lot Greg! The plughw did it, left and right are swapped!! 8) 8) 8)