On Mon, Nov 22, 2010 at 07:09:43PM +0530, ramesh.babu@xxxxxxxxx wrote:
> +/**
> + * snd_intelhad_dev_free - to free alsa card instance
> + *
> + * @device: pointer to device
> + *
> + * This function is called when the hdmi cable is un plugged
> + */
> +static int snd_intelhad_dev_free(struct snd_device *device)
> +{
> + struct snd_intelhad *intelhaddata;
> +
> + BUG_ON(!device);
> + pr_debug("had: snd_intelhad_dev_free called\n");
> + intelhaddata = device->device_data;
> + return 0;
> +}
This function doesn't appear to do anything like what either the
description or name would suggest? I'd expect to see some deallocation
going on...
> +/**
> + * had_hot_plug - to create sound card instance for HDMI audio playabck
> + *
> + *
> + * This function is called when the hdmi cable is plugged in. This function
> + * creates and registers the sound card with ALSA
> + */
> +static int had_hot_plug(void)
> +{
It would seem more natural for the HDMI device to be created and
instatiated via the normal Linux device model - when a HDMI connection
is detected the thing doing the detection creates and registers a new
device of some kind which the driver core then binds to a separate
driver.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
[ALSA User]
[Linux Audio Users]
[Kernel Archive]
[Asterisk PBX]
[Photo Sharing]
[Linux Sound]
[Video 4 Linux]
[Gimp]
[Yosemite News]