[alsa-devel] Errors iterating over PCM stream hints and opening based on NAME/IOID
Hey All,
(Tried to send an email earlier, it didn't seem to send?)
I'm trying to understand ALSA, having a little trouble with some errors that I can't ration over. Gist Repro: https://gist.github.com/TReed0803/353ce27d37bc1ebe965854ea88c8b97b
Whenever I run the above simple code (iterate over PCM stream hints, open for Playback/Capture depending on IOID; output also provided at link above) I notice that I sometimes hit errors. I'm having trouble understanding these errors, because as I understand I'm using the ALSA library correctly. For example, dmix is telling me that it "Only supports playback streams", well then, why does the hint IOID return that it supports capture as well? (same for dsnoop). More confusing are the "ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map" errors.
Can someone help me understand these issues, and perhaps what I'm doing wrong here? Would this point to something wrong with an installed package which perhaps configures these hints incorrectly? (Assuming that is probably the case, but I'd like to know for sure). I'm on a fairly new install of Ubuntu 16.04 LTS.
Thanks, - Trent Reed
Hey All,
I'm still having trouble understanding this, is anyone able to help me?
Thanks, - Trent Reed
On Fri, May 6, 2016 at 8:19 PM, Trent Reed treed0803@gmail.com wrote:
Hey All,
(Tried to send an email earlier, it didn't seem to send?)
I'm trying to understand ALSA, having a little trouble with some errors that I can't ration over. Gist Repro: https://gist.github.com/TReed0803/353ce27d37bc1ebe965854ea88c8b97b
Whenever I run the above simple code (iterate over PCM stream hints, open for Playback/Capture depending on IOID; output also provided at link above) I notice that I sometimes hit errors. I'm having trouble understanding these errors, because as I understand I'm using the ALSA library correctly. For example, dmix is telling me that it "Only supports playback streams", well then, why does the hint IOID return that it supports capture as well? (same for dsnoop). More confusing are the "ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map" errors.
Can someone help me understand these issues, and perhaps what I'm doing wrong here? Would this point to something wrong with an installed package which perhaps configures these hints incorrectly? (Assuming that is probably the case, but I'd like to know for sure). I'm on a fairly new install of Ubuntu 16.04 LTS.
Thanks,
- Trent Reed
On Sat, 07 May 2016 05:19:45 +0200, Trent Reed wrote:
Hey All,
(Tried to send an email earlier, it didn't seem to send?)
I'm trying to understand ALSA, having a little trouble with some errors that I can't ration over. Gist Repro: https://gist.github.com/TReed0803/353ce27d37bc1ebe965854ea88c8b97b
Whenever I run the above simple code (iterate over PCM stream hints, open for Playback/Capture depending on IOID; output also provided at link above) I notice that I sometimes hit errors. I'm having trouble understanding these errors, because as I understand I'm using the ALSA library correctly. For example, dmix is telling me that it "Only supports playback streams", well then, why does the hint IOID return that it supports capture as well? (same for dsnoop).
Oh, these are real bugs. They shouldn't have been listed as bidirectional, indeed. The fix patches are below.
More confusing are the "ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map" errors.
This is a bit more complicated. I suppose you're testing with HD-audio, right? HD-audio has a restriction that it accepts only even numbered streams (2, 4, 6, 8). The error comes from the definition of surround21, i.e. the odd numbers. But, you can still use this definition by wrapping with plug, so that the missing one channel is filled automatically while using the given channel allocation.
thanks,
Takashi
Hey Takashi,
Glad that this issue with bidirectional PCM hints was patched. :) I appreciate your help and input!
Thanks, - Trent Reed
On Thu, May 12, 2016 at 7:38 AM, Takashi Iwai tiwai@suse.de wrote:
On Sat, 07 May 2016 05:19:45 +0200, Trent Reed wrote:
Hey All,
(Tried to send an email earlier, it didn't seem to send?)
I'm trying to understand ALSA, having a little trouble with some errors that I can't ration over. Gist Repro: https://gist.github.com/TReed0803/353ce27d37bc1ebe965854ea88c8b97b
Whenever I run the above simple code (iterate over PCM stream hints, open for Playback/Capture depending on IOID; output also provided at link above) I notice that I sometimes hit errors. I'm having trouble understanding these errors, because as I understand I'm using the ALSA library correctly. For example, dmix is telling me that it "Only supports playback streams", well then, why does the hint IOID return that it supports capture as well? (same for dsnoop).
Oh, these are real bugs. They shouldn't have been listed as bidirectional, indeed. The fix patches are below.
More confusing are the "ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map" errors.
This is a bit more complicated. I suppose you're testing with HD-audio, right? HD-audio has a restriction that it accepts only even numbered streams (2, 4, 6, 8). The error comes from the definition of surround21, i.e. the odd numbers. But, you can still use this definition by wrapping with plug, so that the missing one channel is filled automatically while using the given channel allocation.
thanks,
Takashi
participants (2)
-
Takashi Iwai
-
Trent Reed