Re: Question on hda mixer structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The stac925x_mixer structure is only for controls that don't get created by stac92xx_build_controls{}.  The volume controls for inputs and outputs are auto-generated by this function.

The controls created by the mixer structure are exactly how they look.  The paramaters for HDA_CODEC_VOLUME and HDA_CODEC_MUTE are control name, Node, Connection index (from the Connection list - see /proc/asound/card0/codec#*), and the Amp direction (HDA_INPUT for in amps, HDA_OUTPUT for out amps.  You can see the effect by watching the Amp-in and Amp-out vals for a particular Node.  The Node Amp-[In|Out] Vals is muted if Vals & 0x80 == true.

The Input Source control is a different type of control, and it changes the current connection of the mux or adc for the codec.  For the Stac925x, this would be Node 0x0f, the proc output of which looks like this:
Node 0x0f [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0
  Amp-Out vals: [0x04 0x04]
  Connection: 5
     0x0b* 0x0c 0x0d 0x0a 0x11

Hope this helps.

Tobin

On Wed, 2007-03-07 at 08:34 -0800, Allyn, Mark A wrote:
Folks:
 
I am trying to figure out how the mixer control structurs are done for
each of the
codecs in the patch_sigmatel file for the Sigmatel codecs.

A sample of one is as follows:

====================
static struct snd_kcontrol_new stac925x_mixer[] = {
        HDA_CODEC_VOLUME("Master Playback Volume", 0xe, 0, HDA_OUTPUT),
        HDA_CODEC_MUTE("Master Playback Switch", 0xe, 0, HDA_OUTPUT),
        {
                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
                .name = "Input Source",
                .count = 1,
                .info = stac92xx_mux_enum_info,
                .get = stac92xx_mux_enum_get,
                .put = stac92xx_mux_enum_put,
        },
        HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT),
        HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_OUTPUT),
        HDA_CODEC_VOLUME("Capture Mux Volume", 0x0f, 0, HDA_OUTPUT),
        { } /* end */
};
====================

I am having a hard time seeing the connection between the widgets that
have a volume
control and the entries in the stac mixer structure above. Where are the
NID's for each
entry of this structure? 

Also, the value HAD_OUTPUT is used apparently for both a capture node as
well as an
output node. Where would HDA_INPUT be used?

Is there any documentation on just how this structure is composed for a
new device?

Thanks for your help.

Mark

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel
--
Tobin Davis <tdavis@xxxxxxxxxxxx>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux