Index: bin/ksh/lex.c =================================================================== RCS file: /home/cvs/src/bin/ksh/lex.c,v retrieving revision 1.78 diff -u -p -r1.78 lex.c --- bin/ksh/lex.c 15 Jan 2018 14:58:05 -0000 1.78 +++ bin/ksh/lex.c 23 Oct 2021 13:53:47 -0000 @@ -1157,6 +1157,10 @@ getsc_line(Source *s) s->line++; histsave(s->line, s->str, 1); } + /* Set xterm title */ + char *d = str_val(global("DISPLAY")); + if(d[0] > 0) + shellf("%c]0;$ %s%c", '\033', s->str, '\007'); } if (interactive) set_prompt(PS2); Index: bin/ksh/main.c =================================================================== RCS file: /home/cvs/src/bin/ksh/main.c,v retrieving revision 1.98 diff -u -p -r1.98 main.c --- bin/ksh/main.c 28 Jun 2019 13:34:59 -0000 1.98 +++ bin/ksh/main.c 23 Oct 2021 13:53:47 -0000 @@ -609,6 +609,11 @@ shell(Source *volatile s, volatile int t j_notify(); mcheck(); set_prompt(PS1); + /* Reset xterm title */ + char *d = str_val(global("DISPLAY")); + if(d[0] > 0) + shellf("%c]0;$ ksh (%s)%c", '\033', + str_val(global("PWD")), '\007'); } t = compile(s); Index: sys/dev/pci/azalia.c =================================================================== RCS file: /home/cvs/src/sys/dev/pci/azalia.c,v retrieving revision 1.266 diff -u -p -r1.266 azalia.c --- sys/dev/pci/azalia.c 30 Oct 2021 03:24:59 -0000 1.266 +++ sys/dev/pci/azalia.c 9 Nov 2021 21:37:03 -0000 @@ -279,6 +279,9 @@ int azalia_suspend(azalia_t *); int azalia_resume(azalia_t *); int azalia_resume_codec(codec_t *); +/* sysctl */ +int audio_hdmi_enable = 0; + /* variables */ struct cfattach azalia_ca = { sizeof(azalia_t), azalia_pci_match, azalia_pci_attach, @@ -954,9 +957,10 @@ azalia_init_codecs(azalia_t *az) c = -1; for (i = 0; i < az->ncodecs; i++) { codec = &az->codecs[i]; - if ((codec->audiofunc < 0) || - (codec->codec_type == AZ_CODEC_TYPE_HDMI)) - continue; + if(audio_hdmi_enable) + if ((codec->audiofunc < 0) || + (codec->codec_type == AZ_CODEC_TYPE_HDMI)) + continue; if (codec->codec_type == AZ_CODEC_TYPE_DIGITAL) { if (c < 0) c = i; Index: sys/kern/init_sysent.c =================================================================== RCS file: /home/cvs/src/sys/kern/init_sysent.c,v retrieving revision 1.230 diff -u -p -r1.230 init_sysent.c --- sys/kern/init_sysent.c 27 Oct 2021 03:25:11 -0000 1.230 +++ sys/kern/init_sysent.c 9 Nov 2021 22:05:42 -0000 @@ -1,4 +1,4 @@ -/* $OpenBSD: init_sysent.c,v 1.230 2021/10/27 03:25:11 visa Exp $ */ +/* $OpenBSD$ */ /* * System call switch table. Index: sys/kern/kern_sysctl.c =================================================================== RCS file: /home/cvs/src/sys/kern/kern_sysctl.c,v retrieving revision 1.396 diff -u -p -r1.396 kern_sysctl.c --- sys/kern/kern_sysctl.c 30 Oct 2021 23:24:48 -0000 1.396 +++ sys/kern/kern_sysctl.c 10 Nov 2021 18:57:10 -0000 @@ -126,6 +126,7 @@ extern fixpt_t ccpu; extern long numvnodes; extern int allowdt; extern int audio_record_enable; +extern int audio_hdmi_enable; extern int video_record_enable; int allowkmem; @@ -2427,13 +2428,17 @@ int sysctl_audio(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, size_t newlen) { + int error = 0; if (namelen != 1) return (ENOTDIR); - if (name[0] != KERN_AUDIO_RECORD) - return (ENOENT); + if (name[0] == KERN_AUDIO_RECORD) + error = sysctl_int(oldp, oldlenp, newp, newlen, &audio_record_enable); - return (sysctl_int(oldp, oldlenp, newp, newlen, &audio_record_enable)); + if (name[0] == KERN_AUDIO_HDMI) + error = sysctl_int(oldp, oldlenp, newp, newlen, &audio_hdmi_enable); + + return (error); } #endif Index: sys/kern/syscalls.c =================================================================== RCS file: /home/cvs/src/sys/kern/syscalls.c,v retrieving revision 1.229 diff -u -p -r1.229 syscalls.c --- sys/kern/syscalls.c 27 Oct 2021 03:25:11 -0000 1.229 +++ sys/kern/syscalls.c 9 Nov 2021 22:05:42 -0000 @@ -1,4 +1,4 @@ -/* $OpenBSD: syscalls.c,v 1.229 2021/10/27 03:25:11 visa Exp $ */ +/* $OpenBSD$ */ /* * System call names. Index: sys/sys/syscall.h =================================================================== RCS file: /home/cvs/src/sys/sys/syscall.h,v retrieving revision 1.228 diff -u -p -r1.228 syscall.h --- sys/sys/syscall.h 27 Oct 2021 03:25:11 -0000 1.228 +++ sys/sys/syscall.h 9 Nov 2021 22:05:42 -0000 @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.228 2021/10/27 03:25:11 visa Exp $ */ +/* $OpenBSD$ */ /* * System call numbers. Index: sys/sys/syscallargs.h =================================================================== RCS file: /home/cvs/src/sys/sys/syscallargs.h,v retrieving revision 1.231 diff -u -p -r1.231 syscallargs.h --- sys/sys/syscallargs.h 27 Oct 2021 03:25:11 -0000 1.231 +++ sys/sys/syscallargs.h 9 Nov 2021 22:05:42 -0000 @@ -1,4 +1,4 @@ -/* $OpenBSD: syscallargs.h,v 1.231 2021/10/27 03:25:11 visa Exp $ */ +/* $OpenBSD$ */ /* * System call argument lists. Index: sys/sys/sysctl.h =================================================================== RCS file: /home/cvs/src/sys/sys/sysctl.h,v retrieving revision 1.219 diff -u -p -r1.219 sysctl.h --- sys/sys/sysctl.h 30 Oct 2021 23:24:48 -0000 1.219 +++ sys/sys/sysctl.h 7 Nov 2021 18:52:34 -0000 @@ -317,11 +317,13 @@ struct ctlname { * KERN_AUDIO */ #define KERN_AUDIO_RECORD 1 -#define KERN_AUDIO_MAXID 2 +#define KERN_AUDIO_HDMI 2 +#define KERN_AUDIO_MAXID 3 #define CTL_KERN_AUDIO_NAMES { \ { 0, 0 }, \ { "record", CTLTYPE_INT }, \ + { "hdmi", CTLTYPE_INT }, \ } /*