All of lore.kernel.org
 help / color / mirror / Atom feed
* [alsa-devel] a52 plugin + ffmpeg with libswresample
@ 2019-12-03 20:12 Giovanni Harting
  2019-12-03 20:38 ` Jaroslav Kysela
  0 siblings, 1 reply; 3+ messages in thread
From: Giovanni Harting @ 2019-12-03 20:12 UTC (permalink / raw)
  To: alsa-devel

Hello,

I'm working on restoring functionality to the a52 plugin.
ALSA build with ffmpeg without (deprecated) libavresample does not build 
this plugin, since libavresample is missing. Archlinux for example does 
not build with libavresample anymore [1], therefore a52 is missing in 
alsa-plugins builds since that change happened.

I ported rate-lav to libswresample, which seems to work well after a 
month of daily use.

The oddity is that a config file (asoundrc, [2]), that worked fine with 
alsa-lib 1.1.6, does not work with 1.1.7+. I could not find a change 
that causes this.

I traced it down to _snd_pcm_rate_open() in pcm/pcm_rate.c, where 
keywords from within pcm {} are passed into, where it fails with 
"Unknown field card" (for example).

I worked around it by filtering out all keywords [3], but that feels a 
little unclean. Is there a proper way to fix this? I'm not familiar with 
ALSA's config parsing.

I'll submit patches for both once I figured out how to fix this.

[1] https://bugs.archlinux.org/task/60586
[2]
pcm.a52 {
     @args [CARD]
     @args.CARD {
         type string
     }
     type rate
     slave {
         pcm {
             type a52
             bitrate 640
             channels 6
             card $CARD
         }
         rate 48000
         format S16_LE
     }
}

[3]
if (strcmp(id, "bitrate") == 0 || strcmp(id, "rate") == 0 || strcmp(id, 
"card") == 0 || strcmp(id, "channels") == 0 || strcmp(id, "format") == 0) {
     continue;
}
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [alsa-devel] a52 plugin + ffmpeg with libswresample
  2019-12-03 20:12 [alsa-devel] a52 plugin + ffmpeg with libswresample Giovanni Harting
@ 2019-12-03 20:38 ` Jaroslav Kysela
  2019-12-03 20:49   ` Giovanni Harting
  0 siblings, 1 reply; 3+ messages in thread
From: Jaroslav Kysela @ 2019-12-03 20:38 UTC (permalink / raw)
  To: Giovanni Harting; +Cc: ALSA development

Dne 03. 12. 19 v 21:12 Giovanni Harting napsal(a):
> Hello,
> 
> I'm working on restoring functionality to the a52 plugin.
> ALSA build with ffmpeg without (deprecated) libavresample does not build
> this plugin, since libavresample is missing. Archlinux for example does
> not build with libavresample anymore [1], therefore a52 is missing in
> alsa-plugins builds since that change happened.
> 
> I ported rate-lav to libswresample, which seems to work well after a
> month of daily use.
> 
> The oddity is that a config file (asoundrc, [2]), that worked fine with
> alsa-lib 1.1.6, does not work with 1.1.7+. I could not find a change
> that causes this.
> 
> I traced it down to _snd_pcm_rate_open() in pcm/pcm_rate.c, where
> keywords from within pcm {} are passed into, where it fails with
> "Unknown field card" (for example).
> 
> I worked around it by filtering out all keywords [3], but that feels a
> little unclean. Is there a proper way to fix this? I'm not familiar with
> ALSA's config parsing.
> 
> I'll submit patches for both once I figured out how to fix this.

Show us the code (for example via github or so) to look what you're trying to 
do. It seems that the configuration parser in the plugin is broken.

					Jaroslav

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [alsa-devel] a52 plugin + ffmpeg with libswresample
  2019-12-03 20:38 ` Jaroslav Kysela
@ 2019-12-03 20:49   ` Giovanni Harting
  0 siblings, 0 replies; 3+ messages in thread
From: Giovanni Harting @ 2019-12-03 20:49 UTC (permalink / raw)
  To: alsa-devel

On 03/12/2019 21:38, Jaroslav Kysela wrote:
> Show us the code (for example via github or so) to look what you're 
> trying to do. It seems that the configuration parser in the plugin is 
> broken.

Sure thing. The libswresample port of rate-lav is here [1], while the 
workaround for alsa-lib is here [2].

Essentially, I'm just trying to get the same configuration that worked 
in 1.1.6 working. This config parsing problem seems unrelated to the 
libswresample patch to me, correct me if I'm wrong.

[1] 
https://git.harting.dev/IdleGandalf/alsa-plugins/commit/9cdbbb9874757b6f8fda7fb4ac2e3fc59da65946
[2] 
https://git.harting.dev/IdleGandalf/alsa-lib/commit/646bc80a63b0220300678a38e0c26a9a13af6fc0
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-03 20:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03 20:12 [alsa-devel] a52 plugin + ffmpeg with libswresample Giovanni Harting
2019-12-03 20:38 ` Jaroslav Kysela
2019-12-03 20:49   ` Giovanni Harting

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.