<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/sound/pci/hda/hda_generic.c, branch v3.18.42</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.18.42</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.18.42'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2016-04-12T16:10:48+00:00</updated>
<entry>
<title>ALSA: hda - Implement loopback control switch for Realtek and other codecs</title>
<updated>2016-04-12T16:10:48+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2015-12-08T16:00:42+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=dfa8b700663c32bc45e25a9f5d93830a46c92956'/>
<id>urn:sha1:dfa8b700663c32bc45e25a9f5d93830a46c92956</id>
<content type='text'>
[ Upstream commit e7fdd52779a6c2b49d457f452296a77c8cffef6a ]

Many codecs, typically found on Realtek codecs, have the analog
loopback path merged to the secondary input of the middle of the
output paths.  Currently, we don't offer the dynamic switching in such
configuration but let each loopback path mute by itself.

This should work well in theory, but in reality, we often see that
such a dead loopback path causes some background noises even if all
the elements get muted.  Such a problem has been fixed by adding the
quirk accordingly to disable aamix, and it's the right fix, per se.
The only problem is that it's not so trivial to achieve it; user needs
to pass a hint string via patch module option or sysfs.

This patch gives a bit improvement on the situation: it adds "Loopback
Mixing" control element for such codecs like other codecs (e.g. IDT or
VIA codecs) with the individual loopback paths.  User can turn on/off
the loopback path simply via a mixer app.

For keeping the compatibility, the loopback is still enabled on these
codecs.  But user can try to turn it off if experiencing a suspicious
background or click noise on the fly, then build a static fixup later
once after the problem is addressed.

Other than the addition of the loopback enable/disablement control,
there should be no changes.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>ALSA: hda - Treat stereo-to-mono mix properly</title>
<updated>2015-03-28T13:50:33+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2015-03-16T09:18:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=79eb59a64b923ca914cefe05ad149957514c8c89'/>
<id>urn:sha1:79eb59a64b923ca914cefe05ad149957514c8c89</id>
<content type='text'>
[ Upstream commit cc261738add93947d138d2fabad9f4dbed4e5c00 ]

The commit [ef403edb7558: ALSA: hda - Don't access stereo amps for
mono channel widgets] fixed the handling of mono widgets in general,
but it still misses an exceptional case: namely, a mono mixer widget
taking a single stereo input.  In this case, it has stereo volumes
although it's a mono widget, and thus we have to take care of both
left and right input channels, as stated in HD-audio spec ("7.1.3
Widget Interconnection Rules").

This patch covers this missing piece by adding proper checks of stereo
amps in both the generic parser and the proc output codes.

Reported-by: Raymond Yau &lt;superquad.vortex2@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>ALSA: hda - Don't access stereo amps for mono channel widgets</title>
<updated>2015-03-28T13:50:03+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2015-03-12T07:30:11+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e2b501a93a936b2b6b03f6237a161ce2ee1c26ff'/>
<id>urn:sha1:e2b501a93a936b2b6b03f6237a161ce2ee1c26ff</id>
<content type='text'>
[ Upstream commit ef403edb75580a3ec5d155f5de82155f0419c621 ]

The current HDA generic parser initializes / modifies the amp values
always in stereo, but this seems causing the problem on ALC3229 codec
that has a few mono channel widgets: namely, these mono widgets react
to actions for both channels equally.

In the driver code, we do care the mono channel and create a control
only for the left channel (as defined in HD-audio spec) for such a
node.  When the control is updated, only the left channel value is
changed.  However, in the resume, the right channel value is also
restored from the initial value we took as stereo, and this overwrites
the left channel value.  This ends up being the silent output as the
right channel has been never touched and remains muted.

This patch covers the places where unconditional stereo amp accesses
are done and converts to the conditional accesses.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94581
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>ALSA: hda - Move the function "check_amp_caps" to hda_codec.c</title>
<updated>2014-09-23T13:57:28+00:00</updated>
<author>
<name>David Henningsson</name>
<email>david.henningsson@canonical.com</email>
</author>
<published>2014-09-23T08:38:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=861a04ed15a48e9af7b591cd8ae3bc46aece1733'/>
<id>urn:sha1:861a04ed15a48e9af7b591cd8ae3bc46aece1733</id>
<content type='text'>
The next patch will use it, so make it visible across modules.

Signed-off-by: David Henningsson &lt;david.henningsson@canonical.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda - Allow multiple callbacks for jack</title>
<updated>2014-09-16T15:23:44+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2014-09-11T13:22:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1a4f69d5aaecb39a980fc20b14ec800fd5b53061'/>
<id>urn:sha1:1a4f69d5aaecb39a980fc20b14ec800fd5b53061</id>
<content type='text'>
So far, hda_jack infrastructure allows only one callback per jack, and
this makes things slightly complicated when a driver wants to assign
multiple tasks to a jack, e.g. the standard auto-mute with a power
up/down sequence.  This can be simplified if the hda_jack accepts
multiple callbacks.

This patch is such an extension: the callback-specific part (the
function and private_data) is split to another struct from
hda_jack_tbl, and multiple such objects can be assigned to a single
hda_jack_tbl entry.

The new struct hda_jack_callback is passed to each callback function
now, thus the patch became bigger than expected.  But these changes
are mostly trivial.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda - Get rid of action field from struct hda_jack_tbl</title>
<updated>2014-09-11T12:14:21+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2014-09-11T12:06:53+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=62f949bf6bf6ceb44872c44ef3913a96d93fb5d4'/>
<id>urn:sha1:62f949bf6bf6ceb44872c44ef3913a96d93fb5d4</id>
<content type='text'>
The action value assigned to each hda_jack_tbl entry is mostly
superfluous.  The actually used values are either the widget NID or a
value specific to the callback.

The former case can be simply replaced by a reference to widget NID
itself.  The only place doing the latter is STAC/IDT codec driver for
the powermap handling.  But, the code doesn't need to check the action
field at all -- the function jack_update_power() is called either with
a specific pin or with NULL.  So the check of jack-&gt;action can be
removed completely there, too.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda - Add TLV_DB_SCALE_MUTE bit for relevant controls</title>
<updated>2014-09-03T14:39:29+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2014-09-01T08:07:04+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d89c6c0c91af0344b52dd21ca48dd29821fee677'/>
<id>urn:sha1:d89c6c0c91af0344b52dd21ca48dd29821fee677</id>
<content type='text'>
The DACs on Sigmatel/IDT codecs do mute at the lowest volume level,
and in the earlier drivers, we passed TLV_DB_SCALE_MUTE bit for each
volume control element like Speaker and Headphone as well as Master.
Along with the translation to the generic parser, however, the TLV bit
was lost for the slave controls (e.g. Speaker) but set only to
Master.  In theory this should have sufficed, but apps, particularly
PA, do care the slave volume bits, so we seem to see a regression in
the volume controls.

This patch adds a flag to hda_gen_spec to specify the DAC mute
feature, and adds the TLV bit properly for all relevant volume
controls.  Also, the TLV bit for vmaster is set in hda_generic.c, so
that we can get rid of all tricks from the codec driver side.

As the similar hack is applied to Conexant 5051 stuff, we can get rid
of it as well.

BugLink: https://bugs.launchpad.net/bugs/1357928
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda - Fix and neaten print_nid_path/debug_badness</title>
<updated>2014-07-07T07:34:16+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-07-05T20:02:02+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d82353e534847732c4665a21e2ea699713a0e5b0'/>
<id>urn:sha1:d82353e534847732c4665a21e2ea699713a0e5b0</id>
<content type='text'>
print_nid_path has a possible buffer overflow if
struct nid_path.path values are &gt; 256.

Avoid this and neaten the output to remove the leading ':'

Neaten debug_badness to always verify arguments.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda - Kill the rest of snd_print*() usages</title>
<updated>2014-06-25T12:51:23+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2014-06-06T16:12:16+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=6194b99de9f52b9953b7cf2b48ce0da9276af9c3'/>
<id>urn:sha1:6194b99de9f52b9953b7cf2b48ce0da9276af9c3</id>
<content type='text'>
Pass the codec object so that we can replace all the rest of
snd_print*() usages with the proper device-specific print helpers.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda - if statement not indented</title>
<updated>2014-05-14T14:47:27+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-05-14T14:18:31+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d576422eda7fc999bf7c9862fa0a75bf0323417f'/>
<id>urn:sha1:d576422eda7fc999bf7c9862fa0a75bf0323417f</id>
<content type='text'>
The "break;" should be indented.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
