WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how to get sound from hdmi  (Read 10382 times)

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
how to get sound from hdmi
« on: June 18, 2013, 05:11:53 AM »
my graphic card (xfx hd5450) inserted in PCIe slot of motherboard has an HDMI port which is connected to LCD TV .  What shoulf
I do so that sound comes from my TV ?
In ubuntu 12.04 I had to add option 'radeon.audio=1' to kernel .

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14801
Re: how to get sound from hdmi
« Reply #1 on: June 18, 2013, 05:25:55 AM »
Are you using alsa for sound?

Does alsamixer show the hdmi sound output?

aus9

  • Guest
Re: how to get sound from hdmi
« Reply #2 on: June 18, 2013, 08:06:00 AM »
what he said,

and only if you can't see HDMI in the alsamixer settings for index=0 or pressing F6
http://wiki.tinycorelinux.net/wiki:alsa_part2#alsamixer

then have a peek at my suggested .asoundrc section
http://wiki.tinycorelinux.net/wiki:setting_up_sound#hdmi_or_asoundrc_users

good luck

PS common issues, sound output is muted or volumes too low
---but for HDMI users, especially, toggling on or off the SPDF setting seems to do wonders

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: how to get sound from hdmi
« Reply #3 on: June 18, 2013, 08:22:01 AM »
BTW , I am using OSS .
I will try to post detailed output of ossxmix soon.
« Last Edit: June 18, 2013, 08:24:25 AM by manit123 »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: how to get sound from hdmi
« Reply #4 on: June 18, 2013, 03:27:19 PM »
There is only ALSA support for the radeon HDMI soundcard.
The only barriers that can stop you are the ones you create yourself.

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: how to get sound from hdmi
« Reply #5 on: June 19, 2013, 12:19:26 AM »
initially I installed OSS.tcz . ossmix output shows no mention of word 'hdmi' anywhere .
Quote
$ossmix
Selected mixer 0/High Definition Audio 0x11060397
Known controls are:
jack.jack1c.mute ON|OFF (currently OFF)
jack.jack1c.pcm11 [<leftvol>:<rightvol>] (currently 62.9:62.9 dB)
jack.jack1c.pcm12 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
jack.jack1c.pcm3 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
jack.jack1c.pcm2 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
jack.jack1c.jack6 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
jack.jack1c.jack5 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
jack.jack1c.pcm4 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
jack.jack1d.mute ON|OFF (currently OFF)
jack.jack1e.mute ON|OFF (currently OFF)
record.select1.select1 <pcm3|pcm2|jack6|jack5|mix> (currently pcm3)
record.select1 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
record.jack6 [<leftvol>:<rightvol>] (currently 46.4:46.4 dB)
misc.pcm2 [<leftvol>:<rightvol>] (currently 62.9:62.9 dB)
misc.mute1 ON|OFF (currently OFF)
misc.pcm3 [<leftvol>:<rightvol>] (currently 62.9:62.9 dB)
misc.pcm4 [<leftvol>:<rightvol>] (currently 62.9:62.9 dB)
misc.mute2 ON|OFF (currently OFF)
misc.mute3 ON|OFF (currently OFF)
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Multich)
vmix0-src <Fast|High|OFF> (currently High)
vmix0-outvol <monovol> (currently 25.0 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm7 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm8 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm9 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm10 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
Then I installed OSS_alsa.tcz.
Now aplay -l  says
Code: [Select]
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
alsamixer shows chip 'ati r6xx hdmi'  with just one control s/pdif that I can just mute (using 'm')  up-down-arrow does nothing. Please see 1.png.
Then I created ~/.asoundrc
Code: [Select]
pcm.!default {
type hw
card 0
device 3
}

ctl.card0 {
type hw
card 0
device 3
}
Also installed alsaplayer.tcz alsamixergui.tcz. Exited to prompt & logged in again.
Tried to play mp3 file using it . A 3minute21second mp3 gets over in 8 seconds though speed & volume is shown 100% in  alsaplayergui. Yet ,  no sound from my TV.
Simply running alsamixergui says
Quote
ctl_oss: MIXER_CAPS error: Invalid argument
ctl_oss: MIXER_CAPS error: Invalid argument
No mixer elems found
So , I ran 'alsamiser -c 0' & got 3.png (see attached)

CASE 2
This time I started with alsa.tcz installed (fresh boot & I kept OSS out of sight)
aplay -l says
Quote
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 0: SB [HDA ATI SB], device 1: VT1708S Digital [VT1708S Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
I created .asoundrc with card 1 device 3 in both pcm & control sections (should I write ctl.card1 ?).
This time also mp3 file gets played quickly without sound emanating from TV.
I got this message in prompt
Code: [Select]
hda-intel:IRQ timing workaround is activated for card #1.Suggest a bigger bdl_pos_adj.
« Last Edit: June 19, 2013, 12:27:45 AM by manit123 »

aus9

  • Guest
Re: how to get sound from hdmi
« Reply #6 on: June 19, 2013, 01:42:45 AM »
good questions lets go to the beginning and move forward

1) as curaga says, HDMI and alsa for you so we dismiss your time you spent with oss sorry

2) your question on asoundrc, yes let me explain it hopefully? New setting

Quote
pcm.!default {
type hw
card 1
device 3
}

ctl.card1 {
type hw
card 1
device 3
}
the top section tells alsa what our default card and device is
the bottom section tells the control of card one, what device to control

3) I was tempted to recommend a index=1 setting for you, but I will reserve that in case we can get it to work correctly without that

but can you show the results to this command pls
Code: [Select]
lspci | grep AudioI don't like seeing generic ---its harder to google for your position fix below

4)
Quote
hda-intel:IRQ timing workaround is activated for card #1.Suggest a bigger bdl_pos_adj.

That is done thru a blacklist with a modprobe (with) options setting as per
http://wiki.tinycorelinux.net/wiki:setting_up_sound#reasons_for_changing

see that " bdl_pos_adj:BDL position adjustment offset"
but I don't have your hw, so would have to google for a setting that might work

the link is not your hw, but gives you an idea.....to do much later when you fix up your .asoundrc
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1181721


Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: how to get sound from hdmi
« Reply #7 on: June 20, 2013, 12:05:31 AM »
Tried
Quote
pcm.!default {
type hw
card 1
device 3
}

ctl.card1 {
type hw
card 1
device 3
}
Still mp3 file gets quickly played without emission of sound

Here is lspci output
Code: [Select]
00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge                                                                                   
00:02.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (ext gfx port 0)
00:06.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 2)
00:11.0 SATA controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 SATA Controller[IDE mode]
00:12.0 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.1 USB Controller: ATI Technologies Inc SB7x0 USB OHCI1 Controller
00:12.2 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.1 USB Controller: ATI Technologies Inc SB7x0 USB OHCI1 Controller
00:13.2 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3c)
00:14.1 IDE interface: ATI Technologies Inc SB7x0/SB8x0/SB9x0 IDE Controller
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: ATI Technologies Inc SB7x0/SB8x0/SB9x0 LPC host controller
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge
00:14.5 USB Controller: ATI Technologies Inc SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Link Control
01:00.0 VGA compatible controller: ATI Technologies Inc Cedar PRO [Radeon HD 5450]
01:00.1 Audio device: ATI Technologies Inc Manhattan HDMI Audio [Mobility RadeonHD 5000 Series]
02:00.0 Ethernet controller: Atheros Communications AR8131 Gigabit Ethernet (revc0)

Quote
lspci | grep -i audio
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
01:00.1 Audio device: ATI Technologies Inc Manhattan HDMI Audio [Mobility Radeon HD 5000 Series]
« Last Edit: June 20, 2013, 12:16:08 AM by manit123 »

aus9

  • Guest
Re: how to get sound from hdmi
« Reply #8 on: June 20, 2013, 04:08:06 AM »
Quote
mp3 file gets quickly played
not a good sign if you knew from other distros what the progress speed should be.

Have you got a wav file on your computer?
if not, with alsa loaded play the loop wav, when you sick of it
or it works press control key + the c key to stop
Code: [Select]
speaker-test -c2 -t wav
That way we avoid any codec or player issues

2) ok now with your new config for ,asoundrc....... you can confirm you have the leading dot ?

3) if still no sound  run alsamixer

if it shows card0 as expected, now try muting and unmuting the SPDIF settings using the m key (m for mute)

and report back when you can

good luck

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: how to get sound from hdmi
« Reply #9 on: June 21, 2013, 01:55:34 AM »
when .asoundrc file is not present then external speaker says 'front left , front right' repeatedly
Code: [Select]
$ speaker-test -c2 -t wav

