]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'topic/hda' into for-linus
authorTakashi Iwai <tiwai@suse.de>
Fri, 4 Dec 2009 15:22:45 +0000 (16:22 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 4 Dec 2009 15:22:45 +0000 (16:22 +0100)
1  2 
Documentation/sound/alsa/ALSA-Configuration.txt
sound/pci/ice1712/ice1712.h
sound/pci/ice1712/juli.c

index 50a59860ceedbf7be2e1ba5864e797178da2d7ff,d29de1c971747aa10285680625aa349ccc2f71f2..8923597bd2bd215a55ba00be57deca7339930bc1
@@@ -522,7 -522,7 +522,7 @@@ Prior to version 0.9.0rc4 options had 
      pcm_devs       - Number of PCM devices assigned to each card
                       (default = 1, up to 4)
      pcm_substreams - Number of PCM substreams assigned to each PCM
 -                     (default = 8, up to 16)
 +                     (default = 8, up to 128)
      hrtimer        - Use hrtimer (=1, default) or system timer (=0)
      fake_buffer    - Fake buffer allocations (default = 1)
  
                setup before initializing the codecs.  This option is
                available only when CONFIG_SND_HDA_PATCH_LOADER=y is set.
                See HD-Audio.txt for details.
+     beep_mode - Selects the beep registration mode (0=off, 1=on, 2=
+               dynamic registration via mute switch on/off); the default
+               value is set via CONFIG_SND_HDA_INPUT_BEEP_MODE kconfig.
      
      [Single (global) options]
      single_cmd  - Use single immediate commands to communicate with
index d063149e70475326dc1713d9ed08a8b1098ed4b3,4615bca39e186c8cd66ac17e347caf9509022fe4..0da778a69ef8b47d9bc1af83791561e04b6d1069
@@@ -359,7 -359,9 +359,9 @@@ struct snd_ice1712 
                unsigned int saved[2];          /* for ewx_i2c */
                /* operators */
                void (*set_mask)(struct snd_ice1712 *ice, unsigned int data);
+               unsigned int (*get_mask)(struct snd_ice1712 *ice);
                void (*set_dir)(struct snd_ice1712 *ice, unsigned int data);
+               unsigned int (*get_dir)(struct snd_ice1712 *ice);
                void (*set_data)(struct snd_ice1712 *ice, unsigned int data);
                unsigned int (*get_data)(struct snd_ice1712 *ice);
                /* misc operators - move to another place? */
        unsigned int (*get_rate)(struct snd_ice1712 *ice);
        void (*set_rate)(struct snd_ice1712 *ice, unsigned int rate);
        unsigned char (*set_mclk)(struct snd_ice1712 *ice, unsigned int rate);
-       void (*set_spdif_clock)(struct snd_ice1712 *ice);
+       int (*set_spdif_clock)(struct snd_ice1712 *ice, int type);
+       int (*get_spdif_master_type)(struct snd_ice1712 *ice);
+       char **ext_clock_names;
+       int ext_clock_count;
+       void (*pro_open)(struct snd_ice1712 *, struct snd_pcm_substream *);
  #ifdef CONFIG_PM
        int (*pm_suspend)(struct snd_ice1712 *);
        int (*pm_resume)(struct snd_ice1712 *);
 -      int pm_suspend_enabled:1;
 -      int pm_saved_is_spdif_master:1;
 +      unsigned int pm_suspend_enabled:1;
 +      unsigned int pm_saved_is_spdif_master:1;
        unsigned int pm_saved_spdif_ctrl;
        unsigned char pm_saved_spdif_cfg;
        unsigned int pm_saved_route;
@@@ -399,6 -404,11 +404,11 @@@ static inline void snd_ice1712_gpio_set
        ice->gpio.set_dir(ice, bits);
  }
  
