Permalink
Browse files

azalia: do dolby initialization on the huawei matebook x

I have no idea what any of these CORB commands are doing, but this
is what the Realtek Dolby driver does on Windows.
  • Loading branch information...
jcs committed Nov 12, 2018
1 parent 1e52a7e commit 0d236b7a4e295a840eafd9da81e33ac5eb733520
Showing with 686 additions and 0 deletions.
  1. +3 −0 sys/dev/pci/azalia.c
  2. +3 −0 sys/dev/pci/azalia.h
  3. +680 −0 sys/dev/pci/azalia_codec.c
@@ -1539,6 +1539,9 @@ azalia_codec_init(codec_t *this)
return ENOMEM;
}

if (this->qrks & AZ_QRK_DOLBY)
azalia_codec_init_dolby(this);

/* query the base parameters */
azalia_comresp(this, this->audiofunc, CORB_GET_PARAMETER,
COP_STREAM_FORMATS, &result);
@@ -513,6 +513,7 @@
#define AZ_QRK_WID_TPDOCK1 0x00010000
#define AZ_QRK_WID_TPDOCK2 0x00020000
#define AZ_QRK_WID_TPDOCK3 0x00040000
#define AZ_QRK_DOLBY 0x00100000

/* memory-mapped types */
typedef struct {
@@ -730,3 +731,5 @@ int azalia_mixer_get(const codec_t *, nid_t, int, mixer_ctrl_t *);
int azalia_mixer_set(codec_t *, nid_t, int, const mixer_ctrl_t *);

int azalia_codec_enable_unsol(codec_t *);

int azalia_codec_init_dolby(codec_t *);
Oops, something went wrong.

0 comments on commit 0d236b7

Please sign in to comment.