PCM and I2S #1

Open
opened 2025-11-08 00:20:01 +00:00 by Sirherobrine23 · 14 comments
Owner
https://sirherobrine23.com.br/tplink_xx230v/gpl_tplink-xx230v/src/commit/4d76b590398d1e510a2a893f6fc4c69bfedb5768/sdk/en7529/linux-4.4.115/arch/arm/boot/dts/en7523.dts#L415-L426 ---- ## Files - https://sirherobrine23.com.br/tplink_xx230v/gpl_tplink-xx230v/src/commit/4d76b590398d1e510a2a893f6fc4c69bfedb5768/sdk/en7529/linux-4.4.115/arch/arm/mach-econet/ecnt_pcm.c - https://sirherobrine23.com.br/tplink_xx230v/gpl_tplink-xx230v/src/commit/4d76b590398d1e510a2a893f6fc4c69bfedb5768/sdk/en7529/linux-4.4.115/arch/arm/mach-econet/ecnt_i2s.c - https://sirherobrine23.com.br/tplink_xx230v/gpl_tplink-xx230v/src/commit/4d76b590398d1e510a2a893f6fc4c69bfedb5768/sdk/en7529/linux-4.4.115/sound/soc/econet ---- ### Comments We have similarities with the AN7581 (https://sirherobrine23.com.br/tplink_xx230v/kernel/src/commit/a280f4f04ccac4c1d36a72c39421d675b2283a42/sound/soc/airoha/an7581)
Owner

They use the same IRQ.

They use the same IRQ.
Owner

And the Airoha code is only for the i2s block. Not the pcm block. And AN7581 and EN7523 is the same regards to i2s.

And the Airoha code is only for the i2s block. Not the pcm block. And AN7581 and EN7523 is the same regards to i2s.
Author
Owner

And the Airoha code is only for the i2s block. Not the pcm block. And AN7581 and EN7523 is the same regards to i2s.

I'll take a look at that then, I was already looking at it

> And the Airoha code is only for the i2s block. Not the pcm block. And AN7581 and EN7523 is the same regards to i2s. I'll take a look at that then, I was already looking at it
Owner

Unfortunately there are alot of drivers that can be added but have limited use. Hardware with voice ports need a pcm driver.

Unfortunately there are alot of drivers that can be added but have limited use. Hardware with voice ports need a pcm driver.
Owner

And if you have a pcm driver you then need a slicc driver. And if you have a slic driver you need a proper voice client. And if you have a voice client you need the audio codecs. It is a lot of things before it can be useful :/.

And if you have a pcm driver you then need a slicc driver. And if you have a slic driver you need a proper voice client. And if you have a voice client you need the audio codecs. It is a lot of things before it can be useful :/.
Author
Owner

If this code is rewritten, could it be included in the upstream?

875ac6d855

If this code is rewritten, could it be included in the upstream? https://sirherobrine23.com.br/tplink_xx230v/proslic_api/src/commit/875ac6d855a1dd48e9bdca7a2f8848d8665643f1
Owner

Sure, but it will be a very hard task that few will appreciate. You are 10 years to late. In Sweden the have finally have dropped the demand for voice ports on routers. Every one is using cellphones.

Sure, but it will be a very hard task that few will appreciate. You are 10 years to late. In Sweden the have finally have dropped the demand for voice ports on routers. Every one is using cellphones.
Owner

The fun/useful stuff on EN7523 is networking and fiber uplink. Both complex task.

The fun/useful stuff on EN7523 is networking and fiber uplink. Both complex task.
Author
Owner

We don't use it either, but that will be for another time when possible.

We don't use it either, but that will be for another time when possible.
Author
Owner

Every one is using cellphones.

We rarely use landlines, here we use WhatsApp more, but not everyone uses it, so we have unlimited text messages and calls for a very affordable price on our cell phone plan.

