Opened 14 years ago
Closed 14 years ago
Last modified 14 years ago
#7563 closed defect (fixed)
Upmixer uses wrong sample rate for IEC958
Reported by: | anonymous | Owned by: | JYA |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | MythTV - Audio Output | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Some of my video files have 44100 audio sample rate. When I try to play them with upmixer on, sound gets disabled because myth tries to use iec958 with an invalid sample rate of 44100.
Log attached shows ALSA returned standard 48000 rate but myth did not accept it. Myth should switch to 48000 sample rate when enabling upmixer.
Attachments (1)
Change History (10)
comment:1 follow-up: 2 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Alsa reports 44100 as being available ; and as your content is 44.1kHz, that's what it tried using... AC3 doesn't have to be 48kHz.
44100 isn't an invalid sample rate for iec958.
So here myth doesn't use the *wrong* sample rate. It uses what your card reports as being available. Yet, for some reasons ALSA uses 44.1kHz, you get 48kHz in return.
Possible issues: -Alsa is broken for your device, try upgrading to a newer version -You haven't configured myth properly. Myth tries to open the "default" device. Make sure you have set the passthrough device properly and checked AC3 as being available
This is what a proper ALSA driver would return when trying to play 44.1kHz audio with AC3 upmixing:
2009-11-14 12:52:55.239 DEnc: Init codecid=AC3, br=448000, sr=44100, ch=6 2009-11-14 12:52:55.239 DigitalEncoder::Init fs=1536, bpf=12 ofb=18432 2009-11-14 12:52:55.240 Opening audio device 'spdif'. ch 2(2) sr 44100 (reenc 0) 2009-11-14 12:52:55.240 Setting IEC958 status: non-audio 2009-11-14 12:52:55.240 Opening ALSA audio device 'spdif'. 2009-11-14 12:52:55.240 in SetParameters(format=2, channels=2, rate=44100, buffer_time=400000, period_time=25000) 2009-11-14 12:52:55.281 AO: Audio fragment size: 6144 2009-11-14 12:52:55.281 AO: create upmixer 2009-11-14 12:52:55.281 AO: Create upmixer done with surround mode 2
In any cases, this is not a mythtv issue
comment:2 Changed 14 years ago by
Replying to jyavenard:
Alsa reports 44100 as being available ; and as your content is 44.1kHz, that's what it tried using... AC3 doesn't have to be 48kHz.
Further investigation suggests that my sound card does not allow anything other than 48k when put into non-audio mode.
So here myth doesn't use the *wrong* sample rate. It uses what your card reports as being available. Yet, for some reasons ALSA uses 44.1kHz, you get 48kHz in return.
My card is reporting its supported /audio/ rates, which are different from its suppored /non-audio/ rate. Myth just assumes the two are identical.
In any cases, this is not a mythtv issue
It /is/ a mythtv issue because you make the incorrect assumption that the sound card driver supports the same sample rates regardless of audio or non-audio mode.
comment:3 follow-up: 5 Changed 14 years ago by
Resolution: | invalid |
---|---|
Status: | closed → new |
What did you put for the audio configuration?
Please list all the settings you've entered. In particular what audio devices did you set up for both default audio output and digital passthrough audio. How many speakers was set, if AC3 or DTS was checked etc...
comment:4 Changed 14 years ago by
Status: | new → infoneeded_new |
---|
comment:5 Changed 14 years ago by
Replying to jyavenard:
What did you put for the audio configuration?
Audio output device: ALSA:default Digital output device: ALSA:iec958 (I.e., stereo out to analog jacks, upmix/surround to digital jack) Speakers: 5.1 Dolby Digital: Yes DTS: No
N.B. If I change "Audio output device" to "ALSA:spdif", the driver reports only 48000 supported and upmix works, but then I cannot use different devices for analog/digital. Since the configuration screen allows me to setup different devices, I thought it should be possible.
comment:6 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | infoneeded_new → closed |
(In [22851]) Add extra logging in Alsa GetSupportedRate? to help identify issue Detect if audio will be upconverted to AC3 before retrieving the list of supported rates in order to open the right audio device Should fix #7563
comment:7 follow-up: 8 Changed 14 years ago by
Please try r22851 and see if it works better for you that way...
mythfrontend -v audio