Speaker quality issue

Hello Team,

Board: based on APQ8016E​
Release: Linaro -18.01​

We have used a speaker (schematics attached) in our custom board connected to PMIC internal codec.​

Issue#​
We feel that the sound quality of the speaker is very low with higher volumes.​
We set the volume to “amixer sset ‘RX3 Digital’ 135” and play the sound file and it sounds noisy.​

Full command to play a file from speaker:​

  1. apply below amixer commands​
    $ amixer sset ‘RX3 MIX1 INP1’ 'RX1’​
    $ amixer sset ‘SPK DAC’ on​
    $ amixer sset ‘RX3 Digital’ 135​

  2. play audio file into speaker​
    $ aplay -D hw:0,1 ​

Query#1​
Is there an analog amplifier for speaker in PMIC that can be configured ? Or the RX3 Digital is the only one ?​

Query#2​
Is there any additional speaker related configurations that may help ?​

Please help to answer the query.​

Regards,​
Parth Y Shah

Hello,

Any update here?

Hello,

Any update?

Regards,
Parth Y Shah

I am a HW engineer so I like to check the HW with the most basic piece of test equipment, an Oscilloscope. Did you look at the waveform while playing a 1kHz sine wave file? Try it with an 8 Ohm resistor instead of a speaker?

What does the waveform look like? missing samples? clipping? This would give us a lot more information than “it sounds noisy”.

When I designed the Audio Mezzanine card I did test the audio output with a small speaker and it looked and sounded fine, but that was a completely different software load.

Thanks for your reply @ljking

Here, we are looking for register details related to internal audio amplifier inside the PMIC PM8916.

Please help us to get the same.

Regards,
Parth Y Shah

Here, we are looking for register details related to internal audio amplifier inside the PMIC PM8916.

I think you would need to raise such questions with your chip supplier.

If you need the register descriptions why don’t you just download them and read the documentation? Chapters 73-76 should have what you want. https://developer.qualcomm.com/download/sd410/pm8916-hardware-register-description.pdf
An Oscilloscope trace would still give you the biggest hint on the problem. I suspect you are missing interrupts and not feeding it enough data, or possibly you have your data byte swapped, but without a picture it is REALLY hard to diagnose “it sounds noisy”.

Hi,

We got some information from QCOM that speaker needs to be tuned for this issue and for that ACDB files need to be changed. That ACDB (Audio Calibration Database) are part of the QCOM LE releases.

How can we incorporate those ACDB file changes to the Linaro releases as we do not have ACDB files in Linaro?

Regards,
Parth Y Shah

Any update here?

Regards,
Parth Y Shah

I don’t know about this file, how is it supposed to be applies? is there a userspace application? Should it be part of the driver?

The ACDB junk is utterly irrelevant. What it is, is a big ugly text file that allows their blob to look up mixer configurations based on device and use case. As far as I can tell, its sole purpose is to make audio configuration so overly and unnecessarily complicated that it causes people to give up.

What its effect boils down to is setting a few configurations to alsa mixer.

As far as @arjun.salariya 's use goes, the ACDB has to be customized to the device you are using. In other words, you need to play around with the mixer until you figure out the right configuration, and THEN you would write that configuration into ACDB so that their blobs would know how to set the hardware.

That obviously is pointless, because (a) the question was about how to figure out the correct mixer settings, and (b) linaro is not using their blobs. Instead of using their horrible database files, just set the mixers appropriately from within the audio HAL, for example, audio/audio_hw.c - device/linaro/dragonboard - Git at Google down from there to line 1813.

You should sell mugs or t-shirts with that quote!

1 Like

The root problem that @arjun.salariya has been trying to solve is not how to set things up, but the poor audio quality. We are back to my original question, what is wrong with the waveform? @arjun.salariya, play a 1kHz sine wave, and capture the amplifier output with an oscilloscope please. We are just guessing at what your problem might be and not really giving you any help. Give us some facts to go on please…