Audio Support Rock Pi S

I have exactly the same problem, a lot of devices with aplay -l, but all of them are loopback, @jack: any ideas?

@jack can we just connected LineoutL, LineoutR and GND pins on second (black) GPIO header to amplifier and use them, or does that require configuration?

We are working on this issue. It’s a device tree configuration issue. A kernel update will fix it.

3 Likes

Dear Rock PI S team,

Thanks for the info. Regarding the audio, we stumbled upon a few things:

(1) First of all there is NO audio driver for the rock pi S
(2) Regarding the driver: Providing a driver for #### 26-pin Header 2 MICN1-8 will not work,
as the MICS will never have a synchronized clock rate, due to your schemantics. If you
cannot provide synchronized audio channels, any sort of beamforming will NOT work
(3) The only chance with that board design is to use the I2S0_8CH_SDI0 interface. However, channel 7 and 8 are missing. Are you currently working on that specific problem?
We can assist you to provide a driver for this board.

Please have a look at a reference implementation

http://wiki.seeedstudio.com/ReSpeaker_6-Mic_Circular_Array_kit_for_Raspberry_Pi/
one with the rockchip

http://wiki.seeedstudio.com/ReSpeaker_Core_v2.0/

For further implementation.

Just keep in mind that until you do not have a valid audio interface, the device is USELESS for any kind of smart-home or ASR. It will not get accepted by the communiy, and it will not be sold accordingly in Millions of pieces such as the RPI3. It will die as quickly as it was launched. Acctually I’m very outraged about your marketing strategy, providing a small embedded system with multichannel MICS, pretending to be usable for Alexa, Siri, …, but NO audio is working at all!

Best Regards

MZ

2 Likes

You over exaggerating, honestly. There is enough projects that doesn’t require audio to work which RockPiS can satisfy, so please, restrain from words

Because you != community.

RockPiS is NOT rpi3. The closer is Pi Zero W.

Again, you over exaggerating. You already was told they are working on it. If you wanna help and you do understand how that works - i believe github is open, otherwise, your over exaggerating comments don’t help at all

“An extremely “rocking” mini computer for your projects! Get creative!! :-)”

I don’t see any Siri in there, do you? Or mean “projects”? Well, projects is vague word for sure

1 Like

We are updated the device tree to fix it,you can pull the latest kernel on github.

1 Like

Hi, mzoehr

We understand your point and your feedback is very important. The issue is what and how the users want to use the mic/audio is not clear for us, ie do the user prefer to use analog mic or digital mic. We also need to consider the maker gpio/spi/uart etc. So the two 26P header is very few and it’s really hard for us to choose which feature to keep and which to abandon. We have realised the i2s issue on the header missing essential clock. Below is what we are going to revise for the 26p header:

ROCK PI S V1.2 ROCK PI S V1.1 ROCK PI 4B Pin no Pin no ROCK PI 4B ROCK PI S V1.1 ROCK PI S V1.2
VCCIO VCCIO 3.3V 1 2 5V VCC5V0_SYS VCC5V0_SYS
I2C1_SDA I2C1_SDA I2C7_SDA/GPIO 3 4 5V VCC5V0_SYS VCC5V0_SYS
I2C1_SCL I2C1_SCL I2C7_SCL/GPIO 5 6 GND GND GND
(T15) I2S0_8CH_MCLK GPIO2_A5/I2S0_SCLK_TX SPI2_CLK/GPIO 7 8 GPIO/DEBUG_TX UART0_TX/SPI0_TX UART0_TX/SPI0_TX
GND GND GND 9 10 GPIO/DEBUG_RX UART0_TX/SPI0_RX UART0_TX/SPI0_RX
GPIO0_B7/PWM2/I2C3_SDA GPIO0_B7/PWM2/I2C3_SDA PWM0/GPIO 11 12 GPIO/I2S1_SCLK UART0_CTS/SPI0_CLK/I2C2_SDA GPIO2_A5/I2S0_SCLK_TX
PWM3/GPIO0_C0/IR_RX PWM3/GPIO0_C0/IR_RX PWM1/GPIO 13 14 GND GND GND
SPDIF_TX SPDIF_TX SPDIF_TX/GPIO 15 16 GPIO UART0_RTS/SPI0_CSN/I2C2_SCL GPIO2_B2/I2S0_SDO1
VCCIO VCCIO 3.3V 17 18 GPIO GPIO2_B1/I2S0_SDO0 GPIO2_B1/I2S0_SDO0
SPI2_TX/UART2_TX_M0 SPI2_TX/UART2_TX_M0 UART4_TX/SPI1_TX/GPIO 19 20 GND GND GND
SPI2_TX/UART2_RX_M0 SPI2_TX/UART2_RX_M0 UART4_RX/SPI1_RX/GPIO 21 22 GPIO GPIO0_B6/PWR_KEY/PWM1 V17 GPIO2_A7/I2S0_LRCK_TX
SPI2_CLK SPI2_CLK SPI1_CLK/GPIO 23 24 GPIO/SPI1_CS SPI2_CS SPI2_CS
GND GND GND 25 26 ADC_IN0 ADC_IN0 ADC_IN0

