Re: substream->private_data == NULL in hw_params

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

 



At Tue, 17 Jul 2007 03:00:44 +0200,
Florian Demski wrote:
> 
> Hi there,
> 
> after many reboots I finally fixed an error in a driver but I am not 
> sure if there ain't an underlying problem which causes this error.
> 
> The initialization is done with
> 
>         struct snd_pcm *pcm;
>         int err;
> 
>         if((err = snd_pcm_new(chip->pod->line6.card, (char 
> *)chip->pod->line6.devname, 0, 1, 1, &pcm)) < 0)
>                 return err;
> 
>         pcm->private_data = chip;
>         pcm->private_free = pod_cleanup_pcm;
>         chip->pcm = pcm;
> 
> However in hw_param, substream->private_data is NULL and I have to get 
> the right value with this construct:

That's weird.  substream->private_data is copied from
pcm->private_data at snd_pcm_open(), and never changed in another part
of PCM core layer.  So, my guess is somewhere in your driver
overwrites it.  Maybe not explicitly.

I'd check each call between open and hw_params, e.g. adding printk
appropriately...


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

  Powered by Linux