From nobody Tue Jan 30 11:08:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TPMpx5F1Cz58dKM; Tue, 30 Jan 2024 11:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TPMpx4Y9vz4HPY; Tue, 30 Jan 2024 11:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706612905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DpVg/coAhi5qs8LlNIObiO+K3I0sQrK3Ku5yDzpSKFw=; b=kCtl1JEoSlGZFmQhBDTabPPPpI5hAaLMjkH9TSSVsDCs/aQ1f9XXnlukfDyaFuZwDY4gLA n9H0MnnPmW55Agt0XoS77Qu1LhBkmIKWjqRx8jn+vhUGXBb2LE3wik2NgPTs0w01zNmJBT lLIxZLKVxSC/CB5A9cWMDGJW3NNiNgUaKQF++19vKT9HC+j2h46n+Y1kY8QjvcSIC/C1qR xMO5sq4i2OGiqDJmFEMab0XDbskte/JGOmNdNcO2cQl1bVz7ArPvnv3gkTT3k5dBB0R62J 2Etgg3QnwbGhQvaeHRr56Qcy6dbrdqXajkJ3U0jjTL1wyf26f6qTZaBTLWM1yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706612905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DpVg/coAhi5qs8LlNIObiO+K3I0sQrK3Ku5yDzpSKFw=; b=S3twRsITa4fJRCxqrTqN7DUJw0FyJPnKNQHrupa4Ty+EEJfULIvg9uFb4RFASaBZqHidp+ 273nYVncy41Of8L1fAiOPl3GW4CzgLI5FSiaMxZ5Kgi6KTusL8MsEjnj9cHyKEXB5UR09t stSQpXVQjMkMHW7f0lQuW0LAF5abTuUrHCGcQy1+JTLc6+KDh1rDWmmCxK9vm6wgbP7L3U eAqh69srjgEeMuk96LHTj09Xr3ECVUGDpbQttpk/qzfqXXb1XGrFB+tYRWSnqlZdKWNew1 5XV2l4Jggd9q90Ewp15bPR5gsQvpER43AqblTMl4KL/8hznpEJjkOT3fqU/KxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706612905; a=rsa-sha256; cv=none; b=VaxR6RwoMdoXyDl4ufYwhxKOc+ERXIG9blLGpRKVlfhMK4AIjlAA7lMewlsvXdq+Dhy6rN c1CgdZ+xnGfaas07wEw0cPt26KE1M10oKKL7ORUBgbzatKqi7mSpIoU1eK2TE1+KL1e7O7 XCVo3PqjYYHh4Iw8n5CroKj8k6U5DhWBkSM4hGlxArd3Ja5yJHRojMEOMZbElN+0iFWDAS FVqn/8QtgVTLovbVYMmeM5yK4SwrxCtm4FhS9sjUfK5SWpmkHWQxANZYwBJMSWbJqmYwZY 27nZiwmQAiidkqtXyAvwQUrumNsyjP3HOtkvsUYnRuyFH6USi7YRxCRbMmn1Mw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TPMpx2YkNzYRj; Tue, 30 Jan 2024 11:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40UB8PqV075890; Tue, 30 Jan 2024 11:08:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40UB8P7B075887; Tue, 30 Jan 2024 11:08:25 GMT (envelope-from git) Date: Tue, 30 Jan 2024 11:08:25 GMT Message-Id: <202401301108.40UB8P7B075887@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 9b40b4faa7bd - stable/14 - sound: remove PCM_KLDSTRING() and fix status strings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9b40b4faa7bd79a4e840e5ed38c0915bf2c82fbb Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9b40b4faa7bd79a4e840e5ed38c0915bf2c82fbb commit 9b40b4faa7bd79a4e840e5ed38c0915bf2c82fbb Author: Christos Margiolis AuthorDate: 2024-01-16 16:48:14 +0000 Commit: Christos Margiolis CommitDate: 2024-01-30 11:07:28 +0000 sound: remove PCM_KLDSTRING() and fix status strings PCM_KLDSTRING() prints the kernel module associated with a given audio device only when that module is not compiled in. Get rid of PCM_KLDSTRING() altogether and print the driver name (even for modules that are compiled in) instead, as it implies the module as well. While here, convert all status strings to the following dmesg-like format: [ ] on Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj, imp Differential Revision: https://reviews.freebsd.org/D43349 (cherry picked from commit 837cd192ebf2d0d4f5ded8883403ef11e6fa6438) --- sys/dev/sound/pci/als4000.c | 5 +++-- sys/dev/sound/pci/atiixp.c | 4 ++-- sys/dev/sound/pci/cmi.c | 5 +++-- sys/dev/sound/pci/cs4281.c | 7 ++++--- sys/dev/sound/pci/csapcm.c | 5 +++-- sys/dev/sound/pci/emu10k1.c | 4 ++-- sys/dev/sound/pci/emu10kx-pcm.c | 3 ++- sys/dev/sound/pci/envy24.c | 5 +++-- sys/dev/sound/pci/envy24ht.c | 5 +++-- sys/dev/sound/pci/es137x.c | 6 +++--- sys/dev/sound/pci/fm801.c | 7 ++++--- sys/dev/sound/pci/hda/hdaa.c | 5 ++--- sys/dev/sound/pci/hdspe-pcm.c | 4 ++-- sys/dev/sound/pci/ich.c | 5 +++-- sys/dev/sound/pci/maestro3.c | 6 +++--- sys/dev/sound/pci/neomagic.c | 5 +++-- sys/dev/sound/pci/solo.c | 5 +++-- sys/dev/sound/pci/t4dwave.c | 5 +++-- sys/dev/sound/pci/via8233.c | 4 ++-- sys/dev/sound/pci/via82c686.c | 4 ++-- sys/dev/sound/pci/vibes.c | 5 +++-- sys/dev/sound/pcm/sound.h | 6 ------ sys/dev/sound/usb/uaudio.c | 5 ++--- 23 files changed, 60 insertions(+), 55 deletions(-) diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c index 5b7247517c13..b1376d2b6e5a 100644 --- a/sys/dev/sound/pci/als4000.c +++ b/sys/dev/sound/pci/als4000.c @@ -847,8 +847,9 @@ als_pci_attach(device_t dev) pcm_addchan(dev, PCMDIR_PLAY, &alspchan_class, sc); pcm_addchan(dev, PCMDIR_REC, &alsrchan_class, sc); - snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s", - rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_als4000)); + snprintf(status, SND_STATUSLEN, "port 0x%jx irq %jd on %s", + rman_get_start(sc->reg), rman_get_start(sc->irq), + device_get_nameunit(device_get_parent(dev))); pcm_setstatus(dev, status); return 0; diff --git a/sys/dev/sound/pci/atiixp.c b/sys/dev/sound/pci/atiixp.c index 78be9475acd3..dcbf041f9605 100644 --- a/sys/dev/sound/pci/atiixp.c +++ b/sys/dev/sound/pci/atiixp.c @@ -1097,9 +1097,9 @@ atiixp_chip_post_init(void *arg) "polling", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc->dev, sizeof(sc->dev), sysctl_atiixp_polling, "I", "Enable polling mode"); - snprintf(status, SND_STATUSLEN, "at memory 0x%jx irq %jd %s", + snprintf(status, SND_STATUSLEN, "mem 0x%jx irq %jd on %s", rman_get_start(sc->reg), rman_get_start(sc->irq), - PCM_KLDSTRING(snd_atiixp)); + device_get_nameunit(device_get_parent(sc->dev))); pcm_setstatus(sc->dev, status); diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c index 4fd6ac4c0a75..9a92066c51a4 100644 --- a/sys/dev/sound/pci/cmi.c +++ b/sys/dev/sound/pci/cmi.c @@ -990,8 +990,9 @@ cmi_attach(device_t dev) pcm_addchan(dev, PCMDIR_PLAY, &cmichan_class, sc); pcm_addchan(dev, PCMDIR_REC, &cmichan_class, sc); - snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s", - rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_cmi)); + snprintf(status, SND_STATUSLEN, "port 0x%jx irq %jd on %s", + rman_get_start(sc->reg), rman_get_start(sc->irq), + device_get_nameunit(device_get_parent(dev))); pcm_setstatus(dev, status); DEB(printf("cmi_attach: succeeded\n")); diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c index 25beb3f7fd0d..972b83efff8f 100644 --- a/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -845,9 +845,10 @@ cs4281_pci_attach(device_t dev) pcm_addchan(dev, PCMDIR_PLAY, &cs4281chan_class, sc); pcm_addchan(dev, PCMDIR_REC, &cs4281chan_class, sc); - snprintf(status, SND_STATUSLEN, "at %s 0x%jx irq %jd %s", - (sc->regtype == SYS_RES_IOPORT)? "io" : "memory", - rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_cs4281)); + snprintf(status, SND_STATUSLEN, "%s 0x%jx irq %jd on %s", + (sc->regtype == SYS_RES_IOPORT)? "port" : "mem", + rman_get_start(sc->reg), rman_get_start(sc->irq), + device_get_nameunit(device_get_parent(dev))); pcm_setstatus(dev, status); return 0; diff --git a/sys/dev/sound/pci/csapcm.c b/sys/dev/sound/pci/csapcm.c index 8715072ec0e5..71b9a0253cdb 100644 --- a/sys/dev/sound/pci/csapcm.c +++ b/sys/dev/sound/pci/csapcm.c @@ -819,8 +819,9 @@ pcmcsa_attach(device_t dev) return (ENXIO); } - snprintf(status, SND_STATUSLEN, "at irq %jd %s", - rman_get_start(resp->irq),PCM_KLDSTRING(snd_csa)); + snprintf(status, SND_STATUSLEN, "irq %jd on %s", + rman_get_start(resp->irq), + device_get_nameunit(device_get_parent(dev))); /* Enable interrupt. */ if (snd_setup_intr(dev, resp->irq, 0, csa_intr, csa, &csa->ih)) { diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c index 92937c2d0c42..0813f89c87b8 100644 --- a/sys/dev/sound/pci/emu10k1.c +++ b/sys/dev/sound/pci/emu10k1.c @@ -2126,9 +2126,9 @@ emu_pci_attach(device_t dev) goto bad; } - snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s", + snprintf(status, SND_STATUSLEN, "port 0x%jx irq %jd on %s", rman_get_start(sc->reg), rman_get_start(sc->irq), - PCM_KLDSTRING(snd_emu10k1)); + device_get_nameunit(device_get_parent(dev))); if (pcm_register(dev, sc, sc->nchans, gotmic ? 3 : 2)) goto bad; for (i = 0; i < sc->nchans; i++) diff --git a/sys/dev/sound/pci/emu10kx-pcm.c b/sys/dev/sound/pci/emu10kx-pcm.c index 661d65165190..b4633efdddc7 100644 --- a/sys/dev/sound/pci/emu10kx-pcm.c +++ b/sys/dev/sound/pci/emu10kx-pcm.c @@ -1477,7 +1477,8 @@ emu_pcm_attach(device_t dev) if (route == RT_MCHRECORD) pcm_addchan(dev, PCMDIR_REC, &emufxrchan_class, sc); - snprintf(status, SND_STATUSLEN, "on %s", device_get_nameunit(device_get_parent(dev))); + snprintf(status, SND_STATUSLEN, "on %s", + device_get_nameunit(device_get_parent(dev))); pcm_setstatus(dev, status); return (0); diff --git a/sys/dev/sound/pci/envy24.c b/sys/dev/sound/pci/envy24.c index 24b5abc0eeb9..f7cc7ff5724d 100644 --- a/sys/dev/sound/pci/envy24.c +++ b/sys/dev/sound/pci/envy24.c @@ -2590,7 +2590,7 @@ envy24_pci_attach(device_t dev) /* set status iformation */ snprintf(status, SND_STATUSLEN, - "at io 0x%jx:%jd,0x%jx:%jd,0x%jx:%jd,0x%jx:%jd irq %jd", + "port 0x%jx:%jd,0x%jx:%jd,0x%jx:%jd,0x%jx:%jd irq %jd on %s", rman_get_start(sc->cs), rman_get_end(sc->cs) - rman_get_start(sc->cs) + 1, rman_get_start(sc->ddma), @@ -2599,7 +2599,8 @@ envy24_pci_attach(device_t dev) rman_get_end(sc->ds) - rman_get_start(sc->ds) + 1, rman_get_start(sc->mt), rman_get_end(sc->mt) - rman_get_start(sc->mt) + 1, - rman_get_start(sc->irq)); + rman_get_start(sc->irq), + device_get_nameunit(device_get_parent(dev))); pcm_setstatus(dev, status); return 0; diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c index 6a3ef5afcf59..65c67b84ce53 100644 --- a/sys/dev/sound/pci/envy24ht.c +++ b/sys/dev/sound/pci/envy24ht.c @@ -2496,12 +2496,13 @@ envy24ht_pci_attach(device_t dev) /* set status iformation */ snprintf(status, SND_STATUSLEN, - "at io 0x%jx:%jd,0x%jx:%jd irq %jd", + "port 0x%jx:%jd,0x%jx:%jd irq %jd on %s", rman_get_start(sc->cs), rman_get_end(sc->cs) - rman_get_start(sc->cs) + 1, rman_get_start(sc->mt), rman_get_end(sc->mt) - rman_get_start(sc->mt) + 1, - rman_get_start(sc->irq)); + rman_get_start(sc->irq), + device_get_nameunit(device_get_parent(dev))); pcm_setstatus(dev, status); return 0; diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index 8c1c2b34e1cf..8f832d899dd3 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -1856,10 +1856,10 @@ es_pci_attach(device_t dev) goto bad; } - snprintf(status, SND_STATUSLEN, "at %s 0x%jx irq %jd %s", - (es->regtype == SYS_RES_IOPORT)? "io" : "memory", + snprintf(status, SND_STATUSLEN, "%s 0x%jx irq %jd on %s", + (es->regtype == SYS_RES_IOPORT)? "port" : "mem", rman_get_start(es->reg), rman_get_start(es->irq), - PCM_KLDSTRING(snd_es137x)); + device_get_nameunit(device_get_parent(dev))); if (pcm_register(dev, es, numplay, 1)) goto bad; diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c index d7aa731175bb..fbde14f37afe 100644 --- a/sys/dev/sound/pci/fm801.c +++ b/sys/dev/sound/pci/fm801.c @@ -636,9 +636,10 @@ fm801_pci_attach(device_t dev) goto oops; } - snprintf(status, 64, "at %s 0x%jx irq %jd %s", - (fm801->regtype == SYS_RES_IOPORT)? "io" : "memory", - rman_get_start(fm801->reg), rman_get_start(fm801->irq),PCM_KLDSTRING(snd_fm801)); + snprintf(status, SND_STATUSLEN, "%s 0x%jx irq %jd on %s", + (fm801->regtype == SYS_RES_IOPORT)? "port" : "mem", + rman_get_start(fm801->reg), rman_get_start(fm801->irq), + device_get_nameunit(device_get_parent(dev))); #define FM801_MAXPLAYCH 1 if (pcm_register(dev, fm801, FM801_MAXPLAYCH, 1)) goto oops; diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 1831ae0c1f19..e64eac6114e4 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -7114,9 +7114,8 @@ hdaa_pcm_attach(device_t dev) hdaa_unlock(devinfo); } - snprintf(status, SND_STATUSLEN, "on %s %s", - device_get_nameunit(device_get_parent(dev)), - PCM_KLDSTRING(snd_hda)); + snprintf(status, SND_STATUSLEN, "on %s", + device_get_nameunit(device_get_parent(dev))); pcm_setstatus(dev, status); return (0); diff --git a/sys/dev/sound/pci/hdspe-pcm.c b/sys/dev/sound/pci/hdspe-pcm.c index d9d40c9877ad..0360e84fbe91 100644 --- a/sys/dev/sound/pci/hdspe-pcm.c +++ b/sys/dev/sound/pci/hdspe-pcm.c @@ -1043,10 +1043,10 @@ hdspe_pcm_attach(device_t dev) scp->chnum++; } - snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s", + snprintf(status, SND_STATUSLEN, "port 0x%jx irq %jd on %s", rman_get_start(scp->sc->cs), rman_get_start(scp->sc->irq), - PCM_KLDSTRING(snd_hdspe)); + device_get_nameunit(device_get_parent(dev))); pcm_setstatus(dev, status); mixer_init(dev, &hdspemixer_class, scp); diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c index 70a9440d9b23..fbde0accfd28 100644 --- a/sys/dev/sound/pci/ich.c +++ b/sys/dev/sound/pci/ich.c @@ -686,9 +686,10 @@ ich_setstatus(struct sc_info *sc) char status[SND_STATUSLEN]; snprintf(status, SND_STATUSLEN, - "at io 0x%jx, 0x%jx irq %jd bufsz %u %s", + "port 0x%jx,0x%jx irq %jd on %s", rman_get_start(sc->nambar), rman_get_start(sc->nabmbar), - rman_get_start(sc->irq), sc->bufsz,PCM_KLDSTRING(snd_ich)); + rman_get_start(sc->irq), + device_get_nameunit(device_get_parent(sc->dev))); if (bootverbose && (sc->flags & ICH_DMA_NOCACHE)) device_printf(sc->dev, diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c index 9ba83fe4de11..6dd54a66f683 100644 --- a/sys/dev/sound/pci/maestro3.c +++ b/sys/dev/sound/pci/maestro3.c @@ -1439,10 +1439,10 @@ m3_pci_attach(device_t dev) goto bad; } } - snprintf(status, SND_STATUSLEN, "at %s 0x%jx irq %jd %s", - (sc->regtype == SYS_RES_IOPORT)? "io" : "memory", + snprintf(status, SND_STATUSLEN, "%s 0x%jx irq %jd on %s", + (sc->regtype == SYS_RES_IOPORT)? "port" : "mem", rman_get_start(sc->reg), rman_get_start(sc->irq), - PCM_KLDSTRING(snd_maestro3)); + device_get_nameunit(device_get_parent(dev))); if (pcm_setstatus(dev, status)) { device_printf(dev, "attach: pcm_setstatus error\n"); goto bad; diff --git a/sys/dev/sound/pci/neomagic.c b/sys/dev/sound/pci/neomagic.c index 1b325205da5f..25273633ff18 100644 --- a/sys/dev/sound/pci/neomagic.c +++ b/sys/dev/sound/pci/neomagic.c @@ -702,9 +702,10 @@ nm_pci_attach(device_t dev) goto bad; } - snprintf(status, SND_STATUSLEN, "at memory 0x%jx, 0x%jx irq %jd %s", + snprintf(status, SND_STATUSLEN, "mem 0x%jx,0x%jx irq %jd on %s", rman_get_start(sc->buf), rman_get_start(sc->reg), - rman_get_start(sc->irq),PCM_KLDSTRING(snd_neomagic)); + rman_get_start(sc->irq), + device_get_nameunit(device_get_parent(dev))); if (pcm_register(dev, sc, 1, 1)) goto bad; pcm_addchan(dev, PCMDIR_REC, &nmchan_class, sc); diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c index d626da4fbb68..bee79e723696 100644 --- a/sys/dev/sound/pci/solo.c +++ b/sys/dev/sound/pci/solo.c @@ -1022,9 +1022,10 @@ ess_attach(device_t dev) if (mixer_init(dev, &solomixer_class, sc)) goto no; - snprintf(status, SND_STATUSLEN, "at io 0x%jx,0x%jx,0x%jx irq %jd %s", + snprintf(status, SND_STATUSLEN, "port 0x%jx,0x%jx,0x%jx irq %jd on %s", rman_get_start(sc->io), rman_get_start(sc->sb), rman_get_start(sc->vc), - rman_get_start(sc->irq),PCM_KLDSTRING(snd_solo)); + rman_get_start(sc->irq), + device_get_nameunit(device_get_parent(dev))); if (pcm_register(dev, sc, 1, 1)) goto no; diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c index 250b04426482..653e610febbe 100644 --- a/sys/dev/sound/pci/t4dwave.c +++ b/sys/dev/sound/pci/t4dwave.c @@ -917,8 +917,9 @@ tr_pci_attach(device_t dev) goto bad; } - snprintf(status, 64, "at io 0x%jx irq %jd %s", - rman_get_start(tr->reg), rman_get_start(tr->irq),PCM_KLDSTRING(snd_t4dwave)); + snprintf(status, SND_STATUSLEN, "port 0x%jx irq %jd on %s", + rman_get_start(tr->reg), rman_get_start(tr->irq), + device_get_nameunit(device_get_parent(dev))); if (pcm_register(dev, tr, dacn, 1)) goto bad; diff --git a/sys/dev/sound/pci/via8233.c b/sys/dev/sound/pci/via8233.c index 517e80fadb4f..9f3b312e4365 100644 --- a/sys/dev/sound/pci/via8233.c +++ b/sys/dev/sound/pci/via8233.c @@ -1347,9 +1347,9 @@ via_attach(device_t dev) ac97_setextmode(via->codec, ext); } - snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s", + snprintf(status, SND_STATUSLEN, "port 0x%jx irq %jd on %s", rman_get_start(via->reg), rman_get_start(via->irq), - PCM_KLDSTRING(snd_via8233)); + device_get_nameunit(device_get_parent(dev))); /* Register */ if (pcm_register(dev, via, via_dxs_chnum + via_sgd_chnum, NWRCHANS)) diff --git a/sys/dev/sound/pci/via82c686.c b/sys/dev/sound/pci/via82c686.c index 266441a938c6..44f846b684d7 100644 --- a/sys/dev/sound/pci/via82c686.c +++ b/sys/dev/sound/pci/via82c686.c @@ -580,9 +580,9 @@ via_attach(device_t dev) NSEGS * sizeof(struct via_dma_op), dma_cb, via, 0) != 0) goto bad; - snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s", + snprintf(status, SND_STATUSLEN, "port 0x%jx irq %jd on %s", rman_get_start(via->reg), rman_get_start(via->irq), - PCM_KLDSTRING(snd_via82c686)); + device_get_nameunit(device_get_parent(dev))); /* Register */ if (pcm_register(dev, via, 1, 1)) goto bad; diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c index 538aa961d987..e587f0113b5d 100644 --- a/sys/dev/sound/pci/vibes.c +++ b/sys/dev/sound/pci/vibes.c @@ -874,8 +874,9 @@ sv_attach(device_t dev) { pcm_addchan(dev, PCMDIR_PLAY, &svpchan_class, sc); pcm_addchan(dev, PCMDIR_REC, &svrchan_class, sc); - snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s", - rman_get_start(sc->enh_reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_vibes)); + snprintf(status, SND_STATUSLEN, "port 0x%jx irq %jd on %s", + rman_get_start(sc->enh_reg), rman_get_start(sc->irq), + device_get_nameunit(device_get_parent(dev))); pcm_setstatus(dev, status); DEB(printf("sv_attach: succeeded\n")); diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 5981266116fb..5b366a62630c 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -598,12 +598,6 @@ int sound_oss_card_info(oss_card_info *); PCM_GIANT_EXIT(x); \ } while (0) -#ifdef KLD_MODULE -#define PCM_KLDSTRING(a) ("kld " # a) -#else -#define PCM_KLDSTRING(a) "" -#endif - #endif /* _KERNEL */ #endif /* _OS_H_ */ diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index 3237093bcbfa..36985d4666a4 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -1204,9 +1204,8 @@ uaudio_attach_sub(device_t dev, kobj_class_t mixer_class, kobj_class_t chan_clas usb_get_product(sc->sc_udev)); device_set_desc_copy(dev, desc); - snprintf(status, sizeof(status), "at %s %s", - device_get_nameunit(device_get_parent(dev)), - PCM_KLDSTRING(snd_uaudio)); + snprintf(status, sizeof(status), "on %s", + device_get_nameunit(device_get_parent(dev))); if (pcm_register(dev, sc, (sc->sc_play_chan[i].num_alt > 0) ? 1 : 0,