#30 xstv doesn't respect the Line In volume on startup

closed
Sir Pingus
None
5
2006-06-14
2006-05-20
daniell
No

When the Line In volume is set to 0%, xdtv sets it to
68% at it's startup. Xdtv should not bother with the
volume at it's startup, but respect the volume level.

Discussion

  • Sir Pingus
    Sir Pingus
    2006-06-09

    Logged In: YES
    user_id=654886

    into the rc file modify this line:
    restoresnd = off
    to
    restoresnd = on

    Pingus

     
  • daniell
    daniell
    2006-06-12

    Logged In: YES
    user_id=781978

    This doesn't solve my problem.
    In fact this is another feature. With this setting, xdtv
    restores the previous volume level on program exit. So if I
    had 0% line volume before XdTV startup, then xdtv will set
    it to 0% again upon quitting from xdtv.
    But still, xdtv sets my line volume to a high value if the
    line volume is 0% on xdtv startup.
    I want XdTV to respect my volume level, and do not touch it
    on startup.

     
  • Sir Pingus
    Sir Pingus
    2006-06-13

    Logged In: YES
    user_id=654886

    ok I saw the bug.
    I will try to solve it

    Pingus

     
  • Sir Pingus
    Sir Pingus
    2006-06-13

    Logged In: YES
    user_id=654886

    With OSS (xdtv -noalsa) your problem come with this part of
    code (src/mixer-oss.c):

    if (volume[j] == 0)
    {
    if (j == MIXER_CHAN_CAPTURE)
    volume[j] = dix;
    else
    volume[j] = 0x4444;
    if (-1 == ioctl (mix, MIXER_WRITE (i),
    &volume[j]))
    {
    perror ("mixer write volume");
    return -1;
    }
    }

    with alsa (xdtv without any options) in src/mixer-alsa.c:
    if(volume[j] == 0) {
    volume[j] = (j == MIXER_CHAN_CAPTURE) ? 10 : 68;
    v = percent_to_alsa(volume[j], pmin, pmax);
    if(j == MIXER_CHAN_CAPTURE)
    snd_mixer_selem_set_capture_volume_all(elem[j], v);
    else
    snd_mixer_selem_set_playback_volume_all(elem[j], v);
    }

    I suggest you to look after thes two part of code to see
    what you really want to.

    regards.

    Pingus

     
  • Sir Pingus
    Sir Pingus
    2006-06-13

    Logged In: YES
    user_id=654886

    and option to unactivate these two parts of code? a solution
    for you?

    Pingus

     
  • Sir Pingus
    Sir Pingus
    2006-06-14

    Logged In: YES
    user_id=654886

    Here is a patch against the curent CVS.
    To use it:

    xdtv -respectnullsnd

    tell me if it's ok for you.

    Pingus

     
  • Sir Pingus
    Sir Pingus
    2006-06-14

    patch

     
    Attachments
  • daniell
    daniell
    2006-06-14

    Logged In: YES
    user_id=781978

    Great, the patch is working, thanks!

     
  • Sir Pingus
    Sir Pingus
    2006-06-14

    Logged In: YES
    user_id=654886

    Ok I commit it into the CVS

    Pingus

     
  • Sir Pingus
    Sir Pingus
    2006-06-14

    • assigned_to: nobody --> pingus77
    • status: open --> closed