Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

[Quiestion]Connect and software-enable speaker #284

Open
Radiomix2000 opened this issue Dec 15, 2019 · 5 comments
Open

[Quiestion]Connect and software-enable speaker #284

Radiomix2000 opened this issue Dec 15, 2019 · 5 comments
Labels

Comments

@Radiomix2000
Copy link

There is place for speaker plug on PCB, which is connected to AK4951. Is it possible to use portapack with speaker and how to activate it in firmware?

@DinBan
Copy link

DinBan commented Jan 10, 2020

Any one can answer to this good question? Thank you!

@cql1983
Copy link

cql1983 commented Mar 21, 2020

I looked at the source code,,
firmware\application\audio.cpp
It includes the initialization process of opening headphones. I think it can be simply edited to initialize the speakers at the same time. But if you want to add the open and close menu in the program, it needs some work.

`
namespace output {

void start() {
i2s::i2s0::tx_start();
unmute();
}

void stop() {
mute();
i2s::i2s0::tx_stop();
}

void mute() {
i2s::i2s0::tx_mute();
audio_codec->headphone_disable();
}

void unmute() {
i2s::i2s0::tx_unmute();
audio_codec->headphone_enable();
}`

At
firmware\common\ak4951.cpp
the speaker_enable() function Implemented this program

@RChadwick7
Copy link

Using a H2 with an amplifier IC installed, I was able to get audio without issue.

@cql1983
Copy link

cql1983 commented Mar 25, 2020

Using a H2 with an amplifier IC installed, I was able to get audio without issue.

The ak4951 originally supports external speaker output, and the official did not launch H2. H2 is the amplification chip added by some fans' DIY, not the officially supported hardware.

@jamesshao8
Copy link

Hi
I have added a button on top to switch on/off the speaker, you can try it in my repo.

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

No branches or pull requests

6 participants