Alsa 1.0.8 Digital Out
Alsa 1.0.8 Digital Out
Hi Shallax,
you have asked for feedback on Alsa 1.0.8.
I could NOT get digital out to work with 1.0.8
With the old Alsa it worked fine, after running magic unfortunally it is not working.
Did anybody else tested and had success?
How to go back to the old alsa?
Cheers
Faser
you have asked for feedback on Alsa 1.0.8.
I could NOT get digital out to work with 1.0.8
With the old Alsa it worked fine, after running magic unfortunally it is not working.
Did anybody else tested and had success?
How to go back to the old alsa?
Cheers
Faser
Hi Shallax,
seems mplayer is missing something.
I googled but I could not find any hint.
Any tip from you?
Cheers
Frederik
seems mplayer is missing something.
Code: Select all
Forced audio codec: hwac3
Cannot find codec for audio format 0x55.
Any tip from you?
Cheers
Frederik
-
- Newbie
- Posts: 2
- Joined: Wed Sep 22, 2004 9:11 pm
If I'm not mistaken this message looks like you are trying to decode an mp3 stream (format 0x55) as a raw ac3 stream.
The -ac hwac3 switch only work if you actually have a ac3 stream.
I was wrestling this problem myself last night and after a few hours trial and error I got it to work!
I have not installed alsa 1.0.8 with xbox-fixes through magic, since I'm still running a 2.4 kernel. Instead, I manually patched a alsa 1.0.8, compiled and installed. However, I don't see why this should not work for an alsa from magic.
First of all, be sure that mplayer is actually using alsa and not oss. This gives us:
Well, this doesn't give you any digital out either, because you have three devices on your nForce2 on board sound card; one analog playback, one capturing and one digital playback (numbered 0, 1 and 2).
By default the analog playback device is used. Ok, lets tell mplayer to use the digital one instead:
This was the point where I was actually starting to get feed on my optical cable.
So, the next step was getting alsa to understand that the digital device should be defult. Then I stumbled over a thread handling just that on
http://www.gossamer-threads.com/lists/m ... ht=1#61265
To make it short, edit /etc/asound.conf with the following text:
Now we have defined four virtual devices; analog, mixed-analog, digital and mixed-digital. By using the digital one in the default field in the configuration I managed to get digital out as default. I havent tried the mixed stuff since I'm only using gentoox for mythtv and have no need for mixing different alsa sources.
Ok, now we are back where we can actually use mplayer with:
Finally, if you have an ac3 stream you would probably like to use
And if you want to play ac3 and non ac3 streams with the same command, you can tell mplayer to fall back to oss/alsa if no ac3 stream was found with:
Hope you find my experience useful and that it solves your problems.
Cheers,
Henrik
The -ac hwac3 switch only work if you actually have a ac3 stream.
I was wrestling this problem myself last night and after a few hours trial and error I got it to work!
I have not installed alsa 1.0.8 with xbox-fixes through magic, since I'm still running a 2.4 kernel. Instead, I manually patched a alsa 1.0.8, compiled and installed. However, I don't see why this should not work for an alsa from magic.
First of all, be sure that mplayer is actually using alsa and not oss. This gives us:
Code: Select all
mplayer -ao alsa
By default the analog playback device is used. Ok, lets tell mplayer to use the digital one instead:
Code: Select all
mplayer -ao alsa:device=hw#0.2
So, the next step was getting alsa to understand that the digital device should be defult. Then I stumbled over a thread handling just that on
http://www.gossamer-threads.com/lists/m ... ht=1#61265
To make it short, edit /etc/asound.conf with the following text:
Code: Select all
# Override the default output used by ALSA.
# If you do not override the default, your default
# device is identical to the (unmixed) analog device
# shown below. If you prefer mixed and/or digital
# output, uncomment the appropriate four lines below
# (only one slave.pcm line).
pcm.!default {
type plug
## Uncomment the following to use mixed analog by default
# slave.pcm "dmix-analog"
# Uncomment the following to use unmixed digital by default
slave.pcm "digital-hw"
## Uncomment the following to use mixed digital by default
# slave.pcm "dmix-digital"
}
# Alias for analog output on the nForce2 (hw:0,0)
# - This is identical to the device named "default"--which
# always exists and refers to hw:0,0 (unless overridden)
# - Therefore, we can specify "hw:0,0", "default", or "analog"
# to access analog output on the nForce2
pcm.analog {
type plug
slave.pcm "analog-hw"
}
# Control device (mixer, etc.) for the nForce2 card
ctl.analog {
type hw
card 0
}
# Alias for (rate-converted) mixed analog output on the
# nForce2 (hw:0,0)
# - This will accept audio input--regardless of rate--and
# convert to the rate required for the dmix plugin
# (in this case 48000Hz)
pcm.mixed-analog {
type plug
slave.pcm "dmix-analog"
}
# Control device (mixer, etc.) for the nForce2 card
ctl.mixed-analog {
type hw
card 0
}
# Alias for (rate-converted) digital (S/PDIF) output on the
# nForce2 (hw:0,2)
# - This will accept audio input--regardless of rate--and
# convert to the rate required for the S/PDIF hardware
# (in this case 48000Hz)
pcm.digital {
type plug
slave.pcm "digital-hw"
}
# Control device (mixer, etc.) for the nForce2 card
ctl.digital {
type hw
card 0
}
# Alias for mixed (rate-converted) digital (S/PDIF) output on the
# nForce2 (hw:0,2)
# - This will accept audio input--regardless of rate--and
# convert to the rate required for the S/PDIF hardware
# (in this case 48000Hz)
pcm.mixed-digital {
type plug
slave.pcm "dmix-digital"
}
# Control device (mixer, etc.) for the nForce2 card
ctl.mixed-digital {
type hw
card 0
}
# The following devices are not useful by themselves. They
# require specific rates, channels, and formats. Therefore,
# you probably do not want to use them directly. Instead use
# of of the devices defined above.
# Alias for analog output on the nForce2 (hw:0,0)
# Do not use this directly--it requires specific rate,
# channels, and format
pcm.analog-hw {
type hw
card 0
# The default value for device is 0, so no need to specify
}
# Control device (mixer, etc.) for the nForce2 card
ctl.analog-hw {
type hw
card 0
}
# Alias for digital (S/PDIF) output on the nForce2 (hw:0,2)
# Do not use this directly--it requires specific rate,
# channels, and format
pcm.digital-hw {
type hw
card 0
device 2
}
# Control device (mixer, etc.) for the nForce2 card
ctl.digital-hw {
type hw
card 0
}
# Direct software mixing plugin for analog output on
# the nForce2 (hw:0,0)
# Do not use this directly--it requires specific rate,
# channels, and format
pcm.dmix-analog {
type dmix
ipc_key 1234
slave {
pcm "analog-hw"
period_time 0
period_size 1024
buffer_size 4096
rate 48000
}
}
# Control device (mixer, etc.) for the nForce2 card
ctl.dmix-analog {
type hw
card 0
}
# Direct software mixing plugin for digital (S/PDIF) output
# on the nForce2 (hw:0,2)
# Do not use this directly--it requires specific rate,
# channels, and format
pcm.dmix-digital {
type dmix
ipc_key 1235
slave {
pcm "digital-hw"
period_time 0
period_size 1024
buffer_size 4096
rate 48000
}
}
# Control device (mixer, etc.) for the nForce2 card
ctl.dmix-digital {
type hw
card 0
}
Ok, now we are back where we can actually use mplayer with:
Code: Select all
mplayer -ao alsa
Code: Select all
mplayer -ao alsa -ac hwac3
Code: Select all
mplayer -ao alsa -ac hwac3,
Cheers,
Henrik