Skip site navigation (1)Skip section navigation (2)


| raw e-mail | index | archive | help
The branch main has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=e89ee05b7cf1a54d0d6ed56e4d451fdd9a10db43

commit e89ee05b7cf1a54d0d6ed56e4d451fdd9a10db43
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2025-02-25 11:43:26 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-02-25 11:43:26 +0000

    sound: Initialize channels with sane default rate and format
    
    There is no good reason to initialize with AFMT_U8 at 8000Hz.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Reviewed by:    dev_submerge.ch
    Differential Revision:  https://reviews.freebsd.org/D48434
---
 sys/dev/sound/pcm/channel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
index 4d275d00762a..58315610312e 100644
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -1205,8 +1205,8 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls,
 	c->direction = direction;
 	c->type = dir;
 	c->unit = alloc_unr(chn_getunr(d, c->type));
-	c->format = SND_FORMAT(AFMT_U8, 1, 0);
-	c->speed = DSP_DEFAULT_SPEED;
+	c->format = SND_FORMAT(AFMT_S16_LE, 2, 0);
+	c->speed = 48000;
 	c->pid = -1;
 	c->latency = -1;
 	c->timeout = 1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?>