Skip to contentSkip to conversation

snd_pcm_hw_params_free() immediately after snd_pcm_hw_params() ???

DISCUSSION Clemens Ladisch 3 participants 3 messages Jan 21, 2010 – Jan 24, 2010

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines · Raymond Yau

Is there any flags in substream which can indicate snd_xxx_hw_params() was called at first time since snd_xxx_hw_params() were called many times during OSS emulation (probing the supported rates , channels , .... ) ?

There is no such flag. It is the responsibility of the driver to track the resources it has allocated.

If a resource does not depend on the hardware parameters, it might be a better idea to allocate/free it in the open/close callbacks.

Best regards,
Clemens

#1 lore raw

2010/1/21 Clemens Ladisch <[email protected]>

Quoted 9 lines
Quoted 1 line · Raymond Yau

Is there any flags in substream which can indicate snd_xxx_hw_params()

was

Quoted 2 lines

called at first time since snd_xxx_hw_params() were called many times during OSS emulation (probing the supported rates , channels , .... ) ?

There is no such flag. It is the responsibility of the driver to track the resources it has allocated.

Quoted 7 lines

If a resource does not depend on the hardware parameters, it might be a better idea to allocate/free it in the open/close callbacks.

Best regards,
Clemens

https://bugzilla.redhat.com/show_bug.cgi?id=497739

Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x40
Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x2060
Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x3641
Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x2101
Apr 26 11:20:11 localhost kernel: vortex_adb_delroutes: route not found! 0x3641
Apr 26 11:20:11 localhost kernel: vortex_adb_delroutes: route not found! 0x2101
Apr 26 11:20:11 localhost kernel: mix ALARM 0
Apr 26 11:20:11 localhost kernel: vortex_adb_delroutes: route not found! 0x3593
Apr 26 11:20:11 localhost kernel: mix ALARM 0
Apr 26 11:20:11 localhost kernel: Vortex: vortex_fifo_setadbctrl fail
Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x3642
Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x3743
Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x2201
Apr 26 11:20:11 localhost kernel: Vortex: vortex_fifo_setadbctrl fail

did the suspend/resume cycle call snd_xxx_hw_params() or snd_xxx_hw_free() when the driver did not support suspend/resume ?

#2 lore raw

At Sun, 24 Jan 2010 11:30:04 +0800,

Quoted 38 lines · Raymond Yau

2010/1/21 Clemens Ladisch <[email protected]>

Quoted 9 lines
Quoted 1 line · Raymond Yau

Is there any flags in substream which can indicate snd_xxx_hw_params()

was

Quoted 2 lines

called at first time since snd_xxx_hw_params() were called many times during OSS emulation (probing the supported rates , channels , .... ) ?

There is no such flag. It is the responsibility of the driver to track the resources it has allocated.

Quoted 7 lines

If a resource does not depend on the hardware parameters, it might be a better idea to allocate/free it in the open/close callbacks.

Best regards,
Clemens

https://bugzilla.redhat.com/show_bug.cgi?id=497739

Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x40
Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x2060
Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x3641
Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x2101
Apr 26 11:20:11 localhost kernel: vortex_adb_delroutes: route not found! 0x3641
Apr 26 11:20:11 localhost kernel: vortex_adb_delroutes: route not found! 0x2101
Apr 26 11:20:11 localhost kernel: mix ALARM 0
Apr 26 11:20:11 localhost kernel: vortex_adb_delroutes: route not found! 0x3593
Apr 26 11:20:11 localhost kernel: mix ALARM 0
Apr 26 11:20:11 localhost kernel: Vortex: vortex_fifo_setadbctrl fail
Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x3642
Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x3743
Apr 26 11:20:11 localhost kernel: vortex_adb_addroutes: unending route! 0x2201
Apr 26 11:20:11 localhost kernel: Vortex: vortex_fifo_setadbctrl fail
Quoted 2 lines

did the suspend/resume cycle call snd_xxx_hw_params() or snd_xxx_hw_free() when the driver did not support suspend/resume ?

No. It's all driver's responsibility.

Takashi