耳机/麦克风插孔的带宽

发布于 2024-08-20 14:53:49 字数 136 浏览 12 评论 0原文

当我看到 Square 使用 iPhone 上的耳机插孔发送信用卡数据后,我对此产生了兴趣。

iPhone、普通笔记本电脑和普通移动设备上耳机插孔的平​​均带宽是多少?

可以通过在不同通道(左/右)发送不同的数据流来加倍吗?

I got interested in this after I saw Square use the headphone jack on the iPhone to send credit card data.

What's the average bandwidth of the headphone jack on the iPhone, average notebook, and average mobile device?

Can it be doubled by sending different data streams on the different channels (left/right)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

○闲身 2024-08-27 14:53:49

其中一个问题是音频线的带宽,我不会在这里讨论这个问题。至于音频端口,假设声卡在 16 位/样本/通道下的最大采样率为 44,100 或 48,000 样本/秒,从而产生 22.05 或 24 kHz 的最大带宽(基本上是 Nyquist-Shannon 采样定理,但对于声音采样,采样信号也必须是连续振幅的应用)和立体声传输率为 176.4 或 192 kBps。

根据 Studio Six Digital 的说法,iPhone 上的线路输入支持最大 48 kHz 采样率。 3G 版本的麦克风也以 48 kHz 运行,而第一代 iPhone 的麦克风采样频率为 8kHz。我尚未找到 iPhone 的位深度规格,但我相信它使用 16 位样本。 24 位样本是另一种可能性。

根据 FortunyApple 论坛,他引用了 Apple Audio 开发人员说明,MacBook 上的线路支持最多 24 位样本96 kHz 采样率,数据速率为 576 kBps。 Apple 的 MacBook 外部端口和连接器 页面列出的最大采样率为 192 kHz,但它们可能已切换使用光纤端口的数字音频的最大采样率。

对于速率比较,电话系统的采样率为 8 kHz,8 位/样本单声道,最大数据速率为 8 kbps。 FM 的采样率为 22.05 kHz(16 位/样本/通道),并且是立体声,数据速率为 88.2 kBps。

当然,上述计算忽略了数据流同步以及错误检测和纠正的问题,所有这些都会消耗一部分信号。

One issue is the bandwidth of audio cables, which I won't go into here. As for audio ports, assume a soundcards with a maximum sample rate of 44,100 or 48,000 samples/s at 16 bits/sample/channel, resulting in a maximum bandwidth of 22.05 or 24 kHz (basically a result of the Nyquist-Shannon sampling theorem, though for sound sampling, the sampled signal would also have to be continuous-amplitude for this theorem to apply) and a transfer rate of 176.4 or 192 kBps for stereo.

According to Studio Six Digital, the line-in on the iPhone supports a max sample rate of 48 kHz. The mic on the 3G version also runs at 48 kHz, while the 1st gen iPhone's mic sampled at 8kHz. I haven't been able to find bit depth specs for the iPhone, but I believe it uses 16 bit samples. 24 bit samples is the other possibility.

According to Fortuny over at the Apple forums, who was quoting an Apple Audio Developer Note, the line-in on a MacBook support up to 24 bit samples with a 96 kHz sample rate, for a data rate of 576 kBps. Apple's MacBook External Ports and Connector's page lists the max sample rate as 192 kHz, but they may have switched that with the max sample rate for digital audio using the optical port.

For a rate comparison, phone systems had a sample rate of 8 kHz at 8 bits/sample mono, resulting in a max data rate of 8 kbps. FM has a sample rate of 22.05 kHz at 16 bits/sample/channel and is stereo, resulting in a data rate of 88.2 kBps.

Of course, the above calculations ignore the problem of synchronizing the data stream and error detection and correction, all of which will consume a portion of the signal.

最笨的告白 2024-08-27 14:53:49

典型的音频设备最大为 48Khz 立体声,许多设备可以处理 96Khz。

但是,从耳机插孔出来的当然是模拟的,而不是数字的,并且它在输出时也会经过一些滤波器,因此某种音调调制是可行的方法。立体声通道之间可能存在一些串扰 - 串扰的程度很大程度上取决于设备。

0ld 型电话调制解调器可以通过标准模拟线路发送 9600 波特率,这些线路甚至不如典型的耳机插孔那么干净。这就是 MONO。我认为您无需太努力就能获得每个通道 2400 波特率。

如果您非常擅长信号处理,您可能可以达到 100K 波特。
上次我查看信用卡验证系统时,它们被设计为以 2400 波特单声道运行。如果他们仍然考虑到购买点系统有多大的惯性,我不会感到惊讶。

Typical audio device maximum is 48Khz stereo, lots of devices can handle 96 Khz.

But course what comes out of the headphone jack is analog, not digital, and it runs through some filters as well on the way out, so some sort of tone modulation is the way to go. There may be some crosstalk between the stereo channels - how much crosstalk will be very device dependent.

0ld style telephone modems could send 9600 baud over standard analog lines that aren't even as clean as your typical headphone jack. And that's MONO. I would think you could get 2400 baud per channel without working too hard.

