The branch main has been updated by christos:

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

commit b73b5f70e9f6be951e66531f6f57249eea4ba4dc
Author:     Christos Margiolis <chris...@freebsd.org>
AuthorDate: 2025-03-10 20:19:46 +0000
Commit:     Christos Margiolis <chris...@freebsd.org>
CommitDate: 2025-03-10 20:19:46 +0000

    sound: Remove feed_matrix_apply_generic()
    
    It does what feed_matrix_apply() already does, so it is redundant.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D48036
---
 sys/dev/sound/pcm/feeder_matrix.c | 49 ---------------------------------------
 1 file changed, 49 deletions(-)

diff --git a/sys/dev/sound/pcm/feeder_matrix.c 
b/sys/dev/sound/pcm/feeder_matrix.c
index ab7922179867..2fee2be8bf5b 100644
--- a/sys/dev/sound/pcm/feeder_matrix.c
+++ b/sys/dev/sound/pcm/feeder_matrix.c
@@ -169,55 +169,6 @@ feed_matrix_reset(struct feed_matrix_info *info)
        }
 }
 
-#ifdef FEEDMATRIX_GENERIC
-static void
-feed_matrix_apply_generic(struct feed_matrix_info *info,
-    uint8_t *src, uint8_t *dst, uint32_t count)
-{
-       intpcm64_t accum;
-       intpcm_t v;
-       int i, j;
-
-       do {
-               for (i = 0; info->matrix[i].chn[0] != SND_CHN_T_EOF;
-                   i++) {
-                       if (info->matrix[i].chn[0] == SND_CHN_T_NULL) {
-                               pcm_sample_write_norm(dst, 0, info->out);
-                               dst += info->bps;
-                               continue;
-                       } else if (info->matrix[i].chn[1] ==
-                           SND_CHN_T_EOF) {
-                               v = pcm_sample_read_norm(src +
-                                   info->matrix[i].chn[0], info->in);
-                               pcm_sample_write_norm(dst, v, info->out);
-                               dst += info->bps;
-                               continue;
-                       }
-
-                       accum = 0;
-                       for (j = 0;
-                           info->matrix[i].chn[j] != SND_CHN_T_EOF;
-                           j++) {
-                               v = pcm_sample_read_norm(src +
-                                   info->matrix[i].chn[j], info->in);
-                               accum += v;
-                       }
-
-                       accum = (accum * info->matrix[i].mul) >>
-                           info->matrix[i].shift;
-
-                       FEEDMATRIX_CLIP_CHECK(accum, 32);
-
-                       v = (accum > PCM_S32_MAX) ? PCM_S32_MAX :
-                           ((accum < PCM_S32_MIN) ? PCM_S32_MIN : accum);
-                       pcm_sample_write_norm(dst, v, info->out);
-                       dst += info->bps;
-               }
-               src += info->ialign;
-       } while (--count != 0);
-}
-#endif
-
 static int
 feed_matrix_setup(struct feed_matrix_info *info, struct pcmchan_matrix *m_in,
     struct pcmchan_matrix *m_out)

Reply via email to