ROCK PI S V1.2 ROCK PI S V1.1 Pin no Pin no ROCK PI S V1.1 ROCK PI S V1.2
LINEOUT_L LINEOUT_L 26 25 LINEOUT_R LINEOUT_R
MP1 MP1 24 23 MN1 MN1
MP2 MP2 22 21 MN2 MN2
I2S0_SCLK_RX/PDM_CLK MP3 20 19 MN3 R16 GPIO2_B0/I2S0_8CH_LRCK_RX_d
GPIO2_B3/I2S0_SDO2 MP4 18 17 MN4 GPIO4_B2/I2S0_SDO3
MP5 MP5 16 15 MN5 MN5
MP6 MP6 14 13 MN6 MN6
MP7 MP7 12 11 MN7 MN7
MP8 MP8 10 9 MN8 MN8
Y14 I2S0_SDI3/PDM_SDI3 I2S0_SDI2/PDM_SDI2 8 7 MICBIAS1 MICBIAS1
I2S0_SDI2/PDM_SDI2 I2S0_SDI1/PDM_SDI1 6 5 MICBIAS2 MICBIAS2
I2S0_SDI1/PDM_SDI1 I2S0_SDI0/PDM_SDI0 4 3 ADC_KEY_IN1 ADC_KEY_IN1
I2S0_SDI0/PDM_SDI0 I2S0_SCLK_RX/PDM_CLK 2 1 GND GND

1 Like
root@rockpis:/home/rock# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=Loopback
    Loopback, Loopback PCM
    Default Audio Device
sysdefault:CARD=Loopback
    Loopback, Loopback PCM
    Default Audio Device
front:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    Front speakers
surround21:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
dmix:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    Direct sample mixing device
dmix:CARD=Loopback,DEV=1
    Loopback, Loopback PCM
    Direct sample mixing device
dsnoop:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    Direct sample snooping device
dsnoop:CARD=Loopback,DEV=1
    Loopback, Loopback PCM
    Direct sample snooping device
hw:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    Direct hardware device without any conversions
hw:CARD=Loopback,DEV=1
    Loopback, Loopback PCM
    Direct hardware device without any conversions
plughw:CARD=Loopback,DEV=0
    Loopback, Loopback PCM
    Hardware device with all software conversions
plughw:CARD=Loopback,DEV=1
    Loopback, Loopback PCM
    Hardware device with all software conversions
default:CARD=rockchiprk3308a
    rockchip,rk3308-acodec,
    Default Audio Device
sysdefault:CARD=rockchiprk3308a
    rockchip,rk3308-acodec,
    Default Audio Device
dmix:CARD=rockchiprk3308a,DEV=0
    rockchip,rk3308-acodec,
    Direct sample mixing device
dsnoop:CARD=rockchiprk3308a,DEV=0
    rockchip,rk3308-acodec,
    Direct sample snooping device
hw:CARD=rockchiprk3308a,DEV=0
    rockchip,rk3308-acodec,
    Direct hardware device without any conversions
plughw:CARD=rockchiprk3308a,DEV=0
    rockchip,rk3308-acodec,
    Hardware device with all software conversions

The new kernel is already available via apt. Thanks so much! Now I will try to get some music playing :wink:

1 Like

Hi @xfjx, somehow the repository didn’t work for me, how did you install the new kernel via apt? Thanks

EDIT: on a new install

sudo apt-get dist-upgrade

did the trick

1 Like

Hey again,

so now the devices appear, unfortunately still no sound. I however noted that the loopback and rockchip devices share the same names (“default”, “sysdefault”). Any way to disable the loopback driver?

Hey @xfjx,

did you get it to work, also which pin was the audio on?
(I am looking for line_out audio, but so far no success :frowning: )

Hi,

