All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]alsa-driver-0.9.6/acore/hwdep.c
@ 2003-09-04 16:42 Karsten Wiese
  2003-09-04 18:12 ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Jaroslav Kysela
  0 siblings, 1 reply; 6+ messages in thread
From: Karsten Wiese @ 2003-09-04 16:42 UTC (permalink / raw)
  To: Takashi Iwai, Jaroslav Kysela; +Cc: alsa-devel

Hi,

I'm trying the hwdep interface with poll().
looking for reasons why removal of USB-device caused bad MAGIC in hwdep.c,
I found this solution:

<PATCH>
--- alsa-driver-0.9.6/acore/hwdep.c     2003-07-30 01:01:23.000000000 +0200
+++ alsa-driver-0.9.6-patched/acore/hwdep.c     2003-09-04 17:45:59.000000000 
+0200
@@ -133,9 +133,14 @@
        set_current_state(TASK_RUNNING);
        remove_wait_queue(&hw->open_wait, &wait);
        if (err >= 0) {
+               err = snd_card_file_add(hw->card, file);
+               if (err < 0)
+                       return -ENODEV;
+
                file->private_data = hw;
                hw->used++;
        }
+
        up(&hw->open_mutex);
        return err;
 }
@@ -151,6 +156,7 @@
        }
        if (hw->used > 0)
                hw->used--;
+       snd_card_file_remove(hw->card, file);
        up(&hw->open_mutex);
        return -ENXIO;
 }
</PATCH>

Also in Web-CVS this part of the code seams not to have the snd_card_file* 
calls.
"It works for me" here. If it is correct, please apply!

regards,
Karsten



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

* Re: [PATCH]alsa-driver-0.9.6/acore/hwdep.c
  2003-09-04 16:42 [PATCH]alsa-driver-0.9.6/acore/hwdep.c Karsten Wiese
@ 2003-09-04 18:12 ` Jaroslav Kysela
  2003-09-04 18:23   ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Takashi Iwai
  2003-09-05 10:25   ` [PATCH]alsa\alsa-kernel\pci\ac97\ac97_codec.c Max Mozok
  0 siblings, 2 replies; 6+ messages in thread
From: Jaroslav Kysela @ 2003-09-04 18:12 UTC (permalink / raw)
  To: Karsten Wiese; +Cc: Takashi Iwai, alsa-devel

On Thu, 4 Sep 2003, Karsten Wiese wrote:

> Hi,
>
> I'm trying the hwdep interface with poll().
> looking for reasons why removal of USB-device caused bad MAGIC in hwdep.c,
> I found this solution:

Thanks. Applied with small changes to fix the error path.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

* Re: [PATCH]alsa-driver-0.9.6/acore/hwdep.c
  2003-09-04 18:12 ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Jaroslav Kysela
@ 2003-09-04 18:23   ` Takashi Iwai
  2003-09-04 18:45     ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Jaroslav Kysela
  2003-09-05 10:25   ` [PATCH]alsa\alsa-kernel\pci\ac97\ac97_codec.c Max Mozok
  1 sibling, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2003-09-04 18:23 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: Karsten Wiese, alsa-devel

At Thu, 4 Sep 2003 20:12:38 +0200 (CEST),
Jaroslav wrote:
> 
> On Thu, 4 Sep 2003, Karsten Wiese wrote:
> 
> > Hi,
> >
> > I'm trying the hwdep interface with poll().
> > looking for reasons why removal of USB-device caused bad MAGIC in hwdep.c,
> > I found this solution:
> 
> Thanks. Applied with small changes to fix the error path.

shouldn't we add also module_get/put() ?


Takashi


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

* Re: [PATCH]alsa-driver-0.9.6/acore/hwdep.c
  2003-09-04 18:23   ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Takashi Iwai
@ 2003-09-04 18:45     ` Jaroslav Kysela
  2003-09-04 18:50       ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Jaroslav Kysela @ 2003-09-04 18:45 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Karsten Wiese, alsa-devel

On Thu, 4 Sep 2003, Takashi Iwai wrote:

> At Thu, 4 Sep 2003 20:12:38 +0200 (CEST),
> Jaroslav wrote:
> >
> > On Thu, 4 Sep 2003, Karsten Wiese wrote:
> >
> > > Hi,
> > >
> > > I'm trying the hwdep interface with poll().
> > > looking for reasons why removal of USB-device caused bad MAGIC in hwdep.c,
> > > I found this solution:
> >
> > Thanks. Applied with small changes to fix the error path.
>
> shouldn't we add also module_get/put() ?

Yes, we should. Done.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

* Re: [PATCH]alsa-driver-0.9.6/acore/hwdep.c
  2003-09-04 18:45     ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Jaroslav Kysela
@ 2003-09-04 18:50       ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2003-09-04 18:50 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: Karsten Wiese, alsa-devel

At Thu, 4 Sep 2003 20:45:47 +0200 (CEST),
Jaroslav wrote:
> 
> On Thu, 4 Sep 2003, Takashi Iwai wrote:
> 
> > At Thu, 4 Sep 2003 20:12:38 +0200 (CEST),
> > Jaroslav wrote:
> > >
> > > On Thu, 4 Sep 2003, Karsten Wiese wrote:
> > >
> > > > Hi,
> > > >
> > > > I'm trying the hwdep interface with poll().
> > > > looking for reasons why removal of USB-device caused bad MAGIC in hwdep.c,
> > > > I found this solution:
> > >
> > > Thanks. Applied with small changes to fix the error path.
> >
> > shouldn't we add also module_get/put() ?
> 
> Yes, we should. Done.

thanks!


Takashi


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

* [PATCH]alsa\alsa-kernel\pci\ac97\ac97_codec.c
  2003-09-04 18:12 ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Jaroslav Kysela
  2003-09-04 18:23   ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Takashi Iwai
@ 2003-09-05 10:25   ` Max Mozok
  1 sibling, 0 replies; 6+ messages in thread
From: Max Mozok @ 2003-09-05 10:25 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: alsa-devel@lists.sourceforge.net, Takashi Iwai

On Thu, 4 Sep 2003 20:12:38 +0200 (CEST), Jaroslav Kysela wrote:

        /* FIXME: C-Media chips have no PCM volume!! */
        if (/*ac97->id == 0x434d4941 ||*/
            ac97->id == 0x434d4942 ||
            ac97->id == 0x434d4961)
Line 1368:
snd_ac97_write_cache(ac97, AC97_PCM, 0x9f1f); //(Mute)

should be:
snd_ac97_write_cache(ac97, AC97_PCM, 0x0); //(Unmute)

In accordance with CMI9739 6CH Audio Codec SPEC_Ver12.pdf

No PCM volume, but it should be unmute, is it?



Yours sincerely,
		Max V. Mozok
-----------------------------------------------------------------------------------------
E-mail: elephant[AT]os2.kiev.ua




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

end of thread, other threads:[~2003-09-05 10:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-04 16:42 [PATCH]alsa-driver-0.9.6/acore/hwdep.c Karsten Wiese
2003-09-04 18:12 ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Jaroslav Kysela
2003-09-04 18:23   ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Takashi Iwai
2003-09-04 18:45     ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Jaroslav Kysela
2003-09-04 18:50       ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Takashi Iwai
2003-09-05 10:25   ` [PATCH]alsa\alsa-kernel\pci\ac97\ac97_codec.c Max Mozok

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.