Topic: Turning Speaker back off again?

A long time ago I was looking to cron the speaker coming on for Alarms on my Chumby One.  I took from the source code for the backup alarm that this used the command:

regutil -w HW_AUDIOOUT_SPEAKERCTRL_CLR=0x01000000

This works fine.

But what command can you execute to get the sound back through the headphone only again and turning off the speaker again.

I tried

regutil -w HW_AUDIOOUT_SPEAKERCTRL_CLR=0x00000000

But that doesn't do it.

I really don't know how this flag works. If I read it just now (it has the headphones plugged and speaker muted), I get:

Value at 0x80048108: 0x01000000

so already set to  0x01000000 so why does writing  0x01000000 unmite the speaker, as it seems already set to the correct value? But it does?

Likewise I find 0x00000000 on this when the speaker is unmuted by writing 0x01000000.

Any ideas?

Re: Turning Speaker back off again?

I found this in a file named imx223.h, might be some help.

#define HW_AUDIOOUT_SPEAKERCTRL     0x80048100
#define HW_AUDIOOUT_SPEAKERCTRL_SET     0x80048104
#define HW_AUDIOOUT_SPEAKERCTRL_CLR     0x80048108
#define HW_AUDIOOUT_SPEAKERCTRL_TOG     0x8004810C

Re: Turning Speaker back off again?

I think genel has the info you need - try:

regutil -w HW_AUDIOOUT_SPEAKERCTRL_SET=0x01000000

It's been a while, but I seem the recall the way this works is that you write a bitmask to the register that tells it which bit you want to set or clear.

Re: Turning Speaker back off again?

That got it. Thanks guys.