summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-08-14 14:07:34 +0000
committermav <mav@FreeBSD.org>2012-08-14 14:07:34 +0000
commit8eab28ac2fb3af91a7a0b82f1470294637b9719f (patch)
treeec90a1f203641eae9251c5606f6517d2fa20e6a4
parent225422a69df24d3940c3eab9a98a2a2e7c10482c (diff)
downloadFreeBSD-src-8eab28ac2fb3af91a7a0b82f1470294637b9719f.zip
FreeBSD-src-8eab28ac2fb3af91a7a0b82f1470294637b9719f.tar.gz
Fix multichannel input signals tracing on some CODECs like ALC260.
Reported and tested by: Slawa Olhovchenkov <slw@zxy.spb.ru> MFC after: 1 month
-rw-r--r--sys/dev/sound/pci/hda/hdaa.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c
index 169adc6..a452369 100644
--- a/sys/dev/sound/pci/hda/hdaa.c
+++ b/sys/dev/sound/pci/hda/hdaa.c
@@ -3068,8 +3068,7 @@ hdaa_audio_trace_adc(struct hdaa_devinfo *devinfo, int as, int seq, nid_t nid,
if ((only == 0 || only == w->nid) && (w->nid >= min) &&
(onlylength == 0 || onlylength == depth)) {
m = w->nid;
- if (length != NULL)
- *length = depth;
+ *length = depth;
}
break;
case HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX:
@@ -3092,12 +3091,12 @@ hdaa_audio_trace_adc(struct hdaa_devinfo *devinfo, int as, int seq, nid_t nid,
j, mixed, min, only, depth + 1,
length, onlylength)) != 0) {
if (m == 0 || ret < m ||
- (ret == m && length != NULL &&
- *length < lm)) {
+ (ret == m && *length < lm)) {
m = ret;
im = i;
lm = *length;
- }
+ } else
+ *length = lm;
if (only)
break;
}
OpenPOWER on IntegriCloud