Opened 13 years ago

Closed 12 years ago

#10012 closed Bug Report - General (Won't Fix)

No sound on channel change

Reported by: nasevz@… Owned by:
Priority: minor Milestone: unknown
Component: MythTV - General Version: 0.24.1
Severity: medium Keywords: sound channel change backend
Cc: Ticket locked: no

Description

I am using Mythtv V0.24.1-78-g8b9e5ce on Ubuntu Natty, kernel 2.6.38-11-generic. My TV card is analog FlyVideo? 2000, SAA 7130. I have problem with sound when watching live Tv. Frist time when I open live channel, the sound is OK. If I try to switch another channel, there is no sound. If I exit watching tv and enter again, sound is OK. This is happening to both local and remote frontend. I tried to debug backend and started it manually "sudo mythbackend -l Mythbackend.log -v record,playback", but problem dissapeared. I guess slowing the process of channel change because of writing log resulted in proper operation.

Change History (10)

comment:1 Changed 13 years ago by sphery

Status: newinfoneeded_new

Please post default-verbosity mythbackend log output showing the failure. (Possibly a dup of #9825 ?)

comment:2 Changed 13 years ago by nasevz@…

This is mythbackend log. I dont think that this is duplicate to #9825.

open Live TV - sound ok
change channel - no sound
exit live tv
open live tv - sound ok

2011-08-30 11:01:01.194 MainServer::ANN Playback
2011-08-30 11:01:01.229 adding: TestPC as a client (events: 0)
2011-08-30 11:01:01.275 TVRec(4): Changing from None to WatchingLiveTV
2011-08-30 11:01:01.311 TVRec(4): HW Tuner: 4->4
2011-08-30 11:01:01.373 LoadFromScheduler(): Error, called from backend.
2011-08-30 11:01:01.376 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 11:01:01.621 Finished recording Puna kuća Raftera 2, serija (5/22) (R) "(PACKED TO THE RAFTERS 2)": channel 1064
2011-08-30 11:01:01.681 SampleRate: Attempted to add a rate 44100 Hz, which is not in the list of allowed rates.
2011-08-30 11:01:01.703 New DB connection, total: 4
2011-08-30 11:01:01.765 Connected to database 'mythconverg' at host: 192.168.1.10
2011-08-30 11:01:01.770 LoadFromScheduler(): Error, called from backend.
2011-08-30 11:01:01.806 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 11:01:01.834 recording already exists...
2011-08-30 11:01:01.916 Finished recording Puna kuća Raftera 2, serija (5/22) (R) "(PACKED TO THE RAFTERS 2)": channel 1064
[mpeg4 @ 0x25a70a0] removing common factors from framerate
strange error flushing buffer ... 
2011-08-30 11:01:02.436 RecBase(4:/dev/TV_Kartica): GetKeyframePositions(0,9223372036854775807,#1) out of 1
2011-08-30 11:01:02.505 RecBase(4:/dev/TV_Kartica): GetKeyframePositions(0,9223372036854775807,#1) out of 1
2011-08-30 11:01:23.642 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 11:02:01.575 TVRec(4): HW Tuner: 4->4
2011-08-30 11:02:01.626 LoadFromScheduler(): Error, called from backend.
2011-08-30 11:02:01.631 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 11:02:01.681 Finished recording Puna kuća Raftera 2, serija (5/22) (R) "(PACKED TO THE RAFTERS 2)": channel 1064
2011-08-30 11:02:01.901 Finished recording Vrhunske konstrukcije 2: Super podmornice, dokumentarna serija (1/3) (R) "(ULTIMATE STRUCTURES)": channel 1063
2011-08-30 11:02:01.938 LoadFromScheduler(): Error, called from backend.
2011-08-30 11:02:01.943 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 11:02:01.971 recording already exists...
2011-08-30 11:02:02.056 Finished recording Vrhunske konstrukcije 2: Super podmornice, dokumentarna serija (1/3) (R) "(ULTIMATE STRUCTURES)": channel 1063
[mpeg4 @ 0x7f107c032ef0] removing common factors from framerate
2011-08-30 11:02:02.180 MainServer::ANN Monitor
2011-08-30 11:02:02.213 adding: TestPC as a client (events: 0)
2011-08-30 11:02:02.248 MainServer::ANN Monitor
2011-08-30 11:02:02.303 adding: TestPC as a client (events: 1)
Error in my_thread_global_end(): 1 threads didn't exit
2011-08-30 11:02:31.384 TVRec(4): Changing from WatchingLiveTV to None
2011-08-30 11:03:01.313 MainServer::ANN Playback
2011-08-30 11:03:01.395 adding: TestPC as a client (events: 0)
2011-08-30 11:03:01.442 TVRec(4): Changing from None to WatchingLiveTV
2011-08-30 11:03:01.477 TVRec(4): HW Tuner: 4->4
2011-08-30 11:03:01.540 LoadFromScheduler(): Error, called from backend.
2011-08-30 11:03:01.545 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 11:03:01.740 Finished recording Vrhunske konstrukcije 2: Super podmornice, dokumentarna serija (1/3) (R) "(ULTIMATE STRUCTURES)": channel 1063
2011-08-30 11:03:01.843 SampleRate: Attempted to add a rate 44100 Hz, which is not in the list of allowed rates.
2011-08-30 11:03:01.880 LoadFromScheduler(): Error, called from backend.
2011-08-30 11:03:01.885 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 11:03:01.911 recording already exists...
2011-08-30 11:03:01.992 Finished recording Vrhunske konstrukcije 2: Super podmornice, dokumentarna serija (1/3) (R) "(ULTIMATE STRUCTURES)": channel 1063
[mpeg4 @ 0x29c0c00] removing common factors from framerate
strange error flushing buffer ... 
2011-08-30 11:03:02.518 RecBase(4:/dev/TV_Kartica): GetKeyframePositions(0,9223372036854775807,#1) out of 1
2011-08-30 11:03:02.580 RecBase(4:/dev/TV_Kartica): GetKeyframePositions(0,9223372036854775807,#1) out of 1
2011-08-30 11:03:31.556 TVRec(4): Changing from WatchingLiveTV to None
2011-08-30 11:04:23.731 Expiring 0 MB for 1064 at 2011-08-30T11:01:01 => "Puna kuća Raftera 2, serija (5/22) (R)":"(PACKED TO THE RAFTERS 2)"
2011-08-30 11:04:24.166 Expiring 136 MB for 1064 at 2011-08-30T11:01:02 => "Puna kuća Raftera 2, serija (5/22) (R)":"(PACKED TO THE RAFTERS 2)"
2011-08-30 11:04:24.199 Expiring 0 MB for 1063 at 2011-08-30T11:02:01 => "Vrhunske konstrukcije 2: Super podmornice, dokumentarna serija (1/3) (R)":"(ULTIMATE STRUCTURES)"
2011-08-30 11:04:24.232 Expiring 41 MB for 1063 at 2011-08-30T11:02:02 => "Vrhunske konstrukcije 2: Super podmornice, dokumentarna serija (1/3) (R)":"(ULTIMATE STRUCTURES)"

comment:3 Changed 13 years ago by nasevz@…

Ok, I changed the sample rate to 48000 and the message does not appear in the log any more, but the problem still remains. Since I can't find where the actual error is and don't know if conecting to database is relevant, I am sending a complete log from starting mythbackend, watching live tv, changing channel, exit live tv, watching live tv again and exit mythfrontend.

2011-08-30 21:43:42.368 mythbackend version: fixes/0.24 [v0.24.1-78-g8b9e5ce] www.mythtv.org
2011-08-30 21:43:42.432 Using runtime prefix = /usr
2011-08-30 21:43:42.465 Using configuration directory = /home/test/.mythtv
2011-08-30 21:43:42.499 Empty LocalHostName.
2011-08-30 21:43:42.532 Using localhost value of TestPC
2011-08-30 21:43:42.566 Testing network connectivity to '192.168.1.10'
2011-08-30 21:43:42.717 New DB connection, total: 1
2011-08-30 21:43:42.750 Connected to database 'mythconverg' at host: 192.168.1.10
2011-08-30 21:43:42.781 Closing DB connection named 'DBManager0'
2011-08-30 21:43:42.811 Connected to database 'mythconverg' at host: 192.168.1.10
2011-08-30 21:43:42.846 Current locale EN_US
2011-08-30 21:43:42.877 Reading locale defaults from /usr/share/mythtv//locales/en_us.xml
2011-08-30 21:43:42.923 Current MythTV Schema Version (DBSchemaVer): 1264
2011-08-30 21:43:42.961 ThreadPool:HTTP: Initial 1, Max 25, Timeout 60000
2011-08-30 21:43:43.021 Enabling Upnpmedia rebuild thread.
2011-08-30 21:43:44.273 MythBackend: Starting up as the master server.
2011-08-30 21:43:44.326 New DB connection, total: 2
2011-08-30 21:43:44.365 Connected to database 'mythconverg' at host: 192.168.1.10
2011-08-30 21:43:44.433 New DB connection, total: 3
2011-08-30 21:43:44.476 Connected to database 'mythconverg' at host: 192.168.1.10
2011-08-30 21:43:44.651 New DB scheduler connection
2011-08-30 21:43:44.698 Connected to database 'mythconverg' at host: 192.168.1.10
2011-08-30 21:43:44.747 Main::Registering HttpStatus Extension
2011-08-30 21:43:44.775 Enabled verbose msgs:  important general
2011-08-30 21:43:44.816 AutoExpire: CalcParams(): Max required Free Space: 2.0 GB w/freq: 15 min
2011-08-30 21:43:47.751 Reschedule requested for id -1.
2011-08-30 21:43:47.884 Scheduled 0 items in 0.1 = 0.05 match + 0.09 place
2011-08-30 21:43:47.921 Seem to be woken up by USER
2011-08-30 21:43:51.704 MainServer::ANN Monitor
2011-08-30 21:43:51.760 adding: TestPC as a client (events: 0)
2011-08-30 21:43:51.794 MainServer::ANN Monitor
2011-08-30 21:43:51.838 adding: TestPC as a client (events: 1)
2011-08-30 21:43:53.067 UPnpMedia: BuildMediaMap - no VideoStartupDir set,  skipping scan.
2011-08-30 21:44:01.248 MainServer::ANN Playback
2011-08-30 21:44:01.280 adding: TestPC as a client (events: 0)
2011-08-30 21:44:01.327 TVRec(4): Changing from None to WatchingLiveTV
2011-08-30 21:44:01.374 TVRec(4): HW Tuner: 4->4
2011-08-30 21:44:01.439 LoadFromScheduler(): Error, called from backend.
2011-08-30 21:44:01.443 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 21:44:01.668 Finished recording PP: channel 1064
2011-08-30 21:44:01.732 LoadFromScheduler(): Error, called from backend.
2011-08-30 21:44:01.735 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 21:44:01.761 recording already exists...
2011-08-30 21:44:01.867 Finished recording PP: channel 1064
[mpeg4 @ 0x1ed2fc0] removing common factors from framerate
strange error flushing buffer ... 
2011-08-30 21:44:02.414 RecBase(4:/dev/TV_Kartica): GetKeyframePositions(0,9223372036854775807,#1) out of 1
2011-08-30 21:44:02.474 RecBase(4:/dev/TV_Kartica): GetKeyframePositions(0,9223372036854775807,#1) out of 1
2011-08-30 21:44:04.757 Expiring 0 MB for 1063 at 2011-08-30T21:42:31 => "Ciklus komedija: Popust na količinu, američki film (R)":"(CHEAPER BY THE DOZEN, 2003.)"
2011-08-30 21:44:04.801 Expiring 47 MB for 1063 at 2011-08-30T21:42:32 => "Ciklus komedija: Popust na količinu, američki film (R)":"(CHEAPER BY THE DOZEN, 2003.)"
2011-08-30 21:44:04.834 Expiring 20 MB for 1064 at 2011-08-30T21:43:02 => PP
2011-08-30 21:44:16.441 TVRec(4): HW Tuner: 4->4
2011-08-30 21:44:16.622 New DB connection, total: 4
2011-08-30 21:44:16.751 LoadFromScheduler(): Error, called from backend.
2011-08-30 21:44:16.752 Connected to database 'mythconverg' at host: 192.168.1.10
2011-08-30 21:44:16.826 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 21:44:16.842 Finished recording PP: channel 1064
2011-08-30 21:44:17.137 Finished recording Ciklus komedija: Popust na količinu, američki film (R) "(CHEAPER BY THE DOZEN, 2003.)": channel 1063
2011-08-30 21:44:17.188 New DB connection, total: 5
2011-08-30 21:44:17.219 LoadFromScheduler(): Error, called from backend.
2011-08-30 21:44:17.220 Connected to database 'mythconverg' at host: 192.168.1.10
2011-08-30 21:44:17.294 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 21:44:17.309 Finished recording Ciklus komedija: Popust na količinu, američki film (R) "(CHEAPER BY THE DOZEN, 2003.)": channel 1063
2011-08-30 21:44:17.336 MainServer::ANN Monitor
[mpeg4 @ 0x7f833c00b170] removing common factors from framerate
2011-08-30 21:44:17.398 adding: TestPC as a client (events: 0)
2011-08-30 21:44:17.488 MainServer::ANN Monitor
2011-08-30 21:44:17.520 adding: TestPC as a client (events: 1)
Error in my_thread_global_end(): 1 threads didn't exit
2011-08-30 21:44:46.601 TVRec(4): Changing from WatchingLiveTV to None
2011-08-30 21:45:01.313 MainServer::ANN Playback
2011-08-30 21:45:01.346 adding: TestPC as a client (events: 0)
2011-08-30 21:45:01.394 TVRec(4): Changing from None to WatchingLiveTV
2011-08-30 21:45:01.428 TVRec(4): HW Tuner: 4->4
2011-08-30 21:45:01.486 LoadFromScheduler(): Error, called from backend.
2011-08-30 21:45:01.491 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 21:45:01.677 Finished recording Ciklus komedija: Popust na količinu, američki film (R) "(CHEAPER BY THE DOZEN, 2003.)": channel 1063
2011-08-30 21:45:01.742 LoadFromScheduler(): Error, called from backend.
2011-08-30 21:45:01.745 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 21:45:01.773 recording already exists...
2011-08-30 21:45:01.856 Finished recording Ciklus komedija: Popust na količinu, američki film (R) "(CHEAPER BY THE DOZEN, 2003.)": channel 1063
[mpeg4 @ 0x1ff6ea0] removing common factors from framerate
strange error flushing buffer ... 
2011-08-30 21:45:02.307 RecBase(4:/dev/TV_Kartica): GetKeyframePositions(0,9223372036854775807,#1) out of 1
2011-08-30 21:45:02.378 RecBase(4:/dev/TV_Kartica): GetKeyframePositions(0,9223372036854775807,#1) out of 1
2011-08-30 21:45:04.875 AutoExpire: CalcParams(): Max required Free Space: 3.0 GB w/freq: 15 min
2011-08-30 21:45:16.917 TVRec(4): Changing from WatchingLiveTV to None

comment:4 Changed 12 years ago by robertm

Status: infoneeded_newnew

comment:5 Changed 12 years ago by nasevz@…

I did some additional testing, now in upgraded system to Oneiric. Problem with audio now occurs immediately when starting watch TV. I can enable audio if I change input source in system sound settings from Line in to Mic and back again to Line in but, it lasts until another channel change. Changing audio source cannot be repeated successfully after changing channel. If I start mythbackend as root in console, same problem occurs, but if I start it with command for verbose logging "sudo mythbackend -l Mythbackend.log -v record,playback", after initial changing sound source (Line in -> Mic -> line in), audio is OK. I am willing to do additional tests to help find the bug. I have no sound since OSS was disabled in kernel.

comment:6 Changed 12 years ago by sphery

nasevz, have you tried enabling the workaround for broken frame grabber cards:

Do not adjust volume
Enable this option for budget BT878 based DVB-T cards such as the AverTV DVB-T which require the audio volume to be left alone.

in mythtv-setup's (capture card?) configuration?

comment:7 Changed 12 years ago by sphery

Sorry for the double post, but also, according to your backend log, you have audio sample rate for the set to 44.1kHz in your recording profile. It almost definitely needs to be 48kHz.

comment:8 Changed 12 years ago by nasevz@…

I tried enabling "Do not adjust volume" but it did not solve the problem.
There is a cable which connects "audio out" from TV card and "audio in" of the sound card. To eliminate tuner as source of the problem, I inserted external audio source to "audio in" of the sound card and started live tv. The problem appeared again. When I changed recording source in system sound settings form "line in" to "mic" and back again to "line in", while live tv was playing, sound appeared, but only until next channel change. I will mention again that if mythbackend is started manually with following command, the problem with sound disappears.

sudo mythbackend -l Mythbackend.log -v record,playback

My guess is that this is some timing problem and little time that is spent for writing log file requested by the command, slows down mythbackend which solves it.
In my previous post I wrote that I changed sample rate to 48000, but the problem was not solved.

comment:9 Changed 12 years ago by nasevz@…

I finally have a clue what is happening but I don't know how to solve the problem. Input source for the sound card is set to line in, but when I start watching TV, mythfrontend changes it to mic, so there is no sound. This can only be seen with alsamixer, sound settings gui does not show change to mic. When I change from mic to line in in alsamixer, sound is OK. I don't know what is happening after changing to another channel. In alsamixer, I can't see any change, line in is still input source, but sound is lost. I can brig back sound if I exit watching TV, open it again and change from mic to line in again.

comment:10 Changed 12 years ago by danielk

Resolution: Won't Fix
Status: newclosed

Nasevz, I think you may be able to fix this by changing the audio input device. String starting in "ALSA:"

NTSC/PAL framegrabber input is on it's last legs so I'm going to mark this as a Won't fix.

Please update the ticket if you have more information though.

Note: See TracTickets for help on using tickets.