Ok, is there anything I can do?
Yes, we need to modify a script and add a card profile, can you manage editing with nano?
If so, do amixer -c 1
and post the results.
Then I will prepare two small fixes and give you the details.
Yes can use nano. Can I use ssh? What are the credentials for putty
name:volumio and pass:volumio and ip of device
yes, go to the dev page (http://“your-ip”/dev) and activate the ssh server.
Credentials see above.
Edit
To know the internal C-Media card device names, could you run this script to verify?
volumio@volumiopc:~$ amixer -c 1
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 64
Mono: Playback 44 [69%] [-20.00dB] [on]
Simple mixer control 'Front',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 64
Mono:
Front Left: Playback 62 [97%] [0.00dB] [on]
Front Right: Playback 62 [97%] [0.00dB] [on]
Simple mixer control 'Surround',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 64
Mono:
Front Left: Playback 62 [97%] [0.00dB] [on]
Front Right: Playback 62 [97%] [0.00dB] [on]
Simple mixer control 'Center',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 64
Mono: Playback 62 [97%] [0.00dB] [on]
Simple mixer control 'LFE',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 64
Mono: Playback 62 [97%] [0.00dB] [on]
Simple mixer control 'Side',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 64
Mono:
Front Left: Playback 62 [97%] [0.00dB] [on]
Front Right: Playback 62 [97%] [0.00dB] [on]
Simple mixer control 'Line',0
Capabilities: cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Capture channels: Mono
Mono: Capture [off]
Simple mixer control 'Line Boost',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 3
Front Left: 0 [0%] [0.00dB]
Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Mic',0
Capabilities: cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Capture channels: Mono
Mono: Capture [on]
Simple mixer control 'Mic Boost',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 3
Front Left: 0 [0%] [0.00dB]
Front Right: 0 [0%] [0.00dB]
Simple mixer control 'IEC958',0
Capabilities: pswitch pswitch-joined cswitch cswitch-joined
Playback channels: Mono
Capture channels: Mono
Mono: Playback [off] Capture [off]
Simple mixer control 'IEC958 Default PCM',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 46
Front Left: Capture 28 [61%] [12.00dB] [on]
Front Right: Capture 28 [61%] [12.00dB] [on]
Simple mixer control 'SoftMaster',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 99
Front Left: 99 [100%]
Front Right: 99 [100%]
volumio@volumiopc:~$
for card in /sys/class/sound/card*; do
cardno=$(cat $card/number)
chip=$(amixer -c $cardno info | grep "Mixer name" | awk -F": " '{print (substr($2, 2, length($2) - 2))}')
echo "Internal card name:" $(cat /proc/asound/cards | grep "$(cat $card/number) \[$(cat $card/id)" |
awk -F" - " '{print $2}')
echo "Internal codec name:" $chip
done
Internal card name: HDA Intel PCH
Internal codec name: Realtek ALC662 rev1
Internal card name: HDA C-Media
Internal codec name: C-Media Generic
volumio@volumiopc:~$
Please make modifications in
/usr/local/bin/volumio_hda_intel_tweak.sh
and /volumio/app/plugins/audio_interface/Alsa_controller/cards.json
volumio_hda_intel_tweak.sh
Using “sudo nano”, replace case
"Realtek ALC892"|"Realtek ALC898"|"Realtek ALC1220")
by
"Realtek ALC892"|"Realtek ALC898"|"Realtek ALC1220"|"C-Media Generic")
cards.json
Using “sudo nano”, after the line with
{"name": "HDA ATI SB"
carefully insert a new line with these contents (take care not to make typos, otherwise Volumio will not start)
{"name": "HDA C-Media", "multidevice": true, "devices":[{"number":0, "prettyname": "C-Media Analog Out", "defaultmixer": ""},{"number":1, "prettyname": "C-Media SPDIF/Toslink", "defaultmixer": ""}]},
Then reboot and test
If this works, I will add it to the standard x64 image build for the next release.
Not quite sure where I should replace
Here is the original file
#!/bin/bash
for card in /sys/class/sound/card*; do
cardno=$(cat $card/number)
chip=$(amixer -c $cardno info | grep "Mixer name" | awk -F": " '{print (substr($2, 2, length($2) - 2))}')
cardname=$(cat /proc/asound/cards | grep "$(cat $card/number) \[$(cat $card/id)" | awk -F" - " '{print $2}')
case $cardname in
"HDA Intel PCH")
case $chip in
"Realtek ALC283")
# not all HDA Intel PCH/ ALC283 have spdif out ==> mixer may be missing
mixer_exists=$(amixer -c 0 | grep "IE958,16")
if [ ! "x$mixer_exists" == "x" ]; then
/usr/bin/amixer -c $cardno set IEC958,16 unmute
fi
/usr/bin/amixer -c $cardno set Master "75%" unmute
;;
"Realtek ALC892")
/usr/bin/amixer -c $cardno set Surround,0 mute
/usr/bin/amixer -c $cardno set Center,0 mute
/usr/bin/amixer -c $cardno set LFE,0 mute
/usr/bin/amixer -c $cardno set IEC958,16 unmute
/usr/bin/amixer -c $cardno set Front "92%" unmute
/usr/bin/amixer -c $cardno set Headphone "92%" unmute
/usr/bin/amixer -c $cardno set Master "75%" unmute
;;
"Realtek ALC668")
/usr/bin/amixer -c $cardno set Headphone "92%" unmute
/usr/bin/amixer -c $cardno set Speaker "92%" unmute
/usr/bin/amixer -c $cardno set Master "75%" unmute
;;
"IDT 92HD81B1X5")
/usr/bin/amixer -c $cardno set Headphone "92%" unmute
/usr/bin/amixer -c $cardno set Speaker "92%" unmute
/usr/bin/amixer -c $cardno set Master "75%" unmute
;;
esac
;;
esac
done
exit 0
The json file worked. Here the result
{
"cards": [
{"name": "bcm2835 ALSA", "multidevice": false, "prettyname": "HDMI Out", "defaultmixer": "PCM","type":"integrated"},
{"name": "bcm2835 HDMI 1", "multidevice": false, "prettyname": "HDMI", "defaultmixer": "HDMI","type":"integrated"},
{"name": "bcm2835 Headphones", "multidevice": false, "prettyname": "Headphones", "defaultmixer": "Headphone","type":"integrated"},
{"name": "snd_rpi_hifiberry_dac", "multidevice": false, "prettyname": "Hifiberry DAC", "type":"i2S"},
{"name": "snd_rpi_hifiberry_dacplus", "multidevice": false, "prettyname": "HiFiBerry DAC Plus", "type":"i2S"},
{"name": "snd_rpi_hifiberry_dacplusadc", "multidevice": false, "prettyname": "HiFiBerry DAC Plus ADC", "type":"i2S"},
{"name": "snd_rpi_hifiberry_dacplusadcpro", "multidevice": false, "prettyname": "HiFiBerry DAC Plus ADC PRO", "type":"i2S"},
{"name": "snd_rpi_hifiberry_dacplusdsp", "multidevice": false, "prettyname": "HiFiBerry DAC Plus DSP", "type":"i2S"},
{"name": "HiFiBerry Digi+ Pro HiFi wm8804-spdif-0", "multidevice": false, "prettyname": "HiFiBerry Digi+ Pro", "type":"i2S"},
{"name": "IQaudIODAC", "multidevice": false, "prettyname": "IQaudIO DAC", "type":"i2S"},
{"name": "sndrpijustboomd", "multidevice": false, "prettyname": "JustBoom DAC Boards", "type":"i2S"},
{"name": "atm7059_link", "multidevice": true, "devices":[{"number":0, "prettyname": "Cheapo Audio Jack", "defaultmixer": "DAC PA"}, {"number":1, "prettyname": "HDMI Audio Out", "defaultmixer": ""}, {"number":2, "prettyname": "Cheapo S/PDIF", "defaultmixer": ""}],"type":"integrated"},
{"name": "PianoDACPlus", "multidevice": false, "prettyname": "Allo Piano 2.1", "defaultmixer": "Digital","type":"i2S"},
{"name": "BossDAC", "multidevice": false, "prettyname": "Allo BOSS", "defaultmixer": "Digital","type":"i2S"},
{"name": "sndhdmi", "multidevice": false, "prettyname": "HDMI Out", "defaultmixer": "","type":"integrated"},
{"name": "audiocodec", "multidevice": false,"prettyname": "Analog Audio Out", "defaultmixer": "headphone volume","type":"integrated"},
{"name": "imxvt1613audio", "multidevice": false, "prettyname": "Analog Audio Out", "defaultmixer": "Speaker","type":"integrated"},
{"name": "imxhdmisoc", "multidevice": false,"prettyname": "HDMI Audio Out", "defaultmixer": "Speaker","type":"integrated"},
{"name": "imxaudiotda1998", "multidevice": false, "prettyname": "HDMI Audio Out", "defaultmixer": "Speaker","type":"integrated"},
{"name": "ODROID-DAC2", "multidevice": false, "prettyname": "HiFi Shield 2", "defaultmixer": "Digital","type":"i2S"},
{"name": "ODROID-DAC", "multidevice": false, "prettyname": "HiFi Shield/Shield+", "defaultmixer": "","type":"integrated"},
{"name": "ODROID-HDMI", "multidevice": false, "prettyname": "HDMI/ TOSLINK (S/PDIF)", "defaultmixer": "","type":"integrated"},
{"name": "sndspdif", "multidevice": false, "prettyname": "TOSLINK (S/PDIF)", "defaultmixer": "","type":"integrated"},
{"name": "snddaudio0", "multidevice": false, "prettyname": "ANALOG (DAC)", "defaultmixer": "","type":"integrated"},
{"name": "rockchipminiarm", "multidevice": false, "prettyname": "HDMI Audio Out", "defaultmixer": "","type":"integrated"},
{"name": "S/PDIF PCM snd-soc-dummy-dai-0", "multidevice": false, "prettyname": "TOSLINK (S/PDIF) ", "defaultmixer": "","type":"integrated"},
{"name": "HiFi-ASRC-FE (*)", "multidevice": false, "prettyname": "ANALOG (DAC)", "defaultmixer": "Digital","type":"integrated"},
{"name": "TinkerAudio OnBoard", "multidevice": true, "devices":[{"number":0, "prettyname": "HDMI", "defaultmixer": ""}, {"number":1, "prettyname": "SPDIF", "defaultmixer": ""}, {"number":2, "prettyname": "Audio Jack Out", "defaultmixer": "Headphone,1"}],"type":"integrated"},
{"name": "USB Audio OnBoard", "multidevice": true, "devices":[{"number":0, "prettyname": "HDMI", "defaultmixer": ""}, {"number":1, "prettyname": "SPDIF", "defaultmixer": ""}, {"number":2, "prettyname": "Audio Jack Out", "defaultmixer": "Headphone,1"}],"type":"integrated"},
{"name": "rockchip", "multidevice": false, "prettyname": "HDMI", "defaultmixer": "","type":"integrated"},
{"name": "snd-sun8i-i2s-dac", "multidevice": false, "prettyname": "I2S", "defaultmixer": "","type":"integrated"},
{"name": "H3 Audio Codec", "multidevice": false, "prettyname": "Onboard Audio", "defaultmixer": "DAC","type":"integrated"},
{"name": "HDA Intel PCH", "multidevice": true, "devices":[{"number":0, "prettyname": "Analog Out", "defaultmixer": ""},{"number":1, "prettyname": "SPDIF", "defaultmixer": ""},{"number":3, "prettyname": "HDMI", "defaultmixer": ""}]},
{"name": "HDA Intel", "multidevice": true, "devices":[{"number":0, "prettyname": "Analog Out", "defaultmixer": ""},{"number":1, "prettyname": "SPDIF", "defaultmixer": ""},{"number":3, "prettyname": "HDMI", "defaultmixer": ""}]},
{"name": "HD-Audio Generic", "multidevice": true, "devices":[{"number":0, "prettyname": "Analog Out", "defaultmixer": ""},{"number":1, "prettyname": "SPDIF", "defaultmixer": ""},{"number":3, "prettyname": "HDMI", "defaultmixer": ""}]},
{"name": "HDA ATI SB", "multidevice": true, "devices":[{"number":0, "prettyname": "Analog Out", "defaultmixer": ""},{"number":1, "prettyname": "SPDIF", "defaultmixer": ""}]},
{"name": "HDA C-Media", "multidevice": true, "devices":[{"number":0, "prettyname": "C-Media Analog Out", "defaultmixer": ""},{"number":1, "prettyname": "C-Media SPDIF/Toslink", "defaultmixer": ""}]},
{"name": "Intel ICH6", "multidevice": true, "devices":[{"number":0, "prettyname": "HDMI", "defaultmixer": ""},{"number":4, "prettyname": "SPDIF", "defaultmixer": ""}]},
{"name": "bytcr-rt5640", "multidevice": false, "prettyname": "Headphone Jack", "defaultmixer": "DAC1","type":"integrated"},
{"name": "bytcr-rt5651", "multidevice": false, "prettyname": "Headphone Jack", "defaultmixer": "HP","type":"integrated"},
{"name": "bytcht-es8316", "multidevice": false, "prettyname": "Headphone Jack", "defaultmixer": "HP","type":"integrated"},
{"name": "Intel HDMI/DP LPE Audio", "multidevice": true, "devices":[{"number":0, "prettyname": "HDMI 0", "defaultmixer": ""},{"number":1, "prettyname": "HDMI 1", "defaultmixer": ""},{"number":2, "prettyname": "HDMI 2", "defaultmixer": ""}],"type":"integrated"},
{"name": "AML-AUGESOUND", "multidevice": true, "devices":[{"number":0, "prettyname": "HDMI Audio", "defaultmixer": ""}, {"number":1, "prettyname": "Line Out/ Headphones", "defaultmixer": "DAC Digital"}, {"number":2, "prettyname": "SPDIF", "defaultmixer": ""}],"type":"integrated"},
{"name": "AML-AUGESOUND-MP1", "multidevice": true, "devices":[{"number":0, "prettyname": "I2S", "defaultmixer": ""},{"number":2, "prettyname": "S/PDIF", "defaultmixer": ""}],"type":"integrated"},
{"name": "AML-AUGESOUND-V", "multidevice": true, "devices":[{"number":0, "prettyname": "I2S + SPDIF + HDMI", "defaultmixer": "DAC Digital"}, {"number":1, "prettyname": "HDMI only", "defaultmixer": "DAC Digital"}, {"number":2, "prettyname": "SPDIF + HDMI", "defaultmixer": "DAC Digital"}],"type":"integrated"},
{"name": "AML-MESONAUDIO", "multidevice": true, "devices":[{"number":0, "prettyname": "I2S+SPDIF+HDMI", "defaultmixer": "DAC Digital"}, {"number":1, "prettyname": "SPDIF+HDMI", "defaultmixer": "DAC Digital"}],"type":"integrated"},
{"name": "AML-M8AUDIO", "multidevice": true, "devices":[{"number":0, "prettyname": "I2S", "defaultmixer": "", "ignore": true}, {"number":1, "prettyname": "SPDIF", "defaultmixer": ""}, {"number":2, "prettyname": "PCM", "defaultmixer": "", "ignore": true}],"type":"integrated"}
]
}
Ok, did you choose “C-Media SPDIF/Toslink” from the playback options drop-down? And did it work?
It appears as if the latest version was not pushed yet, sorry.
So in your case, just replace strings
"HDA Intel PCH”)
by
"HDA Intel PCH”|"HDA C-Media")
and
"Realtek ALC892”)
by
"Realtek ALC892”|"C-Media Generic")
(just use normal double quotes, formatting here is a bit mixed-up)
ok changed the second file
here the changes
btw, I use winscp to modify files, find that is a lot more comfortable and safe when typing
#!/bin/bash
for card in /sys/class/sound/card*; do
cardno=$(cat $card/number)
chip=$(amixer -c $cardno info | grep "Mixer name" | awk -F": " '{print (substr($2, 2, length($2) - 2))}')
cardname=$(cat /proc/asound/cards | grep "$(cat $card/number) \[$(cat $card/id)" | awk -F" - " '{print $2}')
case $cardname in
"HDA Intel PCH"|"HDA C-Media")
case $chip in
"Realtek ALC283")
# not all HDA Intel PCH/ ALC283 have spdif out ==> mixer may be missing
mixer_exists=$(amixer -c 0 | grep "IE958,16")
if [ ! "x$mixer_exists" == "x" ]; then
/usr/bin/amixer -c $cardno set IEC958,16 unmute
fi
/usr/bin/amixer -c $cardno set Master "75%" unmute
;;
"Realtek ALC892"|"C-Media Generic")
/usr/bin/amixer -c $cardno set Surround,0 mute
/usr/bin/amixer -c $cardno set Center,0 mute
/usr/bin/amixer -c $cardno set LFE,0 mute
/usr/bin/amixer -c $cardno set IEC958,16 unmute
/usr/bin/amixer -c $cardno set Front "92%" unmute
/usr/bin/amixer -c $cardno set Headphone "92%" unmute
/usr/bin/amixer -c $cardno set Master "75%" unmute
;;
"Realtek ALC668")
/usr/bin/amixer -c $cardno set Headphone "92%" unmute
/usr/bin/amixer -c $cardno set Speaker "92%" unmute
/usr/bin/amixer -c $cardno set Master "75%" unmute
;;
"IDT 92HD81B1X5")
/usr/bin/amixer -c $cardno set Headphone "92%" unmute
/usr/bin/amixer -c $cardno set Speaker "92%" unmute
/usr/bin/amixer -c $cardno set Master "75%" unmute
;;
esac
;;
esac
done
exit 0
whatever gets the job done;)
Does it work though?
Note, when you copy longer text or scripts, start and end with a ``` line, makes it more readable.
Right, rebooted. Sadly no signal, also no red light in the port.
I will boot the pc with a windows harddisk and make sure the card is working.
You can also try a manual unmute like this
amixer -c 1 set IEC958 unmute
amixer -c 1 set Master "75%" unmute
and if that does not help, open “alsamixer”, switch sound card to C-Media with F6 and check if there is anything to manipulate there.
volumio@volumiopc:~$ amixer -c 1 set IEC958 unmute
Simple mixer control ‘IEC958’,0
Capabilities: pswitch pswitch-joined cswitch cswitch-joined
Playback channels: Mono
Capture channels: Mono
Mono: Playback [on] Capture [off]
volumio@volumiopc:~$ amixer -c 1 set Master “75%” unmute
Simple mixer control ‘Master’,0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 64
Mono: Playback 48 [75%] [-16.00dB] [on]
volumio@volumiopc:~$
It gives this error
Here the Alsamixer output
Ok, now it gives an output. A Hires recording played, but it was scratchy. I have added a source with normal cds with 44,1 khz. Once these are raed I will try again
I have no idea what your C-Media soundcard is capable of, and there is nothing else I can set/unset.
You could try webradio in the meantime, Radio Paradise (flac+) for instance…