+ static inline unsigned int snd_ice1712_gpio_get_dir(struct snd_ice1712 *ice)
+ {
+       return ice->gpio.get_dir(ice);
+ }
  static inline void snd_ice1712_gpio_set_mask(struct snd_ice1712 *ice, unsigned int bits)
  {
        ice->gpio.set_mask(ice, bits);
diff --combined sound/pci/ice1712/juli.c
index f5020ad99a10a416ee720d81724dd55ae668bea2,4bed9633a4cd8f7e457a9d20eef6b41ece0bb6db..0c9413d5341b286145366e4d206b84f04f7c4b19
@@@ -412,25 -412,6 +412,6 @@@ static struct snd_kcontrol_new juli_mut
        },
  };
  
- static void ak4358_proc_regs_read(struct snd_info_entry *entry,
-               struct snd_info_buffer *buffer)
- {
-       struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
-       int reg, val;
-       for (reg = 0; reg <= 0xf; reg++) {
-               val =  snd_akm4xxx_get(ice->akm, 0, reg);
-               snd_iprintf(buffer, "0x%02x = 0x%02x\n", reg, val);
-       }
- }
- static void ak4358_proc_init(struct snd_ice1712 *ice)
- {
-       struct snd_info_entry *entry;
-       if (!snd_card_proc_new(ice->card, "ak4358_codec", &entry))
-               snd_info_set_text_ops(entry, ice, ak4358_proc_regs_read);
- }
  static char *slave_vols[] __devinitdata = {
        PCM_VOLUME,
        MONITOR_AN_IN_VOLUME,
@@@ -496,38 -477,11 +477,36 @@@ static int __devinit juli_add_controls(
        /* only capture SPDIF over AK4114 */
        err = snd_ak4114_build(spec->ak4114, NULL,
                        ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
-       ak4358_proc_init(ice);
        if (err < 0)
                return err;
        return 0;
  }
  
 +/*
 + * suspend/resume
 + * */
 +
 +#ifdef CONFIG_PM
 +static int juli_resume(struct snd_ice1712 *ice)
 +{
 +      struct snd_akm4xxx *ak = ice->akm;
 +      struct juli_spec *spec = ice->spec;
 +      /* akm4358 un-reset, un-mute */
 +      snd_akm4xxx_reset(ak, 0);
 +      /* reinit ak4114 */
 +      snd_ak4114_reinit(spec->ak4114);
 +      return 0;
 +}
 +
 +static int juli_suspend(struct snd_ice1712 *ice)
 +{
 +      struct snd_akm4xxx *ak = ice->akm;
 +      /* akm4358 reset and soft-mute */
 +      snd_akm4xxx_reset(ak, 1);
 +      return 0;
 +}
 +#endif
 +
  /*
   * initialize the chip
   */
@@@ -575,13 -529,14 +554,14 @@@ static inline unsigned char juli_set_mc
  }
  
  /* setting clock to external - SPDIF */
- static void juli_set_spdif_clock(struct snd_ice1712 *ice)
+ static int juli_set_spdif_clock(struct snd_ice1712 *ice, int type)
  {
        unsigned int old;
        old = ice->gpio.get_data(ice);
        /* external clock (= 0), multiply 1x, 48kHz */
        ice->gpio.set_data(ice, (old & ~GPIO_RATE_MASK) | GPIO_MULTI_1X |
                        GPIO_FREQ_48KHZ);
+       return 0;
  }
  
  /* Called when ak4114 detects change in the input SPDIF stream */
@@@ -671,13 -626,6 +651,13 @@@ static int __devinit juli_init(struct s
        ice->set_spdif_clock = juli_set_spdif_clock;
  
        ice->spdif.ops.open = juli_spdif_in_open;
 +
 +#ifdef CONFIG_PM
 +      ice->pm_resume = juli_resume;
 +      ice->pm_suspend = juli_suspend;
 +      ice->pm_suspend_enabled = 1;
 +#endif
 +
        return 0;
  }