> Every one is using cellphones. We rarely use landlines, here we use WhatsApp more, but not everyone uses it, so we have unlimited text messages and calls for a very affordable price on our cell phone plan.
Sirherobrine23 added the Kind/Enhancement
Priority
Low
4
labels 2025-11-09 01:31:06 +00:00
Sirherobrine23 added this to the (deleted) project 2025-11-09 01:32:33 +00:00
Sirherobrine23 moved this to To Do in EN7523 on 2025-11-09 01:33:13 +00:00
Author
Owner

I wrote the driver based on en7581, but I don't know how to test it yet.

[    3.128420] en7523-audio 1fbe2200.audio-controller: No cache used with register defaults set!
[    3.137163] en7523-audio 1fbe2200.audio-controller: mtk_afe_combine_sub_dai(), num of dai 2
[    3.146097] debugfs: Directory '1fbe2200.audio-controller' with parent 'en7523-i2s' already present!
...
[    3.325831] ALSA device list:
[    3.328824]   #0: en7523-i2s
I wrote the driver based on en7581, but I don't know how to test it yet. ``` [ 3.128420] en7523-audio 1fbe2200.audio-controller: No cache used with register defaults set! [ 3.137163] en7523-audio 1fbe2200.audio-controller: mtk_afe_combine_sub_dai(), num of dai 2 [ 3.146097] debugfs: Directory '1fbe2200.audio-controller' with parent 'en7523-i2s' already present! ... [ 3.325831] ALSA device list: [ 3.328824] #0: en7523-i2s ```
Owner

Per my understanding there is no hardware built with a codec attached. I guess Airoha internally has some refdesign.

Per my understanding there is no hardware built with a codec attached. I guess Airoha internally has some refdesign.
Sirherobrine23 added reference airoha_en7523_pcm 2025-11-24 21:11:58 +00:00
Sirherobrine23 moved this to Needs Tests in EN7523 on 2025-11-24 22:50:34 +00:00
Author
Owner

It seems to me that using some MediaTek decoder

MTK DSP support
status:

DSPCore[Ver:TVB1.0.23.800-4-P102-1]
[1] PCM V2.4 (Dec 18 2023 23:20:57) 
bind irq-113 to CPU1
PCM_INT=28
pcm[Ver:TVB1.0.23.800-4-P102-1]
lec[Ver:TVB1.0.23.800-4-P102-1]
SYS_HCLK=250
Major Num:233, device: spi
spi[Ver:TVB1.0.23.800-4-P102-1]
[15.813][cos]  422 - ERROR: before cpu mask 00000003
[15.814][cos]  437 - ERROR: after cpu mask 00000001
It seems to me that using some MediaTek decoder ``` MTK DSP support status: DSPCore[Ver:TVB1.0.23.800-4-P102-1] [1] PCM V2.4 (Dec 18 2023 23:20:57) bind irq-113 to CPU1 PCM_INT=28 pcm[Ver:TVB1.0.23.800-4-P102-1] lec[Ver:TVB1.0.23.800-4-P102-1] SYS_HCLK=250 Major Num:233, device: spi spi[Ver:TVB1.0.23.800-4-P102-1] [15.813][cos] 422 - ERROR: before cpu mask 00000003 [15.814][cos] 437 - ERROR: after cpu mask 00000001 ```
Owner

The PCM / TDM hardware is used for Voip support. To be able to connect a phone you use a SLIC chip. The control channel is often spi (out of band) or isi/zsi/csi (inband).

The slic chip handles 16 bit samples up to 16kHz but to get a real voip phone you need a line echo canceler (lec) and the actual voip codecs. The modules contain the complete stack from hardware drivers up to the actual network transport.

The PCM / TDM hardware is used for Voip support. To be able to connect a phone you use a SLIC chip. The control channel is often spi (out of band) or isi/zsi/csi (inband). The slic chip handles 16 bit samples up to 16kHz but to get a real voip phone you need a line echo canceler (lec) and the actual voip codecs. The modules contain the complete stack from hardware drivers up to the actual network transport.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: airoha_en7523/kernel#1