Page 14 of 29 FirstFirst ... 4121314151624 ... LastLast
Results 131 to 140 of 281

Thread: snd_hda_intel options database

  1. #131
    Join Date
    Apr 2010
    Beans
    3

    Re: snd_hda_intel options database

    For the Conexant 5069 card I have found a way to mute the internal speakers.
    Download hda-verb from ftp://ftp.suse.com/pub/people/tiwai/...erb-0.3.tar.gz.
    Then execute
    Code:
    sudo hda-verb /dev/snd/hwC0D0 0x1f 0x701 1
    to turn the internal speakers off and
    Code:
    sudo hda-verb /dev/snd/hwC0D0 0x1f 0x701 0
    to turn them on again.

    I have also filed a bug report upstream on this.

    Edit: I have now created a daemon to automattically mute and unmute the internal speakers when headphones are plugged in and removed.
    Program:
    Code:
    /* 
     * File:   main.cpp
     * Author: xtr
     *
     * Created on April 26, 2010, 5:26 PM
     */
    
    #include <stdio.h>
    #include <stdlib.h>
    #include <ctype.h>
    #include <unistd.h>
    #include <sys/ioctl.h>
    #include <sys/io.h>
    #include <sys/types.h>
    #include <sys/fcntl.h>
    #include <syslog.h>
    #include <signal.h>
    
    #include <stdint.h>
    typedef uint8_t u8;
    typedef uint16_t u16;
    typedef uint32_t u32;
    typedef uint64_t u64;
    
    #define HDA_VERB(nid,verb,param)    ((nid)<<24 | (verb)<<8 | (param))
    #define HDA_IOCTL_VERB_WRITE        _IOWR('H', 0x11, struct hda_verb_ioctl)
    
    struct hda_verb_ioctl {
        u32 verb;    /* HDA_VERB() */
        u32 res;    /* response */
    };
    
    void daemonize()
    {
        pid_t pid, sid;
    
        /* Fork off the parent process */
        pid = fork();
        if (pid < 0) {
                exit(EXIT_FAILURE);
        }
        /* If we got a good PID, then
           we can exit the parent process. */
        if (pid > 0) {
                exit(EXIT_SUCCESS);
        }
    
        /* Change the file mode mask */
        umask(0);
    
        /* Open any logs here */
        openlog("pinsensed", LOG_PID, LOG_DAEMON);
        /* Create a new SID for the child process */
        sid = setsid();
        if (sid < 0) {
                /* Log any failure here */
                exit(EXIT_FAILURE);
        }
    
        /* Change the current working directory */
        if ((chdir("/")) < 0) {
                /* Log any failure here */
                exit(EXIT_FAILURE);
        }
    
    
        /* Close out the standard file descriptors */
        close(STDIN_FILENO);
        close(STDOUT_FILENO);
        close(STDERR_FILENO);
    
    }
    
    bool done = false;
    
    void trpsig(int)
    {
        done = true;
    }
    
    int main(int argc, char** argv) {
        daemonize();
        signal(SIGTERM, &trpsig);
    
        int fd, state;
        struct hda_verb_ioctl val;
        syslog(LOG_INFO, "Daemon started.");
        fd = open("/dev/snd/hwC0D0", O_RDWR);
        if (fd < 0) {
            syslog(LOG_ERR, "Failed to open snd device.");
                exit(EXIT_FAILURE);
        }
        val.verb = HDA_VERB(0x19, 0x0f09, 0x0);
            if (ioctl(fd, HDA_IOCTL_VERB_WRITE, &val) < 0)
                syslog(LOG_ERR, "Failed to write hda verb.");
        state = val.res >> 31;
        syslog(LOG_INFO, "Starting input value: %0x", state);
        while(!done)
        {
            sleep(1);
            val.verb = HDA_VERB(0x19, 0x0f09, 0x0);
            if (ioctl(fd, HDA_IOCTL_VERB_WRITE, &val) < 0)
                syslog(LOG_ERR, "Failed to write hda verb.");
    
            if(state != (val.res >> 31))
            {
                state = (val.res >> 31);
                syslog(LOG_INFO, "New input value: %0x", state);
                if(state == 0x1)
                    val.verb = HDA_VERB(0x1f, 0x701, 0x1);
                else
                    val.verb = HDA_VERB(0x1f, 0x701, 0x0);
                if (ioctl(fd, HDA_IOCTL_VERB_WRITE, &val) < 0)
                    syslog(LOG_ERR, "Failed to write hda verb.");
            }
        }
        close(fd);
        syslog(LOG_INFO, "Daemon stopped.");
        exit(EXIT_SUCCESS);
    }
    Compile with g++ main.cpp -o pinsensed
    Run with sudo ./pinsensed
    Last edited by xtrman; June 13th, 2010 at 05:53 AM.

  2. #132
    Join Date
    Nov 2008
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: snd_hda_intel options database

    Thank you very much, that worked! The only thing, I had to compile using g++ instead of gcc. But now I can finally use my headphones without having my speakers sounding at the same time.

    Asus A52F

  3. #133
    Join Date
    May 2007
    Location
    Waikato, New Zealand
    Beans
    19
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: snd_hda_intel options database

    xtrman - you are a legend. Works for me on an Asus K52J.

    I added the pinsensed command to /etc/rc.local as well so it auto-starts. I also needed to use g++ in place of gcc.

  4. #134
    Join Date
    Apr 2009
    Beans
    26

    Lightbulb Re: snd_hda_intel options database

    You are the greatest man!!!!
    This worked for me too on my Asus K52JR Ubuntu Lucid 32 bit

  5. #135
    Join Date
    May 2010
    Location
    Sortim
    Beans
    1

    Wink Re: snd_hda_intel options database

    Its work on Lenovo G560. Many thanks!

  6. #136
    Join Date
    May 2010
    Beans
    1

    Re: snd_hda_intel options database

    Thank for this thread)))
    Laptop: Samsung R25plus (no built-in mic)
    Problem: external mic not working (no sound)
    OS: Ubuntu Lucid Lynx
    Sound: ALC262

    Solution:
    sudo gedit /etc/modprobe.d/alsa-base.conf
    at the end of the file add

    options snd-hda-intel model=hippo

    and reboot!!!
    digitall inputs work fine (with jack detection)

    Last edited by mak7imus; May 2nd, 2010 at 09:19 PM.

  7. #137
    Join Date
    Nov 2008
    Beans
    10

    Re: snd_hda_intel options database

    My Sony VGN-NS21S works fine with
    options snd-hda-intel model=toshiba-s06

    Regards

  8. #138
    Join Date
    Sep 2009
    Beans
    19

    Re: snd_hda_intel options database

    Ubuntu 10.04

    MSI Ex623

    Code:
    wandang@wandang:~$ cat /proc/asound/cards
     0 [Intel          ]: HDA-Intel - HDA Intel
                          HDA Intel at 0xf8ef8000 irq 30
    wandang@wandang:~$ cat /proc/asound/modules
     0 snd_hda_intel
    wandang@wandang:~$ aplay -l
    **** Liste der Hardware-Geräte (PLAYBACK) ****
    Karte 0: Intel [HDA Intel], Gerät 0: ALC1200 Analog [ALC1200 Analog]
      Sub-Geräte: 0/1
      Sub-Gerät #0: subdevice #0
    Karte 0: Intel [HDA Intel], Gerät 1: ALC1200 Digital [ALC1200 Digital]
      Sub-Geräte: 1/1
      Sub-Gerät #0: subdevice #0
    only sound throu headset after installation.
    fixed with:
    Code:
    options snd-hda-intel model=targa-2ch-dig
    alternativ (both worked):
    options snd-hda-intel model=targa-dig

  9. #139
    Join Date
    May 2008
    Location
    Ohio, USA
    Beans
    6,883
    Distro
    Ubuntu 12.04 Precise Pangolin

    Dell Studio 1558 / IDT 92HD73C1X5

    Fix for no headphone. Thread: http://ubuntuforums.org/showthread.p...18#post9294918

    Add alsa-base.conf option:
    Code:
    options snd-hda-intel model=dell-eq

  10. #140
    Join Date
    Aug 2006
    Beans
    272
    Distro
    Ubuntu 10.04 Lucid Lynx

    Dell Inspiron 1318

    Code:
    options snd-hda-intel model=dell-bios power_save=10 power_save_controller=N
    This fixed the problem with my Dell Inspiron 1318 laptop. The build in microphone (mic) was not working until I added this. Now Skype test call returns my voice using the built-in mic.

    Last edited by dolphinsonar; May 16th, 2010 at 05:14 AM. Reason: Clarity, clarity, clarity

Page 14 of 29 FirstFirst ... 4121314151624 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •