mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-01 08:27:59 +00:00
- Add Analog Devices AD1984 codec id.
- Enable pcbeep control for Acer + ALC268 (nid 29). Give enough (fake) hints so the parser will grab it and allocate "speaker" control. - Fix regression while preparing DAC and ADC for multichannel format. Since playback policy is to output to every possible path, ensure that each DAC is started. Reported / Tested by: Guy Brand
This commit is contained in:
parent
169575e183
commit
1cb55600a0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174025
@ -81,7 +81,7 @@
|
||||
|
||||
#include "mixer_if.h"
|
||||
|
||||
#define HDA_DRV_TEST_REV "20071122_0049"
|
||||
#define HDA_DRV_TEST_REV "20071129_0050"
|
||||
#define HDA_WIDGET_PARSER_REV 1
|
||||
|
||||
SND_DECLARE_FILE("$FreeBSD$");
|
||||
@ -527,6 +527,7 @@ static const struct {
|
||||
#define ANALOGDEVICES_VENDORID 0x11d4
|
||||
#define HDA_CODEC_AD1981HD HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1981)
|
||||
#define HDA_CODEC_AD1983 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1983)
|
||||
#define HDA_CODEC_AD1984 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1984)
|
||||
#define HDA_CODEC_AD1986A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1986)
|
||||
#define HDA_CODEC_AD1988 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1988)
|
||||
#define HDA_CODEC_AD1988B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x198b)
|
||||
@ -596,6 +597,7 @@ static const struct {
|
||||
{ HDA_CODEC_ALC888, "Realtek ALC888" },
|
||||
{ HDA_CODEC_AD1981HD, "Analog Devices AD1981HD" },
|
||||
{ HDA_CODEC_AD1983, "Analog Devices AD1983" },
|
||||
{ HDA_CODEC_AD1984, "Analog Devices AD1984" },
|
||||
{ HDA_CODEC_AD1986A, "Analog Devices AD1986A" },
|
||||
{ HDA_CODEC_AD1988, "Analog Devices AD1988" },
|
||||
{ HDA_CODEC_AD1988B, "Analog Devices AD1988B" },
|
||||
@ -3153,9 +3155,15 @@ hdac_stream_setup(struct hdac_chan *ch)
|
||||
);
|
||||
hdac_command(sc,
|
||||
HDA_CMD_SET_CONV_FMT(cad, ch->io[i], fmt), cad);
|
||||
hdac_command(sc,
|
||||
HDA_CMD_SET_CONV_STREAM_CHAN(cad, ch->io[i],
|
||||
(chn < totalchn) ? ((ch->sid << 4) | chn) : 0), cad);
|
||||
if (ch->dir == PCMDIR_REC)
|
||||
hdac_command(sc,
|
||||
HDA_CMD_SET_CONV_STREAM_CHAN(cad, ch->io[i],
|
||||
(chn < totalchn) ? ((ch->sid << 4) | chn) : 0),
|
||||
cad);
|
||||
else
|
||||
hdac_command(sc,
|
||||
HDA_CMD_SET_CONV_STREAM_CHAN(cad, ch->io[i],
|
||||
ch->sid << 4), cad);
|
||||
chn +=
|
||||
HDA_PARAM_AUDIO_WIDGET_CAP_STEREO(w->param.widget_cap) ?
|
||||
2 : 1;
|
||||
@ -4294,6 +4302,22 @@ hdac_vendor_patch_parse(struct hdac_devinfo *devinfo)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HDA_CODEC_ALC268:
|
||||
if (HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subvendor)) {
|
||||
w = hdac_widget_get(devinfo, 29);
|
||||
if (w != NULL) {
|
||||
w->enable = 1;
|
||||
w->type =
|
||||
HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET;
|
||||
w->param.widget_cap &=
|
||||
~HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_MASK;
|
||||
w->param.widget_cap |=
|
||||
HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET <<
|
||||
HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT;
|
||||
strlcpy(w->name, "beep widget", sizeof(w->name));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HDA_CODEC_ALC861:
|
||||
ctl = hdac_audio_ctl_amp_get(devinfo, 21, 2, 1);
|
||||
if (ctl != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user