Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alsamixer for rockchip rk817 audio device do not contains any volume settings #7

Open
Sfinx opened this issue Feb 15, 2024 · 12 comments
Assignees

Comments

@Sfinx
Copy link

Sfinx commented Feb 15, 2024

According to rk817 documentation there are present as DAC as ADC volume settings. How to enable them in alsamixer ?

@Sfinx
Copy link
Author

Sfinx commented Feb 15, 2024

Image used: debian b27 xfce

@RadxaYuntian
Copy link
Member

Can you screenshot the relative pages? I don't quite understand what you are talking about here.

@Sfinx
Copy link
Author

Sfinx commented Feb 18, 2024

dac_vol
adc_vol

The 5.10.x rk817 driver do not have these settings. Moreover - it do not enable the MICBIAS at MIC input pin which makes the noise while recording through CM3 I/O 3.5mm jack. The 6.6.x rk817 driver definitely has as volume settings as MICBIAS:

#define RK817_CODEC_DADC_VOLL           0x1a
#define RK817_CODEC_DADC_VOLR           0x1b
#define RK817_CODEC_DDAC_VOLL           0x31
#define RK817_CODEC_DDAC_VOLR           0x32

static const struct snd_kcontrol_new rk817_volume_controls[] = {
        SOC_DOUBLE_R_RANGE_TLV("Master Playback Volume", RK817_CODEC_DDAC_VOLL,
                RK817_CODEC_DDAC_VOLR, 0, 0x00, 0xff, 1, rk817_vol_tlv),
        SOC_DOUBLE_R_RANGE_TLV("Master Capture Volume", RK817_CODEC_DADC_VOLL,
                RK817_CODEC_DADC_VOLR, 0, 0x00, 0xff, 1, rk817_vol_tlv),
        SOC_DOUBLE_TLV("Mic Capture Gain", RK817_CODEC_DMIC_PGA_GAIN, 4, 0, 0xf, 0,
                rk817_gain_tlv),
};

But the 6.6.x kernel is unsupported which means that CM3 audio is unusable with any kernel. Currently I'm evaluating CM3 for VoIP project.

@Sfinx
Copy link
Author

Sfinx commented Feb 20, 2024

I've managed to add playback/capture volume settings to 5.10.x rk817 driver but seems like there no MICBIAS circuit present inside rk817. This means that CM3 I/O audio is unusable for MIC recording from its design.

@Sfinx Sfinx closed this as completed Feb 20, 2024
@vamrs-feng
Copy link

image
This is the circuit diagram for the RK817 codec, the MIC pin There is a headphone cradle connected to the baseboard, and the recording function can be verified using our published mirror.

@vamrs-feng
Copy link

image

@Sfinx
Copy link
Author

Sfinx commented Feb 20, 2024

It is not clear what you mean under "recording function can be verified using our published mirror". The only way to verify the recording function is to insert MIC into CM3 and check the result WAV file. So try this by yourself first. You will have something like this:

cm3-mic.wav.gz

@vamrs-feng
Copy link

What hardware version of CM3 and CM3IO are you using? Also are you recording your operations from the command line, can you provide the recording commands you entered?

@vamrs-feng
Copy link

Our test engineers have verified this feature, so it could be some other factor. Can you provide more information so we can troubleshoot?

@Sfinx
Copy link
Author

Sfinx commented Feb 20, 2024

Radxa CM3 module revision is v1.32A 20221103
Radxa CM3 I/O board revision is v1.32

Gembird MIC-211 mic inserted in CM3 I/O 3.5mm audio jack, record command used:

arecord -D plughw:CARD=rockchiprk817,DEV=0 -r 16000 -f S16_LE -V mono cm3-mic.wav

@Sfinx
Copy link
Author

Sfinx commented Feb 20, 2024

re-opening

@Sfinx Sfinx reopened this Feb 20, 2024
@Sfinx
Copy link
Author

Sfinx commented Feb 20, 2024

I guess the problem is in too low MIC bias voltage (R34/C36 at CM3 I/O board) - it is wired to 1.8V but must be wired to 3.3V.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants