|
[ tvtime-Bugs-845595 ] Problem changing volume: msg#00091video.tvtime.devel
Bugs item #845595, was opened at 2003-11-20 01:22 Message generated for change (Comment added) made by vektor You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=506987&aid=845595&group_id=64301 Category: OSD/Interface >Group: Fixed in CVS for next release Status: Open >Resolution: Fixed >Priority: 7 Submitted By: George Wu (georgewu) Assigned to: Billy Biggs (vektor) Summary: Problem changing volume Initial Comment: I am trying to run tvtime 0.9.10 on Linux 2.4.16 and everything seems to work fine except I can not change the volume using the "+" or "-" keys. I can run xawtv just fine so I have confidence in the basic sound and TV card driver setup being correct. The "tvtime -v" output is attached below. ----------------------------------------------------------- tvtime: Running tvtime 0.9.10. tvtime: Can't get realtime priority for better performance, need root access. rtctimer: Cannot open /dev/rtc: Permission denied rtctimer: Cannot open /dev/misc/rtc: No such file or directory *** /dev/rtc support is needed for smooth video. We STRONGLY recommend *** that you load the 'rtc' kernel module before starting tvtime, *** and make sure that your user has access to the device file. *** See our support page at http://tvtime.net/ for more information config: Reading configuration from /usr/local/etc/tvtime/tvtime.xml config: Reading configuration from /home/eileen/.tvtime/tvtime.xml cpuinfo: CPU AMD Athlon(tm) XP 1800+, family 6, model 6, stepping 2. cpuinfo: CPU measured at 1537.418MHz. tvtime: Can't renice to -19. tvtime: Sending frames to interlaced output devices. xcommon: Display :0.0, vendor The XFree86 Project, Inc, XFree86 4.2.1 xfullscreen: Single-head detected, pixel aspect will be calculated. xfullscreen: Pixel aspect ratio on the primary head is: 1.00. xfullscreen: Using the XFree86-VidModeExtension to calculate fullscreen size. xfullscreen: Fullscreen to 0,0 with size 1152x864. xcommon: Have XTest, will use it to ping the screensaver. xcommon: Sample aspect ratio 292/293. xcommon: No window properties found for EWMH. xcommon: Window manager is not EWMH compliant. xcommon: Sample aspect ratio 292/293. xcommon: Displaying in a 765x575 window inside 765x576 space. xvoutput: Using XVIDEO adaptor 56: Matrox G-Series Backend Scaler. speedycode: Using MMXEXT optimized functions. station: Reading stationlist from /home/eileen/.tvtime/stationlist.xml station: # Band Channel Freq Active Name station: 1 US Cable 1 73250 false 1 station: 2 US Cable 2 55250 false 2 station: 3 US Cable 3 61250 false 3 station: 4 US Cable 4 67250 false 4 station: 5 US Cable 5 77250 true 5 station: 6 US Cable 6 83250 true 6 station: 7 US Cable 7 175250 true 7 station: 8 US Cable 8 181250 true 8 station: 9 US Cable 9 187250 true 9 station: 10 US Cable 10 193250 true 10 station: 11 US Cable 11 199250 true 11 station: 12 US Cable 12 205250 true 12 station: 13 US Cable 13 211250 true 13 station: 14 US Cable 14 121250 true 14 station: 15 US Cable 15 127250 true 15 station: 16 US Cable 16 133250 false 16 station: 17 US Cable 17 139250 true 17 station: 18 US Cable 18 145250 true 18 station: 19 US Cable 19 151250 true 19 station: 20 US Cable 20 157250 true 20 station: 21 US Cable 21 163250 true 21 station: 22 US Cable 22 169250 true 22 station: 23 US Cable 23 217250 true 23 station: 24 US Cable 24 223250 true 24 station: 25 US Cable 25 229250 true 25 station: 26 US Cable 26 235250 true 26 station: 27 US Cable 27 241250 true 27 station: 28 US Cable 28 247250 true 28 station: 29 US Cable 29 253250 true 29 station: 30 US Cable 30 259250 false 30 station: 31 US Cable 31 265250 true 31 station: 32 US Cable 32 271250 true 32 station: 33 US Cable 33 277250 true 33 station: 34 US Cable 34 283250 true 34 station: 35 US Cable 35 289250 true 35 station: 36 US Cable 36 295250 true 36 station: 37 US Cable 37 301250 true 37 station: 38 US Cable 38 307250 true 38 station: 39 US Cable 39 313250 true 39 station: 40 US Cable 40 319250 true 40 station: 41 US Cable 41 325250 true 41 station: 42 US Cable 42 331250 true 42 station: 43 US Cable 43 337250 true 43 station: 44 US Cable 44 343250 false 44 station: 45 US Cable 45 349250 true 45 station: 46 US Cable 46 355250 true 46 station: 47 US Cable 47 361250 true 47 station: 48 US Cable 48 367250 false 48 station: 49 US Cable 49 373250 true 49 station: 50 US Cable 50 379250 true 50 station: 51 US Cable 51 385250 true 51 station: 52 US Cable 52 391250 true 52 station: 53 US Cable 53 397250 true 53 station: 54 US Cable 54 403250 true 54 station: 55 US Cable 55 409250 true 55 station: 56 US Cable 56 415250 false 56 station: 57 US Cable 57 421250 true 57 station: 58 US Cable 58 427250 true 58 station: 59 US Cable 59 433250 true 59 station: 60 US Cable 60 439250 true 60 station: 61 US Cable 61 445250 true 61 station: 62 US Cable 62 451250 true 62 station: 63 US Cable 63 457250 true 63 station: 64 US Cable 64 463250 true 64 station: 65 US Cable 65 469250 true 65 station: 66 US Cable 66 475250 true 66 station: 67 US Cable 67 481250 true 67 station: 68 US Cable 68 487250 true 68 station: 69 US Cable 69 493250 true 69 station: 70 US Cable 70 499250 true 70 station: 71 US Cable 71 505250 true 71 station: 72 US Cable 72 511250 true 72 station: 73 US Cable 73 517250 true 73 station: 74 US Cable 74 523250 true 74 station: 75 US Cable 75 529250 true 75 station: 76 US Cable 76 535250 false 76 station: 77 US Cable 77 541250 true 77 station: 78 US Cable 78 547250 true 78 station: 79 US Cable 79 553250 false 79 station: 80 US Cable 80 559250 false 80 station: 81 US Cable 81 565250 true 81 station: 82 US Cable 82 571250 true 82 station: 83 US Cable 83 577250 false 83 station: 84 US Cable 84 583250 false 84 station: 85 US Cable 85 589250 false 85 station: 86 US Cable 86 595250 false 86 station: 87 US Cable 87 601250 false 87 station: 88 US Cable 88 607250 false 88 station: 89 US Cable 89 613250 false 89 station: 90 US Cable 90 619250 false 90 station: 91 US Cable 91 625250 false 91 station: 92 US Cable 92 631250 false 92 station: 93 US Cable 93 637250 false 93 station: 94 US Cable 94 643250 false 94 station: 95 US Cable 95 91250 false 95 station: 96 US Cable 96 97250 false 96 station: 97 US Cable 97 103250 false 97 station: 98 US Cable 98 109250 false 98 station: 99 US Cable 99 115250 false 99 videoinput: Using video4linux driver 'BT878(AVerMedia TVCapture 98)'. videoinput: Card type is eb, audio 4. videoinput: tuner.tuner = 0 videoinput: tuner.name = Television videoinput: tuner.rangelow = 0 videoinput: tuner.rangehigh = -1 videoinput: tuner.signal = 0 videoinput: tuner.flags = PAL NTSC SECAM videoinput: tuner.mode = NTSC videoinput: Audio supports Mutable videoinput: Brightness 32768, hue 32768, colour 32768, contrast 32768 videoinput: Whiteness 0, depth 16, palette 7. videoinput: Window set to (0,0/720x480), chromakey 0, flags 1, clips 0. videoinput: tuner.tuner = 0 videoinput: tuner.name = Television videoinput: tuner.rangelow = 0 videoinput: tuner.rangehigh = -1 videoinput: tuner.signal = 0 videoinput: tuner.flags = PAL NTSC SECAM videoinput: tuner.mode = NTSC tvtime: V4L sampling 720 pixels per scanline. vbiscreen: In blank. vbiscreen: In blank. xcommon: Received a map, marking window as visible (48). tvtime: Cleaning up. tvtime: Thank you for using tvtime. ---------------------------------------------------------------------- >Comment By: Billy Biggs (vektor) Date: 2004-06-28 00:23 Message: Logged In: YES user_id=153320 As stupid as this fix is, I have fixed it in tvtime for 0.9.13 by always keeping the mixer device open. ---------------------------------------------------------------------- Comment By: Billy Biggs (vektor) Date: 2004-01-17 19:33 Message: Logged In: YES user_id=153320 Just so I remember, the conversations with ALSA developers found this to be because we open and close the device between read/writes. ALSA only 'remembers' what fake OSS volume it is using along with the open fd. We should keep the file descriptor open all the time while tvtime is using it. I think this is silly, but I'll probably change it for 0.9.13. ---------------------------------------------------------------------- Comment By: Billy Biggs (vektor) Date: 2003-11-24 15:09 Message: Logged In: YES user_id=153320 So when you're at 61 and you change to 62, you still stay at 61. But when you change from 61 to 64, you go to 65? This really looks like an ALSA bug. We should contact an ALSA developer. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2003-11-23 19:00 Message: Logged In: NO Perhaps the other ALSA emu-10k1 users were using earlier versions of tvtime ? Per your request, I've added fprintf()'s then attempted to hit the + key a few times followed by the - key a few times with. I ran with the volume speed of +/-1 and +/-3 for comparison. WITH +/-1 volume change speed: mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x3d(61) mixer_set_volume(): percentdiff=0x01(1), levelpercentage=0x3e(62), device=/dev/m ixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x3d(61) mixer_set_volume(): percentdiff=0x01(1), levelpercentage=0x3e(62), device=/dev/m ixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x3d(61) mixer_set_volume(): percentdiff=0x01(1), levelpercentage=0x3e(62), device=/dev/m ixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x3d(61) mixer_set_volume(): percentdiff=0x01(1), levelpercentage=0x3e(62), device=/dev/m ixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x3d(61) mixer_set_volume(): percentdiff=0xffffffff(-1), levelpercentage=0x3c(60), device =/dev/mixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x3d(61) mixer_set_volume(): percentdiff=0xffffffff(-1), levelpercentage=0x3c(60), device =/dev/mixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x3d(61) mixer_set_volume(): percentdiff=0xffffffff(-1), levelpercentage=0x3c(60), device =/dev/mixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x3d(61) mixer_set_volume(): percentdiff=0xffffffff(-1), levelpercentage=0x3c(60), device =/dev/mixer, channel=6 mixer_set_volume(): END======================================== WITH +/-3 volume change speed: mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x3d(61) mixer_set_volume(): percentdiff=0x03(3), levelpercentage=0x40(64), device=/dev/m ixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x41(65) mixer_set_volume(): percentdiff=0x03(3), levelpercentage=0x44(68), device=/dev/m ixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x44(68) mixer_set_volume(): percentdiff=0x03(3), levelpercentage=0x47(71), device=/dev/m ixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x47(71) mixer_set_volume(): percentdiff=0x03(3), levelpercentage=0x4a(74), device=/dev/m ixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x4a(74) mixer_set_volume(): percentdiff=0x03(3), levelpercentage=0x4d(77), device=/dev/m ixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x4d(77) mixer_set_volume(): percentdiff=0xfffffffd(-3), levelpercentage=0x4a(74), device =/dev/mixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x4a(74) mixer_set_volume(): percentdiff=0xfffffffd(-3), levelpercentage=0x47(71), device =/dev/mixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x47(71) mixer_set_volume(): percentdiff=0xfffffffd(-3), levelpercentage=0x44(68), device =/dev/mixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x44(68) mixer_set_volume(): percentdiff=0xfffffffd(-3), levelpercentage=0x41(65), device =/dev/mixer, channel=6 mixer_set_volume(): END======================================== mixer_set_volume(): START======================================== mixer_get_volume(): curvol=0x41(65) mixer_set_volume(): percentdiff=0xfffffffd(-3), levelpercentage=0x3e(62), device =/dev/mixer, channel=6 mixer_set_volume(): END======================================== It seems pretty clear that with volume change speed set to +/-1 the actual volume is not changed. I took a quick look at 0.9.12 but didn't see examples for setting bindings with command args. Can you give me an example on how to set MIXER_UP with speed arg ? In the meantime I am now enjoying tvtime 0.9.10 with the +/-3 patch. Thanks for a nice tv app. ---------------------------------------------------------------------- Comment By: Billy Biggs (vektor) Date: 2003-11-22 21:35 Message: Logged In: YES user_id=153320 Yes, 0.9.12 is available now, but this makes even less sense since I have had users of the alsa emu-10k1 driver before and they have not complained of this problem.... Can you maybe do some fprintfs and see if the volume is being changed when you use 1% increments? ---------------------------------------------------------------------- Comment By: George Wu (georgewu) Date: 2003-11-22 21:33 Message: Logged In: YES user_id=107822 I am using the ALSA emu-10k1 sound card driver. I am not familiar with the Linux sound APIs so I don't know if the problem is a bug in the sound driver. I do agree the patch will not work if the sound driver has even lower resolution. However, I find it a little curious why xawtv chose to use 3. In any case, if tvtime 0.9.12 supports configurable MIXER_UP and MIXER_DOWN speed then it should be a reasonable way to work around this problem without any patch ? Is 0.9.12 available now ? ---------------------------------------------------------------------- Comment By: Billy Biggs (vektor) Date: 2003-11-22 21:16 Message: Logged In: YES user_id=153320 If that's the case, then it could also be fixed by having tvtime internally store its own volume. We used to do that but people complained, since they would change their volume using aumix, then go back to tvtime and change again, and have it fly back to where tvtime thought it was. It really sounds like a driver bug in your audio driver if it doesn't internally expose the full range 0-100. What audio driver do you use? I don't like the +/- 3% patch since if your assumption is true that would mean it would break again if there was a cardiwth even fewer levels. ---------------------------------------------------------------------- Comment By: George Wu (georgewu) Date: 2003-11-22 21:12 Message: Logged In: YES user_id=107822 Hmm ... here is my not fully tested suspicion: The audio hardware volume level resolution is lower than 100 (i.e. the implicit assumption in tvtime) so when volume change is specified in the 0 to 100 range there is automatic conversion to actual hardware resolution such that a 1% volume difference is effectively rounded/truncated off in the conversion. So, for example, if the hardware only actually supports 30 levels then a request to change volume from 50 to 51 (on a 100-level scale) has no effect because the hardware actually sees a volume change request to change volume from 15 (=int(50*30/100)) to 15 (=int(51*30/100)) (on a 30-level scale). And because tvtime reads back the new volume level from hardware after changing volume the new volume appears unchanged at 50 (=int(15*100/30)) even though the requested new volume is 51. ---------------------------------------------------------------------- Comment By: Billy Biggs (vektor) Date: 2003-11-22 20:43 Message: Logged In: YES user_id=153320 This does not make sense. Is the problem just that changing volume with +/- is too slow? Your patch just makes it faster to change volume. In tvtime 0.9.12 you can configure the speed in your config file just by passing an argument to the MIXER_UP or MIXER_DOWN commands. ---------------------------------------------------------------------- Comment By: George Wu (georgewu) Date: 2003-11-22 20:41 Message: Logged In: YES user_id=107822 After some tracing and comparing the source code for tvtime and xawtv I noticed that xawtv always changed volume by 3% instead of 1% I changed tvtime to do the same and it fixed the problem. Here is the patch for the change: *** commands.c.dist Sat Nov 22 16:12:50 2003 --- commands.c Sat Nov 22 16:13:34 2003 *************** *** 2657,2663 **** if( cmd->vidin && videoinput_get_muted( cmd->vidin ) ) { commands_handle( cmd, TVTIME_TOGGLE_MUTE, 0 ); } ! volume = mixer_set_volume( ( (tvtime_cmd == TVTIME_MIXER_UP) ? 1 : -1 ) ); if( cmd->osd ) { tvtime_osd_show_data_bar( cmd->osd, "Volume", volume & 0xff ); --- 2657,2663 ---- if( cmd->vidin && videoinput_get_muted( cmd->vidin ) ) { commands_handle( cmd, TVTIME_TOGGLE_MUTE, 0 ); } ! volume = mixer_set_volume( ( (tvtime_cmd == TVTIME_MIXER_UP) ? 3 : -3 ) ); if( cmd->osd ) { tvtime_osd_show_data_bar( cmd->osd, "Volume", volume & 0xff ); ---------------------------------------------------------------------- Comment By: Billy Biggs (vektor) Date: 2003-11-22 12:12 Message: Logged In: YES user_id=153320 Sorry it took me so long to get back to you on this. The +/- keys by default control the 'line in' of /dev/mixer. If you need to use a different device, see tvtime --help, there is a command line switch to use a different mixer input. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=506987&aid=845595&group_id=64301 ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ tvtime-Bugs-980704 ] i do as you say (usbvision): 00091, SourceForge.net |
|---|---|
| Next by Date: | [ tvtime-Bugs-817833 ] too quiet tvtime...: 00091, SourceForge.net |
| Previous by Thread: | [ tvtime-Bugs-980704 ] i do as you say (usbvision)i: 00091, SourceForge.net |
| Next by Thread: | [ tvtime-Bugs-817833 ] too quiet tvtime...: 00091, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |