Re: alsa conformance test fails to run for playback (and works for capture)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

On Tuesday, 22 October 2019, 04:12:12 BST, Yu-Hsuan Hsu <yuhsuan@xxxxxxxxxxxx> wrote:


> Hi Hin-Tak,

> I finally found out the reason! It is because there is a length limit
> of PCM name in ALSA conformance test.
> I have increased it on
> https://chromium-review.googlesource.com/c/chromiumos/platform/audiotest/+/1871792.
> Waiting for the review and merge.
> Thanks a lot for your catch!

> Best,
> Yu-Hsuan

Dear Yu-Hsuan,

Yes, I hand-applied the one-line change, and it now works. I do wonder if you should change the args_set_capture_dev_name() also? 
At the moment, MAX_DEVICE_NAME_LENGTH is only used in exactly one place, for the playback device name. Hence the surprise that
capture works but playback does not:

src/alsa_conformance_args.c-119-void args_set_playback_dev_name(struct alsa_conformance_args *args,
src/alsa_conformance_args.c-120- const char *name)
src/alsa_conformance_args.c-121-{
src/alsa_conformance_args.c-122- free(args->playback_dev_name);
src/alsa_conformance_args.c:123: args->playback_dev_name = strndup(name, MAX_DEVICE_NAME_LENGTH);
src/alsa_conformance_args.c-124-}
src/alsa_conformance_args.c-125-
src/alsa_conformance_args.c-126-void args_set_capture_dev_name(struct alsa_conformance_args *args,
src/alsa_conformance_args.c-127- const char *name)
src/alsa_conformance_args.c-128-{
src/alsa_conformance_args.c-129- free(args->capture_dev_name);
src/alsa_conformance_args.c-130- args->capture_dev_name = strdup(name);
src/alsa_conformance_args.c-131-}
src/alsa_conformance_args.c-132-

Regards,
Hin-Tak
  
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux