Skip to contentSkip to conversation

Run-time CODEC reset

DISCUSSION Patrick Lai 3 participants 4 messages Nov 13, 2011 – Nov 14, 2011

lore
Share & tools
lore
#0 lore raw

Hi,

I have a use case which requires CODEC to be reset at run-time. As application exercises playback/capture through PCM device and mixer, my understanding is that there is no interface for application to reset CODEC through ALSA ASoC framework. CODEC driver would have to build non-standard interface for this purpose. Is there precedence in any of asoc CODEC driver which provides reset interface?

Thanks
Patrick

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 8 lines

Hi,

I have a use case which requires CODEC to be reset at run-time. As application exercises playback/capture through PCM device and mixer, my understanding is that there is no interface for application to reset CODEC through ALSA ASoC framework. CODEC driver would have to build non-standard interface for this purpose. Is there precedence in any of asoc CODEC driver which provides reset interface?

Why not describe the hardware / submit a patch to support the hardware first ? Then you can ask the developers for help. You can be helped more if you share your problematic code.

M

#2 lore raw
Quoted 9 lines · Marek Vasut
Quoted 8 lines

Hi,

I have a use case which requires CODEC to be reset at run-time. As application exercises playback/capture through PCM device and mixer, my understanding is that there is no interface for application to reset CODEC through ALSA ASoC framework. CODEC driver would have to build non-standard interface for this purpose. Is there precedence in any of asoc CODEC driver which provides reset interface?

Quoted 3 lines

Why not describe the hardware / submit a patch to support the hardware first ? Then you can ask the developers for help. You can be helped more if you share your problematic code.

Actually, there is no bug. The use case is more to do with self test mode. After running some audio tests to verify different audio paths (i.e handset mode), self test application would like to trigger codec reset interface to restore CODEC default state. I was told that there are already ASOC CODEC drivers offering such interface. I want to see how this use case is handled by other CODEC drivers especially if command comes during playback/capture.

Thanks
Patrick

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.
#3 lore raw
Quoted 5 lines · Patrick Lai
Quoted 2 lines · Marek Vasut

Then you can ask the developers for help. You can be helped more if you share your problematic code.

Quoted 7 lines

Actually, there is no bug. The use case is more to do with self test mode. After running some audio tests to verify different audio paths (i.e handset mode), self test application would like to trigger codec reset interface to restore CODEC default state. I was told that there are already ASOC CODEC drivers offering such interface. I want to see how this use case is handled by other CODEC drivers especially if command comes during playback/capture.

There's no such interface. This doesn't sound like something drivers should support, it just sounds like your test application wants to save the state before it starts and restore it afterwards, or the user should use some external utility like alsactl to do so. Why would an application care if the codec hardware had been physically reset, that's the sort of detail that the driver should be hiding?

Patrick, we routinely need to ask you for this sort of background information in order to understand what it is you're actually trying to do. Normally you've already jumped very far into the implementation and you don't mention the reasoning that you're relying on.