Skip to contentSkip to conversation

speaker-test: Allow sampling rates up to 768000

PATCH Applied Julian Scheel 3 participants 4 messages Jun 7, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 speaker-test: Allow sampling rates up to 768000

There are audio devices around that support up to 768kHz playback, allow testing them by increasing the maximum supported sampling rate.

---
 speaker-test/speaker-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
speaker-test/speaker-test.c +1 -1
index 0cdecb3..773af0a 100644
@@ -1034,7 +1034,7 @@ int main(int argc, char *argv[]) {
     case 'r':
       rate = atoi(optarg);
       rate = rate < 4000 ? 4000 : rate;
-      rate = rate > 384000 ? 384000 : rate;
+      rate = rate > 768000 ? 768000 : rate;
       break;
     case 'c':
       channels = atoi(optarg);
Signature · 1 line
2.17.0
#1 lore raw

Hi

Quoted 13 lines · Julian Scheel

There are audio devices around that support up to 768kHz playback, allow testing them by increasing the maximum supported sampling rate.

---
 speaker-test/speaker-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
speaker-test/speaker-test.c +0 -0
index 0cdecb3..773af0a 100644

speaker-test/speaker-test.c int main(int argc, char *argv[]) { · line 1037

Quoted 5 lines
speaker-test/speaker-test.c +1 -1
@@ -1034,7 +1034,7 @@ int main(int argc, char *argv[]) {
     case 'r':
       rate = atoi(optarg);
       rate = rate < 4000 ? 4000 : rate;
-      rate = rate > 384000 ? 384000 : rate;
+      rate = rate > 768000 ? 768000 : rate;

Working with dsd and PCM, I'm scared about the ssd or network storage needed ;). BTW in the past I work even on no-conventional audio device, can we just add some flag to force any frequency or
read the max rate supported by audio card?

Michael

Quoted 10 lines
speaker-test/speaker-test.c +0 -1
       break;
     case 'c':
       channels = atoi(optarg);
--

2.17.0

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Signature · 4 lines
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |
#2 lore raw
Quoted 12 lines · Michael Nazzareno Trimarchi

Hi

Quoted 8 lines · Julian Scheel

There are audio devices around that support up to 768kHz playback, allow testing them by increasing the maximum supported sampling rate.

---
 speaker-test/speaker-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines

speaker-test/speaker-test.c int main(int argc, char *argv[]) { · line 1037

Quoted 10 lines
speaker-test/speaker-test.c +1 -1
index 0cdecb3..773af0a 100644
@@ -1034,7 +1034,7 @@ int main(int argc, char *argv[]) {
     case 'r':
       rate = atoi(optarg);
       rate = rate < 4000 ? 4000 : rate;
-      rate = rate > 384000 ? 384000 : rate;
+      rate = rate > 768000 ? 768000 : rate;

Working with dsd and PCM, I'm scared about the ssd or network storage needed ;). BTW in the past I work even on no-conventional audio device, can we just add some flag to force any frequency or
read the max rate supported by audio card?

This is merely a sanity check, and the program accepts only the rate the system supports, in anyway. Note that you can pass a higher rate than the actual card supports; it may be converted by alsa-lib plugin.

Takashi