You might be able to go as high as 100K baud if you were very clever at signal processing.
Credit card validation systems were designed to run at 2400 baud mono last time I looked at them, It wouldn't surprise me if they still were given how much inertia there is in point of purchase systems.

情独悲 2024-08-27 14:53:49

我不确定这是否适用于所有系统,但几乎所有(如果不是所有)采样系统都使用 1 位增量调制系统,该系统很可能嵌入到大多数便携式设备上的 DSP 芯片组中。抽取(将 1 位更改为 16,20 或 24 位)是在软件中完成的,抗混叠滤波器也是如此。请注意,这些 DFP 芯片正在通过硬件进行优化,以减少能耗,因此它们通过软件生成的内容可能会受到限制。

就奈奎斯特限制而言,当通过良好控制的数据路径传输数字信息时,这些限制并没有真正进入上下文。如果您观察调制解调器及其传输信息的方式,它们会使用大量 DSP 通过使用相移键控来发送更高的带宽,相移键控会查看相对于载波信号定时的相移,并且可以区分比载波信号定时小得多的增量。奈奎斯特极限正常加倍。(以 44khz 采样,同时以 20khz 生成数据),因此 DSP 可以看到与 180 度偏移相比,载波频率有 10 或 20 度偏移。这是因为您有一个参考信号可以比较。

此外,数据流都是宽带扩频编码,这增加了一大堆密度(在宽带中查找 jesse russell,在扩频中查找 Hedy Lamarr)

我的笔记本电脑在 24 位时为 192khz(dell xrs/14z),他们是这么说的。我通常通过网络连接将音频传输到我的主工作室电脑,该电脑配有 ADAT 光纤连接到远程设备,因此我可以获得出色的噪音和串扰水平。笔记本电脑和移动智能手机充满了数字噪音,而且体积太小,无法减少这些问题。在他们获得数字耳机(不太可能很快)之前,人们必须像在专业录音室一样使用离散系统。

I'm not sure if this is correct for all systems but almost all if not all sampling systems use a 1 bit delta modulation system that most likely embedded into the dsp chip set on most portable units. The decimation (changing 1 bit to 16,20 or 24 bit) is done in software and so is the anti aliasing filters. Mind you these dfp chips are being optimized via hardware so as to reduce energy consumption, so there may be a limit to what they could produce via software.

As far as nyquist limitations - these don't really come into context when transferring digital information over well controlled data paths. If you look at modems and the way they transmit information - they use a lot of DSP to send a higher band width by using phase shift keying - which looks at the relative phase shift to the carrier signal timing and can differentiate much smaller increments than the normal doubling of the nyquist limit.(sampling at 44khz while producing at data at 20 khz) so the dsp can see a 10 or 20 degree shift in the carrier frequency compared to the 180 degree shift. this is because you have a reference signal to compare with.

Also the data flow is all broadband spread-spectrum encoded which increases density a whole bunch (lookup jesse russell for broadband and Hedy Lamarr in spread-spectrum)

My laptop does 192khz at 24 bit (dell xrs/14z) or so they say. I usually transfer my audio via network connection to my main studio pc which has a ADAT optical to a remote unit so I get superior noise and cross talk levels. laptops and mobile smart phones are full of digital noise and are physically too small to reduce these issues. Until they get digital headphones (not likely soon) then one has to use discrete systems like they do in a professional recording studios.

我家小可爱 2024-08-27 14:53:49

我已经建立了一个图书馆来为自己回答这个问题。 iPhone 的截止频率非常典型,约为 20kHz,因此您可以实现的数据速率仅取决于您的 SNR 有多好。相关理论是香农-奈奎斯特极限。我已经成功地使用这个库达到了大约 64kbps,并且我认为通过更好的调整可以实现更多速度

如果您想查看该库,请访问 https://github.com/quiet/quiet
现场演示: https://quiet.github.io/quiet-js/lab.html< /a>

I've put together a library to answer this question for myself. The iPhone has a pretty typical cutoff of around 20kHz, so the data rate you can achieve just depends on how good your SNR is. The relevant theory is the Shannon-Nyquist limit. I've managed to hit roughly 64kbps with this library, and I think more is possible with better tuning

If you'd like to see the library, it's https://github.com/quiet/quiet
Live demo: https://quiet.github.io/quiet-js/lab.html

假扮的天使 2024-08-27 14:53:49

20Khz 几乎是任何用于传输音频的电路的最大值,因为它几乎是人耳频率响应的最高频率。考虑到奈奎斯特限制,您可能会看到 10Kb/秒的峰值。当然,在 Back In The Day(TM) 中,我们认为 9600b/s 是高速,所以它可能已经足够好了。是的,您可以使用立体声输出将其加倍。

20Khz is pretty much the max on any circuit intended to carry audio, because it's pretty much the top of the human ear's frequency response. Given the Nyquist limit, you're probably looking at 10Kb/sec tops. Of course, Back In The Day(TM), we though 9600b/s was high speed, so it might be good enough. And yes, you could double it using stereo output.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文