This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No sound on HDMI
#1
Hello there,

Testing my TB for the first time and I am unable to get sound over HDMI. I tried my TV and my Onkyo receiver. 
I have searched the forum and found some tips - I've selected rockchip.miniarm as output on both the output and the player, I see the bar moving but no sound. When I tried under Android, I had sound on jack.

Any help please?
Reply
#2
Same here. Would love some help. No audio from HDMI.

tinker@tinkerboard:~$ uname -a
Linux tinkerboard 4.14.76-rockchip #3 SMP PREEMPT Sun Oct 14 09:42:31 UTC 2018 armv7l GNU/Linux

tinker@tinkerboard:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: OnBoard [USB Audio OnBoard], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: OnBoard [USB Audio OnBoard], device 1: USB Audio [USB Audio #1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: OnBoard [USB Audio OnBoard], device 2: USB Audio [USB Audio #2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: rockchiptinkerc [rockchip,tinker-codec], device 0: ff890000.i2s-i2s-hifi i2s-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0


/usr/share/alsa/alsa.conf
~ Snippet ~
defaults.ctl.card 0
defaults.pcm.card 1
defaults.pcm.device 0
~
Reply
#3
I also followed the sound suggestions here with no change in result. (great thread though)

https://tinkerboarding.co.uk/forum/threa...ml#pid2672

sound fix2:
I modify /usr/share/alsa/alsa.conf and ~/.asoundrc. (reference: https://www.alsa-project.org/main/index.php/Asoundrc), and sonic-pi has sound to run an example.


Step 1. using "aplay -l " and list the result.

**** List of PLAYBACK Hardware Devices ****
card 0: Audio [USB Audio], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: Audio [USB Audio], device 1: USB Audio [USB Audio #1]#
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Audio [USB Audio], device 2: USB Audio [USB Audio #2]#
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: rockchipminiarm [rockchip,miniarm-codec], device 0: ff890000.i2s-i2s-hifi i2s-hifi-0 []#
Subdevices: 1/1
Subdevice #0: subdevice #0

* More detail:
Card 0, device 0: BT_VOIP
Card 0, device 1: SPDIF
Card 0, device 2: Headset
Card 1: HDMI

Step 2. Modify /usr/share/alsa/alsa.conf (sudo vim /usr/share/alsa/alsa.conf)
Method 1: set as Headset

Code:
defaults.pcm.card 0
defaults.pcm.device 2

Method 2: set as HDMI
Code:
defaults.pcm.card 1
defaults.pcm.device 0


Step 3. Create ~/.asoundrc (vim ~/.asoundrc)
Method 1: set as Headset
Code:
pcm.!default {
type hw
card 0
device 2
}

ctl.!default {
type hw
card 0
device 2
}

Method 2: set as HDMI

Code:
pcm.!default {
type hw
card 1
}

ctl.!default {
type hw
card 1
}
Reply
#4
Going to be quick but this is solved for me - Ultimately it was picking the wrong output (headphones)

Run a "pacmd list-sinks" command to list the sinks you have for pulse audio. It'll be long. You should have something like this toward the bottom:

* index: 3
name: <alsa_output.hw_1_0>
driver: <module-alsa-sink.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9000
volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
       balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 3
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
            Stereo
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 1837.50 ms
module: 8
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "ff890000.i2s-i2s-hifi i2s-hifi-0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "1"
alsa.card_name = "rockchip,tinker-codec"
alsa.long_card_name = "rockchip,tinker-codec"
device.bus_path = "platform-sound"
sysfs.path = "/devices/platform/sound/sound/card1"
device.string = "hw:1,0"
device.buffering.buffer_size = "352800"
device.buffering.fragment_size = "176400"
device.access_mode = "mmap+timer"
device.description = "HDMI"
device.icon_name = "audio-card"

See the 1 and 0 in the bolded name above. That's Card 1 Device 0.


Next run an "aplay -l"

tinker@tinkerboard:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: OnBoard [USB Audio OnBoard], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: OnBoard [USB Audio OnBoard], device 1: USB Audio [USB Audio #1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: OnBoard [USB Audio OnBoard], device 2: USB Audio [USB Audio #2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: rockchiptinkerc [rockchip,tinker-codec], device 0: ff890000.i2s-i2s-hifi i2s-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0



See the Card 1 Device 0 again? Card 0 is all the analog outputs and SPDIF's. Card 1 is the HDMI outputs only. 


Next look in the ~/.config/pulse directory. "cd ~/.config/pulse" then "ls -la"

tinker@tinkerboard:~/.config/pulse$ ls -la

total 56
drwx------ 2 tinker tinker  4096 Oct 14 07:48 .
drwxr-xr-x 4 tinker tinker  4096 Oct 14 07:48 ..
-rw-r--r-- 1 tinker tinker 12288 Oct 14 07:48 2592e94e0eca4114a2f5661e6f578259-card-database.tdb
-rw-r--r-- 1 tinker tinker    19 Dec 10 18:45 2592e94e0eca4114a2f5661e6f578259-default-sink
-rw-r--r-- 1 tinker tinker    22 Dec 10 18:45 2592e94e0eca4114a2f5661e6f578259-default-source
-rw-r--r-- 1 tinker tinker  8192 Dec  9 22:07 2592e94e0eca4114a2f5661e6f578259-device-volumes.tdb
-rw-r--r-- 1 tinker tinker 16384 Dec  9 22:06 2592e94e0eca4114a2f5661e6f578259-stream-volumes.tdb
-rw------- 1 tinker tinker   256 Oct 14 07:48 cookie

See the default-sink file. Cat that file to see what's in it. If it has anything other than what you see here, this is your issue. 

tinker@tinkerboard:~/.config/pulse$ cat 2592e94e0eca4114a2f5661e6f578259-default-sink
alsa_output.hw_1_0



Next we need to force Pulse Audio to use HDMI.

Edit the default.pa file
"sudo nano /etc/pulse/default.pa"

Find this section and add the bolded line in this section.

### Load audio drivers statically

### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
load-module module-alsa-sink device=OnBoard_D0 sink_properties=device.description="BT_VOIP-Output"
load-module module-alsa-sink device=OnBoard_D1 sink_properties=device.description="SPDIF-Output"
load-module module-alsa-sink device=OnBoard_D2 sink_properties=device.description="Headset-Output"
load-module module-alsa-sink device=hw:1,0 sink_properties=device.description="HDMI"
load-module module-alsa-source device=OnBoard_D0 source_properties=device.description="BT_VOIP-Input"
load-module module-alsa-source device=OnBoard_D1 source_properties=device.description="Headset-Input"
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink




Then scroll to the bottom of the default.pa file and find this section:


### Make some devices default
#set-default-sink output
#set-default-sink alsa_output.platform-sound-simple-card.analog-stereo
#set-default-source input
set-default-source alsa_input.OnBoard_D1
#set-default-sink alsa_output.platform-sound-simple-card.analog-stereo
#set-default-sink alsa_output.OnBoard_D2
set-default-sink alsa_output.hw_1_0

Add the bolded line and comment out with a "#" all the other "set-default-sink" entries. Make sure there is only ONE set-default-sink entry as seen above. 


Edit alsa.conf.   "sudo nano /usr/share/alsa/alsa.conf" Find the following three lines and ensure they read exactly as below. Notice Card 1 and Device 0 again?

defaults.ctl.card 0
defaults.pcm.card 1
defaults.pcm.device 0




Lastly, I'm not actually sure you need this but I did this too... (might try it without it)


Do a "ls -la" in your tinker home directory. (if you are running emulationstation or whatever audio app you're using as the tinker user).

tinker@tinkerboard:~$ ls -la
total 95504
drwxr-xr-x 9 tinker tinker     4096 Dec  9 22:47 .
drwxr-xr-x 3 root   root       4096 Oct 14 05:58 ..
-rw-r--r-- 1 tinker tinker       76 Dec  9 22:30 .asoundrc

Do you see a file called .asoundrc?

If not create it by typing "nano .asoundrc" and add the following contents then save the file. (you see card 1 in there? yeah.. that's the HDMI)

pcm.!default {
type hw
card 1
}

ctl.!default {
type hw
card 1
}




All done? reboot. Once back online check the ~/.config/pulse/2592e94e0eca4114a2f5661e6f578259-default-sink file (your numbers may be different but it'll end in -default-sink). It should now show alsa_output.hw_1_0. If so, you're in business.. (our should be)


Sounds seems to work just fine now. Need to do more testing though..
Reply
#5
I was messing around with Kodi, and streaming videos via Chromium and had a similar issue.  It looks like you resolved it.  But I just simply changed my audio output via the gui tools to the one that said "RockChip".  Did the same in the Kodi settings and it worked like a charm.

It looks like you accomplished something similar using config files and the terminal.  But just wanted to toss this out there.
Reply
#6
(12-11-2018, 03:15 PM)icsy7867 Wrote: I was messing around with Kodi, and streaming videos via Chromium and had a similar issue.  It looks like you resolved it.  But I just simply changed my audio output via the gui tools to the one that said "RockChip".  Did the same in the Kodi settings and it worked like a charm.

It looks like you accomplished something similar using config files and the terminal.  But just wanted to toss this out there.

I appreciate the reply! I’m pretty certain my method is the “stone tools” method but it got Retropie working. I may try firing kodi up next time (this took me 2 days to fix... reminded me of the red hat 5.2 days). Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)