Skip to contentSkip to conversation

alsa-driver-0.9.6/acore/hwdep.c

PATCH In review Karsten Wiese 4 participants 6 messages Sep 4, 2003 – Sep 5, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsa-driver-0.9.6/acore/hwdep.c

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

#1 lore raw
Quoted 5 lines · Karsten Wiese

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 <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

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

#2 lore raw

At Thu, 4 Sep 2003 20:12:38 +0200 (CEST),

Quoted 10 lines · Jaroslav
Quoted 5 lines · Karsten Wiese

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

#3 lore raw
Quoted 7 lines · Takashi Iwai

At Thu, 4 Sep 2003 20:12:38 +0200 (CEST),

Quoted 5 lines · Jaroslav
Quoted 2 lines · Karsten Wiese

Hi,

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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 <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

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

#4 lore raw

At Thu, 4 Sep 2003 20:45:47 +0200 (CEST),

Quoted 14 lines · Jaroslav
Quoted 11 lines · Takashi Iwai

At Thu, 4 Sep 2003 20:12:38 +0200 (CEST),

Quoted 9 lines · Jaroslav
Quoted 5 lines · Karsten Wiese

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:

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

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

#5 lore raw

PATCH 1/1 alsa\alsa-kernel\pci\ac97\ac97_codec.c

In reply to Jaroslav Kysela

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