Don't forget sox works properly @ 384kHz. What I've done can't be that
wrong.
How about about libalsa on my RPI? That's the base for building
squeezelite. I'd guess that's no more in sync with my kernel !?!?
Anyhow, here is the patch:
Code:
--------------------
cat ./projects/pi2/kernel/HifiBerryDacPro-384khz-kernel-4.4.8.patch
diff -Naur linux.a/include/sound/pcm.h linux.b/include/sound/pcm.h
--- linux.a/include/sound/pcm.h 2016-04-26 11:57:54.000000000 +0200
+++ linux.b/include/sound/pcm.h 2016-04-27 14:49:52.210381069 +0200
@@ -129,6 +129,7 @@
#define SNDRV_PCM_RATE_96000 (1<<10) /* 96000Hz */
#define SNDRV_PCM_RATE_176400 (1<<11) /* 176400Hz */
#define SNDRV_PCM_RATE_192000 (1<<12) /* 192000Hz */
+#define SNDRV_PCM_RATE_384000 (1<<13) /* 384000Hz */
#define SNDRV_PCM_RATE_CONTINUOUS (1<<30) /* continuous range */
#define SNDRV_PCM_RATE_KNOT (1<<31) /* supports more
non-continuos rates */
@@ -141,6 +142,7 @@
SNDRV_PCM_RATE_88200|SNDRV_PCM_RATE_96000)
#define SNDRV_PCM_RATE_8000_192000
(SNDRV_PCM_RATE_8000_96000|SNDRV_PCM_RATE_176400|\
SNDRV_PCM_RATE_192000)
+#define SNDRV_PCM_RATE_8000_384000
(SNDRV_PCM_RATE_8000_192000|SNDRV_PCM_RATE_384000)
#define _SNDRV_PCM_FMTBIT(fmt) (1ULL << (__force
int)SNDRV_PCM_FORMAT_##fmt)
#define SNDRV_PCM_FMTBIT_S8 _SNDRV_PCM_FMTBIT(S8)
#define SNDRV_PCM_FMTBIT_U8 _SNDRV_PCM_FMTBIT(U8)
diff -Naur linux.a/sound/core/pcm_native.c linux.b/sound/core/pcm_native.c
--- linux.a/sound/core/pcm_native.c 2016-04-27 13:58:40.065508603 +0200
+++ linux.b/sound/core/pcm_native.c 2016-04-27 14:57:58.772360870 +0200
@@ -1981,12 +1981,12 @@
return snd_interval_refine(hw_param_interval(params, rule->var), &t);
}
-#if SNDRV_PCM_RATE_5512 != 1 << 0 || SNDRV_PCM_RATE_192000 != 1 << 12
+#if SNDRV_PCM_RATE_5512 != 1 << 0 || SNDRV_PCM_RATE_384000 != 1 << 13
#error "Change this table"
#endif
static unsigned int rates[] = { 5512, 8000, 11025, 16000, 22050, 32000, 44100,
- 48000, 64000, 88200, 96000, 176400, 192000
};
+ 48000, 64000, 88200, 96000, 176400, 192000
, 384000 };
const struct snd_pcm_hw_constraint_list snd_pcm_known_rates = {
.count = ARRAY_SIZE(rates),
diff -Naur linux.a/sound/soc/bcm/bcm2835-i2s.c
linux.b/sound/soc/bcm/bcm2835-i2s.c
--- linux.a/sound/soc/bcm/bcm2835-i2s.c 2016-04-26 11:57:54.000000000
+0200
+++ linux.b/sound/soc/bcm/bcm2835-i2s.c 2016-04-27 14:52:12.349375252
+0200
@@ -730,7 +730,7 @@
.playback = {
.channels_min = 2,
.channels_max = 2,
- .rates = SNDRV_PCM_RATE_8000_192000,
+ .rates = SNDRV_PCM_RATE_8000_384000,
.formats = SNDRV_PCM_FMTBIT_S16_LE
| SNDRV_PCM_FMTBIT_S24_LE
| SNDRV_PCM_FMTBIT_S32_LE
@@ -738,7 +738,7 @@
.capture = {
.channels_min = 2,
.channels_max = 2,
- .rates = SNDRV_PCM_RATE_8000_192000,
+ .rates = SNDRV_PCM_RATE_8000_384000,
.formats = SNDRV_PCM_FMTBIT_S16_LE
| SNDRV_PCM_FMTBIT_S24_LE
| SNDRV_PCM_FMTBIT_S32_LE
--------------------
::: ' Touch Toolbox and more' (http://soundcheck-audio.blogspot.com) :::
by soundcheck
------------------------------------------------------------------------
soundcheck's Profile: http://forums.slimdevices.com/member.php?userid=34383
View this thread: http://forums.slimdevices.com/showthread.php?t=97046
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix