Skip to contentSkip to conversation

Sending headset insertion events to user space on bootup

DISCUSSION Brad Rubin 2 participants 2 messages Jul 22, 2011 – Jul 23, 2011

lore
Share & tools
lore

Brad Rubin

author
#0 lore raw

Hi all,

I’m having an issue passing events when a headset is inserted upon bootup. I’m sending a headset insertion event to user space through snd_soc_jack_report, but user space is not yet ready to receive events and therefore misses the event. Since the kernel driver doesn’t resend this event, then there’s no way for user space to see it. User space is still booting up when the event is sent.

Does anyone know of a solution so user space can receive headset insertion events on bootup?

Is is possible to either allow the kernel to postpone sending events until user space is ready or to store events in some sort of cache so that user space can access them? Would it be possible to use ALSA to store the headset status in a device node?

Thanks,
Brad

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#1 lore raw
Quoted 2 lines · Brad Rubin

Does anyone know of a solution so user space can receive headset insertion events on bootup?

Userspace can read the state of the device at any time, when it starts up it should look at the current state.