pbisla/tinyalsa — comment on commit e2e3aba0f7a0b761a2a1770159ad109a3c6dd80b
File:  line 0
By tinyalsa:

Yeah, I like the ability to query this information but the problem is that after calling pcm_hwinfo(), you have to close the pcm and then open it again to use it. A pcm should always be valid for use by the pcm_() functions if it passes pcm_is_ready(). Seems to me that pcm_hwinfo() should use a different struct to hold the information.