[mythtv-users] V4L2 Volume Problem, MythTV 0.29 / Mythbuntu 16.04 / PVR-350 (ivtv)
stephen_agent at jsw.gen.nz
Sun Oct 11 04:23:10 UTC 2020
On Sat, 10 Oct 2020 16:27:20 -0400, you wrote:
>I'm replying basically with the same exact problem as this thread:
>I have recently upgraded from Mythbuntu 14.04 to Mythbuntu 16.04 (yes, lazy; takes awhile to get everything right, and I had to replace my video card after I did), and from Mythbuntu 0.27 (I think) to 0.28. I've started to have the same problem that the other poster reported a few months with his PVR-500 (wasn't a member of the list so couldn't reply to that). When I start up my system, by default, the volume on the PVR-350 is too low:
>ryanov at media:/usr/local/bin$ v4l2-ctl --get-ctrl=volume -d /dev/video0
>Where I seem to want it/where it matches old recordings more or less is volume=63535. I've configured this volume in both /etc/udev.rules.d, which worked, but MythTV resets it somehow, and even in my LIRC channel change script. The problem is that some part of entering "Watch TV" mode on MythTV resets the volume to the above, lower value. I've confirmed that on boot, but before entering "Watch TV," the volume setting is correct. Like I said, I also added it to my channel change script. That works if I enter "Watch TV" and change the channel, but not on the initial channel (and I have to assume, not for recordings either, though I haven't recorded anything since I added it to the change channel script).
>It seems like I've narrowed it down to where it is happening. Does anyone have any suggestions about what to do? As the previous poster reported, that particular volume is no longer configurable in mythtv-setup. There are no config options there really anymore. It's not really possible to deal with this problem outside of v4l2, because if I leave that volume alone and raise the system volume, there is some sort of hissing artifact which isn't noticeable until you try to raise the system volume very high on a soft recording. It's also not ideal as I have a lot of old recordings at the "correct" volume.
>Understood if the answer is "upgrade," but I don't see anything currently that indicates that updating will change anything about this.
>Thanks in advance for any pointers!
The channel change script is run before the recording starts. When I
had a similar problem with my PVR-500 cards, I found that I had to run
my script after the recording was started. That way, mythbackend has
done all its setup and you can change the v4l2 settings without having
mythbackend change them back again. So you need to run your v4l2-ctl
commands in a script run from the EventCmdRecStarted event. You will
get a few seconds at the start of the recording where the settings are
wrong, before your script has been run, but after that it should work
for the rest of the recording.
mythfrontend > Setup > System Event Handlers > Recording started
More information about the mythtv-users