diff --git a/repos/dde_bsd/patches/azalia_codec_c.patch b/repos/dde_bsd/patches/azalia_codec_c.patch new file mode 100644 index 0000000000..06b26f6677 --- /dev/null +++ b/repos/dde_bsd/patches/azalia_codec_c.patch @@ -0,0 +1,42 @@ +--- a/dev/pci/azalia_codec.c ++++ b/dev/pci/azalia_codec.c +@@ -83,6 +83,13 @@ + this->name = "Realtek ALC221"; + this->qrks |= AZ_QRK_WID_CDIN_1C | AZ_QRK_WID_BEEP_1D; + break; ++ case 0x10ec0255: ++ this->name = "Realtek ALC255"; ++ DPRINTF(("Realtek ALC255 0x%8x\n", this->subid)); ++ if (this->subid == 0x193e10cf) { /* FUJITSU S938 */ ++ this->qrks |= AZ_QRK_WID_HEADSET; ++ } ++ break; + case 0x10ec0260: + this->name = "Realtek ALC260"; + if (this->subid == 0x008f1025) +@@ -656,6 +663,10 @@ + CORB_GET_PIN_SENSE, 0, &result); + if (!err && (result & CORB_PS_PRESENCE)) + vol = 1; ++ ++ // switch microphone to mic2 ++ if (!err) ++ notify_hp_sense(result & CORB_PS_PRESENCE); + } + if (err) + break; +@@ -2590,6 +2601,14 @@ + w->enable = 1; + } + ++ if (this->qrks & AZ_QRK_WID_HEADSET && ++ nid == 0x19) { ++ /* Fujitsu S398 headphone jack */ ++ w->d.pin.config = 0x03a19120; ++ azalia_pin_config_ov(w, CORB_CD_DEVICE_MASK, CORB_CD_MICIN); ++ w->enable = 1; ++ } ++ + if (this->qrks & AZ_QRK_WID_CDIN_1C && + nid == 0x1c && w->enable == 0 && w->d.pin.device == CORB_CD_CD) { + azalia_pin_config_ov(w, CORB_CD_PORT_MASK, CORB_CD_FIXED); diff --git a/repos/dde_bsd/patches/azalia_h.patch b/repos/dde_bsd/patches/azalia_h.patch new file mode 100644 index 0000000000..7cfe946401 --- /dev/null +++ b/repos/dde_bsd/patches/azalia_h.patch @@ -0,0 +1,10 @@ +--- a/dev/pci/azalia.h ++++ b/dev/pci/azalia.h +@@ -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_WID_HEADSET 0x00080000 + #define AZ_QRK_WID_DOLBY_ATMOS 0x00100000 + #define AZ_QRK_WID_SPKR2_DAC 0x00200000 + diff --git a/repos/dde_bsd/ports/dde_bsd.hash b/repos/dde_bsd/ports/dde_bsd.hash index 9f302da730..8c4bb8711f 100644 --- a/repos/dde_bsd/ports/dde_bsd.hash +++ b/repos/dde_bsd/ports/dde_bsd.hash @@ -1 +1 @@ -210145e50db8518aeb9d1cbdf1da82f6a9255113 +69017fe73e1e01988dd2a9d1dbf36dd2dac6c335 diff --git a/repos/dde_bsd/ports/dde_bsd.port b/repos/dde_bsd/ports/dde_bsd.port index 6139fcc28b..c9ef2e4274 100644 --- a/repos/dde_bsd/ports/dde_bsd.port +++ b/repos/dde_bsd/ports/dde_bsd.port @@ -22,6 +22,8 @@ PATCHES := $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/*.patch)) AUDIO_OPT := -p1 -d$(SRC_DIR_AUDIO) PATCH_OPT(patches/oppress_warning.patch) := $(AUDIO_OPT) PATCH_OPT(patches/azalia_c.patch) := $(AUDIO_OPT) +PATCH_OPT(patches/azalia_h.patch) := $(AUDIO_OPT) +PATCH_OPT(patches/azalia_codec_c.patch) := $(AUDIO_OPT) PATCH_OPT(patches/notify.patch) := $(AUDIO_OPT) # vi: set ft=make :