All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Schilling Landgraf <dougsland@gmail.com>
To: Nicola Soranzo <nsoranzo@tiscali.it>
Cc: Linux Media <linux-media@vger.kernel.org>
Subject: Re: [PATCH] em28xx: register device to soundcard for sysfs
Date: Thu, 19 Feb 2009 14:12:52 -0300	[thread overview]
Message-ID: <20090219141252.3820c42b@gmail.com> (raw)
In-Reply-To: <200902191741.57767.nsoranzo@tiscali.it>

On Thu, 19 Feb 2009 17:41:56 +0100
Nicola Soranzo <nsoranzo@tiscali.it> wrote:

> As explained in "Writing an ALSA driver" (T. Iwai), audio drivers
> should set the struct device for the card before registering the card
> instance. This will add the correct /sys/class/sound/cardN/device
> symlink, so HAL can see the device and ConsoleKit sets its ACL
> permissions for the logged-in user.
> 
> For em28xx audio capture cards found e.g. in Hauppauge WinTV-HVR-900
> (R2), this patch fixes errors like:
> 
> ALSA lib pcm_hw.c:1429:(_snd_pcm_hw_open) Invalid value for card
> Error opening audio: Permission denied
> 
> when running mplayer as a normal user.
> 
> Priority: normal
> 
> Signed-off-by: Nicola Soranzo <nsoranzo@tiscali.it>
> ---
> diff -r 80e785538796 -r ef8cc17cc048
> linux/drivers/media/video/em28xx/em28xx-audio.c ---
> a/linux/drivers/media/video/em28xx/em28xx-audio.c	Wed Feb 18
> 18:27:33 2009 +0100 +++
> b/linux/drivers/media/video/em28xx/em28xx-audio.c	Thu Feb 19
> 17:36:44 2009 +0100 @@ -560,6 +560,8 @@ pcm->info_flags = 0;
> pcm->private_data = dev; strcpy(pcm->name, "Empia 28xx Capture");
> +
> +	snd_card_set_dev(card, &dev->udev->dev);
>  	strcpy(card->driver, "Empia Em28xx Audio");
>  	strcpy(card->shortname, "Em28xx Audio");
>  	strcpy(card->longname, "Empia Em28xx Audio");
> --

Applied, thanks!

Cheers,
Douglas,

      parent reply	other threads:[~2009-02-19 17:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-19 16:41 [PATCH] em28xx: register device to soundcard for sysfs Nicola Soranzo
2009-02-19 16:57 ` Markus Rechberger
2009-02-19 17:15   ` Nicola Soranzo
2009-02-19 17:20     ` Markus Rechberger
2009-02-19 17:12 ` Douglas Schilling Landgraf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090219141252.3820c42b@gmail.com \
    --to=dougsland@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=nsoranzo@tiscali.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.