LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 06-16-2009, 11:08 AM   #1
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Alsip, IL
Distribution: Bodhi and Maemo
Posts: 297

Rep: Reputation: 33
Audio through HDMI Cable?


When I run my video through the HDMI cord on my laptop it does not put through any audio to my LCD TV when on Ubuntu. It works just fine through Windows. Any suggestions?

~Jeff
 
Old 06-16-2009, 02:06 PM   #2
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
You have to tell Linux to output through digital. Use aplay -l and note down what device is digital audio for HDMI. Then you can test it using mplayer. The following should work assuming 0.3 is digital audio over HDMI.

mplayer -ac hwac3,hwdts, -ao alsa:device=hdmi -channels 2 [i]file[/file]

or

mplayer -ac hwac3,hwdts, -ao alsa:device=plughw:0.3 -channels 2 [i]file[/file]

or

mplayer -afm hwac3,hwdts, -ao alsa:device=hdmi -channels 2 [i]file[/file]

or

mplayer -afm hwac3,hwdts, -ao alsa:device=plughw:0.3 -channels 2 [i]file[/file]

If it works in a reliable way or all the time, you can then create $HOME/.asoundrc to always use it.

Not all systems support passing digital audio through HDMI.
 
Old 06-16-2009, 03:06 PM   #3
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Alsip, IL
Distribution: Bodhi and Maemo
Posts: 297

Original Poster
Rep: Reputation: 33
I'll give that a go... I also need to set this up for my not-so-computer savy friend how ever so I need to get it working automatically. Also how would I go about having other applications, such as firefox (for streaming video) or VLC, to use the HDMI audio out? Start with a similar argument after them?

~Jeff
 
Old 06-16-2009, 08:01 PM   #4
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Alsip, IL
Distribution: Bodhi and Maemo
Posts: 297

Original Poster
Rep: Reputation: 33
Here is copied from terminal the digital entry:
Code:
card 0: Intel [HDA Intel], device 1: ALC888 Digital [ALC888 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
What exactly should I use to launch mplayer to test this?

~Jeff
 
Old 06-17-2009, 05:55 PM   #5
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
The following should work.

mplayer -afm hwac3,hwdts, -ao alsa:device=hdmi -channels 2 file

or

mplayer -afm hwac3,hwdts, -ao alsa:device=plughw:0.2 -channels 2 file

Digital audio is not reliable in Linux. Linux is not designed for computer illiterates. Also Linux is still design for servers. Third Linux power saving features like Suspend to RAM or Suspend to Disk is not reliable enough to use in production systems.

A notebook computer that I suggest for computer illiterates is a MacBook or MacBook Pro. Mac OS X has Unix like commands that can be access from Applications -> Utilities -> Terminal.

If you insist using Linux for notebook computers, you have to do the following.
1) Install MPlayer with almost every feature do not forget LIVE support and leave out GUI or GTK
2) Install SMPlayer
3) Install mplayerplug-in
4) Install VLC
5) Install Adobe Flash plug-in
6) Install Adobe Reader
7) Install PulseAudio and its utilities and modules
8) Pick a GUI WiFi program that is easy. I use kwifimanager.
9) Install acpid, cpufreqd, and laptop-tools
10) Install hibernate scripts and configure
11) Configure acpid, cpufreqd, and laptop-tools
12) Configure hal and dbus for removable storage devices
13) Install and configure ifplugd
14) Configure PulseAudio
15) Test mplayerplug-in at apple.com, nasa.gov, or others
16) Test WiFi
17) Test removable storage
18) Test power management between AC and battery
19) Test hibernate scripts for Suspend to RAM or Suspend to Disk
20) Test lid close if want to turn off lamp.
21) Test xscreensaver or similar program
22) Test PulseAudio to find out how easy it is to switch from analog outputs to digital

The following is what I use for MPlayer config (/etc/mplayer/mplayer.conf).

Code:
##################
# video settings #
##################

# Specify default video driver (see -vo help for a list).
vo=vdpau,gl,xv,x11,null

dr=yes


##################
# audio settings #
##################

# Specify default audio driver (see -ao help for a list).
ao=alsa,oss,null


##################
# other settings #
##################

# Drop frames to preserve audio/video sync.
framedrop = yes

# cache settings
cache = 102400

# Prefill 20% of the cache before starting playback.
cache-min = 20.0

# Prefill 50% of the cache before restarting playback after the cache emptied.
cache-seek-min = 20

# DVD: Display English subtitles if available.
#slang = en

# DVD: Play English audio tracks if available.
alang = en

# You can also include other configuration files.
#include = /path/to/the/file/you/want/to/include
fontconfig=1
subfont-osd-scale=4
subfont-text-scale=3

a52drc=0
identify=yes

stop-xscreensaver=yes

xineramascreen=-1

lavdopts=threads=2

[vo.gl]
vf-clr=yes
vf=softskip,scale=-1:-1

[vo.vdpau]
vf-clr=yes

#For VDPAU to work properly
vc=ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffh264vdpau,
I suggest use Gentoo for better flexibility during setup.
 
Old 06-23-2009, 12:55 PM   #6
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Alsip, IL
Distribution: Bodhi and Maemo
Posts: 297

Original Poster
Rep: Reputation: 33
Thanks for your help thus far, any idea what I would use to launch the film via VLC to get audio over the HDMI? mplayer is alright, but I much prefer VLC for movie watching.

~Jeff
 
Old 06-25-2009, 08:27 PM   #7
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
VLC is not reliable and stable all the time, so I suggest use MPlayer. I suggest SMPlayer for GUI front end for MPlayer because it is easy to use. Do not use MPlayer's GUI front end (GMPlayer) because it is not reliable. I recommend do not include GMPlayer while compiling MPlayer.

If you insist of using lousy VLC, the settings are in the preferences. It is not hard to figure out. Getting VLC to pass through AC-3 and DTS with out first decoding it will be a problem.

I still strongly recommend an Apple notebook because Mac OS X is tailored for "not-so-computer savvy" users. Linux is still tailored for servers. Linux for notebooks is far from production use because putting a notebook computer in suspend mode is not reliable and stable. Mac OS X uses SAMBA for file sharing and CUPS for printing, so you still are using some open source projects.
 
Old 06-26-2009, 09:44 AM   #8
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Alsip, IL
Distribution: Bodhi and Maemo
Posts: 297

Original Poster
Rep: Reputation: 33
Heh, say what you will but desktop Linux has come a long way in the last couple of years and it is only going to continue advancing. One day we will see support for things such as HDMI audio support on it.

Anywho I just went out and got a 1/8 to RCA cable to run my sound through my stereo.

~Jeff
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HDMI Audio not working with ASUS M3N78-EM Spectre5 Linux - Software 6 05-25-2009 10:19 PM
No HDMI Audio despite showing up unmuted in alsamixer Furious_George Linux - Hardware 8 05-17-2009 03:05 PM
LXer: Using HDMI Audio/Video On Linux LXer Syndicated Linux News 0 12-10-2008 04:00 PM
LXer: Using HDMI Audio/Video On Linux LXer Syndicated Linux News 0 12-10-2008 11:40 AM
How can I listen to audio CDs without audio cable? calande Linux - Desktop 11 07-20-2007 11:41 AM


All times are GMT -5. The time now is 05:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration