Bug 173840 - snd_hda(4) volume mixer not working anymore
Summary: snd_hda(4) volume mixer not working anymore
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 9.1-PRERELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-multimedia mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2012-11-22 18:00 UTC by David Demelier
Modified: 2018-05-23 10:27 UTC (History)
0 users

See Also:


Attachments
file.txt (63.37 KB, text/plain)
2012-11-22 18:00 UTC, David Demelier
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Demelier 2012-11-22 18:00:00 UTC
Until 9.1-RELEASE the "vol" mixer setting was working. I was able to adjust the volume using mixer like

mixer vol 50
mixer vol 90
..

Now this parameter has no effect, only 0 mute the sound for the 1-100 interval the sound is as the highest level.

Attached the dmesg

Fix: Patch attached with submission follows:
Comment 1 Alexander Motin freebsd_committer 2012-11-23 00:52:50 UTC
Hi.

I can't qualify it is as a driver bug. At most it is behavior change. 
There are two signal paths from the DACs to the pins in this CODEC: 
direct and via the mixer. And there is no volume control on the direct 
path. In your specific case it is possible to route signal via the mixer 
and control it there. But present driver is unable to make reasonable 
selection in such cases. Probably previously driver version did the 
right thing by accident.

Patch below should probably help in your case, but it is not universal 
enough to commit it.

--- hdaa_patches.c      (revision 243182)
+++ hdaa_patches.c      (working copy)
@@ -442,6 +442,14 @@ hdaa_patch(struct hdaa_devinfo *devinfo)
                 if (w != NULL)
                         w->connsenable[3] = 0;
                 break;
+       case HDA_CODEC_AD1984A:
+               w = hdaa_widget_get(devinfo, 7);
+               if (w != NULL)
+                       w->connsenable[0] = 0;
+               w = hdaa_widget_get(devinfo, 11);
+               if (w != NULL)
+                       w->connsenable[0] = 0;
+               break;
         case HDA_CODEC_AD1986A:
                 /*
                  * This CODEC has overcomplicated input mixing.


-- 
Alexander Motin
Comment 2 David Demelier 2012-11-23 09:22:52 UTC
Thanks for your answer, I'll try this patch tonight and tell you if it
works. However will you be able to fix it as universal way ?

I've just have another question, when I boot and the hda probes devices I
hear a big "tick" / "click" in the speakers (this was also happening on 9.0
and before) but I never found a solution.. It also happens if I mute the
sound, setting the volume to 0 and then to 80 will generate these noise.

Cheers, and thanks for your answer :-)


2012/11/23 Alexander Motin <mav@freebsd.org>

> Hi.
>
> I can't qualify it is as a driver bug. At most it is behavior change.
> There are two signal paths from the DACs to the pins in this CODEC: direct
> and via the mixer. And there is no volume control on the direct path. In
> your specific case it is possible to route signal via the mixer and control
> it there. But present driver is unable to make reasonable selection in such
> cases. Probably previously driver version did the right thing by accident.
>
> Patch below should probably help in your case, but it is not universal
> enough to commit it.
>
> --- hdaa_patches.c      (revision 243182)
> +++ hdaa_patches.c      (working copy)
> @@ -442,6 +442,14 @@ hdaa_patch(struct hdaa_devinfo *devinfo)
>                 if (w != NULL)
>                         w->connsenable[3] = 0;
>                 break;
> +       case HDA_CODEC_AD1984A:
> +               w = hdaa_widget_get(devinfo, 7);
> +               if (w != NULL)
> +                       w->connsenable[0] = 0;
> +               w = hdaa_widget_get(devinfo, 11);
> +               if (w != NULL)
> +                       w->connsenable[0] = 0;
> +               break;
>         case HDA_CODEC_AD1986A:
>                 /*
>                  * This CODEC has overcomplicated input mixing.
>
>
> --
> Alexander Motin
>



-- 
Demelier David
Comment 3 David Demelier 2012-11-24 14:49:00 UTC
On 23/11/2012 01:52, Alexander Motin wrote:
> Hi.
>
> I can't qualify it is as a driver bug. At most it is behavior change.
> There are two signal paths from the DACs to the pins in this CODEC:
> direct and via the mixer. And there is no volume control on the direct
> path. In your specific case it is possible to route signal via the mixer
> and control it there. But present driver is unable to make reasonable
> selection in such cases. Probably previously driver version did the
> right thing by accident.
>
> Patch below should probably help in your case, but it is not universal
> enough to commit it.
>
> --- hdaa_patches.c      (revision 243182)
> +++ hdaa_patches.c      (working copy)
> @@ -442,6 +442,14 @@ hdaa_patch(struct hdaa_devinfo *devinfo)
>                  if (w != NULL)
>                          w->connsenable[3] = 0;
>                  break;
> +       case HDA_CODEC_AD1984A:
> +               w = hdaa_widget_get(devinfo, 7);
> +               if (w != NULL)
> +                       w->connsenable[0] = 0;
> +               w = hdaa_widget_get(devinfo, 11);
> +               if (w != NULL)
> +                       w->connsenable[0] = 0;
> +               break;
>          case HDA_CODEC_AD1986A:
>                  /*
>                   * This CODEC has overcomplicated input mixing.
>
>

Thanks, you patch just works fine, I hope you will find a universal 
patch though.

Cheers, and thank you :-)


-- 
David Demelier
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2018-05-23 10:27:36 UTC
batch change of PRs untouched in 2018 marked "in progress" back to open.