speaker-test 1.0.24.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 8192
Period size range from 1024 to 1024
Using max buffer size 8192
Periods = 4
was set period_size = 1024
was set buffer_size = 8192
 0 - Front Left
 1 - Front Right
00000Time per period = 2.855987
 0 - Front Left
0 1 - Front Right
Time per period = 3.008050
 0 - Front Left
 1 - Front Right
Time per period = 3.007933
 0 - Front Left
 1 - Front Right
Time per period = 3.007974
 0 - Front Left
 1 - Front Right
Time per period = 3.007899
 0 - Front Left
 1 - Front Right
Time per period = 3.008164
 0 - Front Left
 1 - Front Right
Time per period = 3.028796
 0 - Front Left
 1 - Front Right
When I have .asoundrc set as told then I get
Code: [Select]
$ speaker-test -c2 -t wav

speaker-test 1.0.24.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 32 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
 0 - Front Left
 1 - Front Right
Time per period = 0.109079
 0 - Front Left
 1 - Front Right
Time per period = 0.120339
 0 - Front Left
 1 - Front Right
Time per period = 0.121454
 0 - Front Left
 1 - Front Right
Time per period = 0.122807
 0 - Front Left
 1 - Front Right
Time per period = 0.122394
 0 - Front Left
 1 - Front Right

and no sound from speaker
Also I notice that in alsamixer master front,front,pcm decides volume of external speaker . Rest all can be muted.
Also see attached screenshot of ubuntu (us.jpg) in which hdmi audio works , if it helps you to identify difference.
« Last Edit: June 21, 2013, 02:02:02 AM by manit123 »

aus9

  • Guest
Re: how to get sound from hdmi
« Reply #10 on: June 21, 2013, 07:53:23 AM »
oops I think we just played index=0 device.

before we set that as per wiki, I think Ubuntu uses Pulseaudio, give it shot first if you like.

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: how to get sound from hdmi
« Reply #11 on: June 24, 2013, 12:24:15 AM »
I did
$ tce-load -i alsa.tcz
depmod.tcz: OK
alsa-config.tcz: OK
libpci.tcz: OK
pci-utils.tcz: OK
i2c-3.0.21-tinycore.tcz: OK
v4l-dvb-3.0.21-tinycore.tcz: OK
input-joystick-3.0.21-tinycore.tcz: OK
alsa-modules-3.0.21-tinycore.tcz: OK
alsa.tcz: OK
$ tce-load -i pulseaudio.tcz
fftw.tcz: OK
json-c.tcz: OK
udev-lib.tcz: OK
liborc.tcz: OK
gcc_libs.tcz: OK
libavahi.tcz: OK
libxcb-util.tcz: OK
libogg.tcz: OK
speex.tcz: OK
libssl-0.9.8.tcz: OK
flac.tcz: OK
libvorbis.tcz: OK
libao.tcz: OK
vorbis-tools.tcz: OK
libsndfile.tcz: OK
libsamplerate.tcz: OK
libltdl.tcz: OK
libpulseaudio.tcz: OK
pulseaudio.tcz: OK
$ cat ~/.X.d/dbus
"dbus-launch --sh-syntax --exit-with-session"
startx

$pulseaudio -vv
see attached file xaa , xab (both are text , original log was 173KB .So , had to split it.)

$ cat ~/.X.d/pulseaudio
"start-pulseaudio-x11"
« Last Edit: June 24, 2013, 12:32:34 AM by manit123 »

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: how to get sound from hdmi
« Reply #12 on: June 24, 2013, 12:31:43 AM »
I went through a similar process to try and get sound out of my laptop's HDMI port (also a radeon. HD 5470 or something?) and the results of my research was that there is a kernel patch since merged into newer kernel versions needed. Might you be seeing a similar problem?

aus9

  • Guest
Re: how to get sound from hdmi
« Reply #13 on: June 24, 2013, 03:41:09 AM »
re pulseaudio log,
what a mess!

what is dbus doing? Is it loaded? Please check what you have done as per pulseaudio info file please.

Code: [Select]
/usr/local/etc/init.d/dbus status
I have made some comments in the wiki about the correct order and rebooting. It helps to know if you have done

good luck


Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: how to get sound from hdmi
« Reply #14 on: June 25, 2013, 12:08:47 AM »
to althalus ,
I also tried following with latest tiny core iso . Still same problem of mp file playd quickly without HDMI sound.
to aus9
Here is full detail . Please tell where I went wrong .
Quote

tc@box:/mnt/sda4/sum/sata/tc repository/tc/tc $tce-load -i alsa.tcz
depmod.tcz: OK
alsa-config.tcz: OK
libpci.tcz: OK
pci-utils.tcz: OK
i2c-3.0.21-tinycore.tcz: OK
v4l-dvb-3.0.21-tinycore.tcz: OK
input-joystick-3.0.21-tinycore.tcz: OK
alsa-modules-3.0.21-tinycore.tcz: OK
alsa.tcz: OK
tc@box:/mnt/sda4/sum/sata/tc repository/tc/tc $tce-load -i alsaplayer.tcz
libssl-0.9.8.tcz: OK
flac.tcz: OK
libogg.tcz: OK
libvorbis.tcz: OK
libao.tcz: OK
vorbis-tools.tcz: OK
libsndfile.tcz: OK
libsamplerate.tcz: OK
libmad.tcz: OK
alsaplayer.tcz: OK
tc@box:/mnt/sda4/sum/sata/tc repository/tc/tc $cat ~/.X.d/dbus
 "dbus-launch --sh-syntax --exit-with-session"
                startx

tc@box:/mnt/sda4/sum/sata/tc repository/tc/tc$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 0: SB [HDA ATI SB], device 1: VT1708S Digital [VT1708S Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
tc@box:/mnt/sda4/sum/sata/tc repository/tc/tc$ cat ~/.asoundrc
pcm.!default {
type hw
card 1
device 3
}

ctl.card1 {
type hw
card 1
device 3
}
tc@box:/mnt/sda4/sum/sata/tc repository/tc/tc$ tce-load -i pulseaudio.tcz
fftw.tcz: OK
json-c.tcz: OK
udev-lib.tcz: OK
liborc.tcz: OK
gcc_libs.tcz: OK
libavahi.tcz: OK
libxcb-util.tcz: OK
speex.tcz: OK
libltdl.tcz: OK
libpulseaudio.tcz: OK
pulseaudio.tcz: OK
#/usr/local/etc/init.d/dbus start
$pulseaudio -vv
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
I: [pulseaudio] core-util.c: Failed to acquire high-priority scheduling: No such file or directory
I: [pulseaudio] main.c: This is PulseAudio 2.1
D: [pulseaudio] main.c: Compilation host: i686-pc-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -march=i486 -mtune=i686 -Os -pipe -Wall -W -Wextra -Wno-long-long -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
D: [pulseaudio] main.c: Running on host: Linux i686 3.0.21-tinycore #3021 SMP Sat Feb 18 11:54:11 EET 2012
D: [pulseaudio] main.c: Found 4 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is bffe26791f3d21ecc3353c0b00000012.
I: [pulseaudio] main.c: Using runtime directory /home/tc/.pulse/bffe26791f3d21ecc3353c0b00000012-runtime.
I: [pulseaudio] main.c: Using state directory /home/tc/.pulse.
I: [pulseaudio] main.c: Using modules directory /usr/local/lib/pulse-2.1/modules.
I: [pulseaudio] main.c: Running in system mode: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.

tc@box:/mnt/sda4/sum/sata/tc repository/tc/tc$ tce-load -i pavucontrol.tcz
gstreamer.tcz: OK
libcanberra.tcz: OK
ttf-bitstream-vera.tcz: OK
libglade.tcz: OK
libsigc++.tcz: OK
glibmm.tcz: OK
atkmm.tcz: OK
cairomm.tcz: OK
pangomm.tcz: OK
gtkmm.tcz: OK
libglademm.tcz: OK
pavucontrol.tcz: OK

$ ps aux | grep -i pulse
 4601 tc       {start-pulseaudi} /bin/sh /usr/local/bin/start-pulseaudio-x11
 4603 tc       grep -i pulse
 4604 tc       /usr/local/bin/pulseaudio --start

$ps aux | grep -i alsa
14064 tc       grep -i alsa

$ sudo su
root@box:~# ps aux | grep -i alsa
26177 root     grep -i alsa

« Last Edit: June 25, 2013, 12:24:36 AM by manit123 »