Sorry for the late reply. First of all I didn’t want to start a flame war here. Your product is nice, as it is. The only thing that popped up is an unique selling point. Regarding micro arm devices, there are plenty out there, like this one http://linuxgizmos.com/worlds-smallest-quad-core-sbc-starts-at-8-dollars/. However there is no small multi mems board available. The rockchip supports this by design, however you have to implement it accordingly.

Regarding the choice of mics, the best option is to use MEMS instead of analog ones. The use of MEMS in combination with an analog processing is no problem or vice versa, as you can use DAC/ADC.
Please have a look at the following schematic, where 2 ADCS are used to feed the audio input

The use of multiple MEMS does not have any advantage unless you are using it for beamforming, i.e. ASR and smart home usage. If you are planning to support multiple MEMS which might be one real USP of your board, the MEMS have to be clock synchronized.

Regarding the choice of MICS on the pin. The rockchip codec seems to be only processing stereo signals. So after having several discussions with some tech experts, we came to the conclusion that you cannot use the standard interface, otherwise the mics are not clock synchronized. If you are planning to support multiple MEMS, the only way would be to use the I2S interface, i.e. I2S0/I2S1 with 8ch: supports up to 8 channels (8xTX or 8xRX).

At the current state, the board (insert link, order code, etc.) can only connect to 6 digital mems microphones via the i2s interface. This is due to pin Y14 being left unconnected (see page 7 of the schematics pdf). Further, it would be nice to have synchronous sampling of the mems microphones and the line-out. According to the RK3308 datasheet, this happens at different hardware units, (audio-codec, i2s interface). In order to have synchronous sampling, the audio driver must take care of reading/writing to those units at the same time (i.e. with the same DMA cycle).

There is a reference implementation available for one variant of the rockchip. You might find some infos here how the sound module was implemented:

For a reference sound driver design intro, using multiple MICS have a look at

However, the are not using the rockchip

We will come back to you, if we find a valid driver design using the proposed I2S with the rockchip.

Best Regards

Matthias

2 Likes

with a very basic /etc/asound.conf

pcm.!default {
        type hw
        card 1
}

ctl.!default {
        type hw
        card 1
}

I was able to get some sound out of my Rock Pi S. I connected headphones to GND, PIN 25 and PIN 26… BUT: I only got sound on one ear. I switched PIN 25 and 26 and got sound on the other ear so it not broken headphones.

3 Likes

Dear Rock Pi S Team

We stumbled uppon the FireFly board

http://en.t-firefly.com/product/rocrk3308cc?theme=pc#spec

It uses the same Rockchip RK3308, as well as support for a 6ch microphone array.
Please have a look at the driver implementation>

http://en.t-firefly.com/doc/download/53.html

I would be extremly cool, if you add this driver specification to your board, as it seems to fullfill all requirements for multi-channel audio recording and playback. If you are experiencing troubles please drop us a line here.

Looking forward to hear from you.

Best Regards

Matthias

1 Like

Any chance to get an answer on that from @jack?

1 Like

…ok, so, what in this phrase is not clear why Radxa have limit on this device?

Just. Say. What? Your link lead to full 40 pins device. OF COURSE IT HAVE AUDIO you desire. Not shit Sherlock!

@dante: In case I was meant here. Was that meant to be funny or offensive? (I do not laugh)

To put this on a more serious polite discussion level. Yes of course it has limited capacity, but do you really need 40 pins?

page 23: https://drive.google.com/drive/folders/1SW9fmIb_zQP0PB8mXkf7HrwLkAhNuvCw

remove the leds and all the other not needed stuff

I already deleted post, so chill. Also, “not needed” for whom? You? Maybe yes. All other ppl? I wouldn’t be that sure.

@jack: you might want to stick to the pin setup provided on page 23 , MIC-Array Digital (roc-rk308-cc-v1_3.pdf) if somehow possible. This is because, there is already a driver implementation for that. Furthermore nobody wants to use analog mics if you have digital MEMS (MEMS have a lot better quality, higher SNR, allow longer wires, …). Therefore, I would recommend to get rid of analog mic support. Then you also have space to add the lineout R/L.

https://drive.google.com/drive/folders/1SW9fmIb_zQP0PB8mXkf7HrwLkAhNuvCw

hope that helps you somehow.
keep up the good work!

@Dante4: “not needed” because they are connected to ground. Hence you need max. 19 Pinouts.

Best Regards

Matthias

I have loopback devices only even after dist-upgrade. I am using official Debian Stretch image. Kernel reported 4.4.143-23-rockchip-g394d86b2b38b . What exactly needs be done for the board to recognize internal DAC?