Changeset 339 for GPL


Ignore:
Timestamp:
Apr 5, 2008, 10:09:19 AM (17 years ago)
Author:
Paul Smedley
Message:

Cleanups + more elegant fix for HW Param setting problem for HDA that was in changeset 332

Location:
GPL/branches/uniaud32-2.0
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-2.0/alsa-kernel/core/pcm_memory.c

    r305 r339  
    3030
    3131static int preallocate_dma = 1;
    32 //module_param(preallocate_dma, int, 0444);
     32module_param(preallocate_dma, int, 0444);
    3333MODULE_PARM_DESC(preallocate_dma, "Preallocate DMA memory when the PCM devices are initialized.");
    3434
    3535static int maximum_substreams = 4;
    36 //module_param(maximum_substreams, int, 0444);
     36module_param(maximum_substreams, int, 0444);
    3737MODULE_PARM_DESC(maximum_substreams, "Maximum substreams with preallocated DMA memory.");
    3838
  • GPL/branches/uniaud32-2.0/alsa-kernel/drivers/dummy.c

    r305 r339  
    158158module_param_array(pcm_substreams, int, NULL, 0444);
    159159MODULE_PARM_DESC(pcm_substreams, "PCM substreams # (1-16) for dummy driver.");
    160 //module_param_array(midi_devs, int, NULL, 0444);
    161 //MODULE_PARM_DESC(midi_devs, "MIDI devices # (0-2) for dummy driver.");
     160module_param_array(midi_devs, int, NULL, 0444);
     161MODULE_PARM_DESC(midi_devs, "MIDI devices # (0-2) for dummy driver.");
    162162
    163163static struct platform_device *devices[SNDRV_CARDS];
  • GPL/branches/uniaud32-2.0/alsa-kernel/pci/ac97/ac97_codec.c

    r305 r339  
    4545static int enable_loopback;
    4646
    47 //module_param(enable_loopback, bool, 0444);
     47module_param(enable_loopback, bool, 0444);
    4848MODULE_PARM_DESC(enable_loopback, "Enable AC97 ADC/DAC Loopback Control");
    4949
  • GPL/branches/uniaud32-2.0/alsa-kernel/pci/hda/hda_codec.c

    r305 r339  
    3636/* define this option here to hide as static */
    3737static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT;
    38 //module_param(power_save, int, 0644);
     38module_param(power_save, int, 0644);
    3939MODULE_PARM_DESC(power_save, "Automatic power-saving timeout "
    4040                 "(in second, 0 = disable).");
  • GPL/branches/uniaud32-2.0/alsa-kernel/pci/hda/hda_intel.c

    r331 r339  
    6363static int enable_msi;
    6464
    65 //module_param_array(index, int, NULL, 0444);
     65module_param_array(index, int, NULL, 0444);
    6666MODULE_PARM_DESC(index, "Index value for Intel HD audio interface.");
    67 //module_param_array(id, charp, NULL, 0444);
     67module_param_array(id, charp, NULL, 0444);
    6868MODULE_PARM_DESC(id, "ID string for Intel HD audio interface.");
    69 //module_param_array(enable, bool, NULL, 0444);
     69module_param_array(enable, bool, NULL, 0444);
    7070MODULE_PARM_DESC(enable, "Enable Intel HD audio interface.");
    71 //module_param_array(model, charp, NULL, 0444);
     71module_param_array(model, charp, NULL, 0444);
    7272MODULE_PARM_DESC(model, "Use the given board model.");
    73 //module_param_array(position_fix, int, NULL, 0444);
     73module_param_array(position_fix, int, NULL, 0444);
    7474MODULE_PARM_DESC(position_fix, "Fix DMA pointer "
    7575                 "(0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size).");
    76 //module_param_array(probe_mask, int, NULL, 0444);
     76module_param_array(probe_mask, int, NULL, 0444);
    7777MODULE_PARM_DESC(probe_mask, "Bitmask to probe codecs (default = -1).");
    78 //module_param(single_cmd, bool, 0444);
     78module_param(single_cmd, bool, 0444);
    7979MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs "
    8080                 "(for debugging only).");
    81 //module_param(enable_msi, int, 0444);
     81module_param(enable_msi, int, 0444);
    8282MODULE_PARM_DESC(enable_msi, "Enable Message Signaled Interrupt (MSI)");
    8383
     
    9090 */
    9191static int power_save_controller = 1;
    92 //module_param(power_save_controller, bool, 0644);
     92module_param(power_save_controller, bool, 0644);
    9393MODULE_PARM_DESC(power_save_controller, "Reset controller in power save mode.");
    9494#endif
  • GPL/branches/uniaud32-2.0/lib32/sound.c

    r332 r339  
    809809    pHandle->doublesamplesize  = samplesize * 2;
    810810    pHandle->doublesamplesize *= pHwParams->ulNumChannels;
    811     periodbytes = pHwParams->ulPeriodSize;
    812     periodsize  = bytes_to_samples(periodbytes);
     811//    periodbytes = pHwParams->ulPeriodSize;
     812//    periodsize  = bytes_to_samples(periodbytes);
     813    periodsize = pHwParams->ulPeriodSize;
     814    periodbytes = samples_to_bytes(periodsize);
    813815    // checking number of channels
    814816
    815     printk("channels: %i, period size: %i\n",pHwParams->ulNumChannels, periodbytes);
     817    printk("channels: %i, period bytes: %i\n",pHwParams->ulNumChannels, periodbytes);
    816818    _snd_pcm_hw_params_any(&params);
    817819    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)__Stack32ToFlat(&params));
     
    926928        periodbytes = maxperiodbytes;
    927929    }
    928 
    929930    minperiodsize = hw_param_interval((&params), SNDRV_PCM_HW_PARAM_PERIOD_SIZE)->min;
    930931    maxperiodsize = hw_param_interval((&params), SNDRV_PCM_HW_PARAM_PERIOD_SIZE)->max;
     
    936937        periodsize = maxperiodsize;
    937938    }
    938 
    939939    if(samples_to_bytes(periodsize) < periodbytes) {
    940940        periodbytes = samples_to_bytes(periodsize);
     
    944944        periodsize = bytes_to_samples(periodbytes);
    945945    }
    946 
    947946    //make sure period size is a whole fraction of the buffer size
    948947    bufsize = hw_param_interval((&params), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->max;
     
    992991    _snd_pcm_hw_param_set(&params, SNDRV_PCM_HW_PARAM_RATE,
    993992                          pHwParams->ulSampleRate, 0);
    994 #if 0
    995993    _snd_pcm_hw_param_set(&params, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
    996994                          periodsize, 0);
     
    10031001    _snd_pcm_hw_param_set(&params, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
    10041002                          periodbytes*nrperiods, 0);
    1005 #endif
     1003
    10061004//#ifdef DEBUG_PK
    10071005    printk("Hardware parameters: sample rate %i, data type %i, channels %i, period size %i, periods %i\n",
     
    10091007//#endif
    10101008    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_PARAMS, (ULONG)__Stack32ToFlat(&params));
    1011     if (ret == -77 && fTryAgain == FALSE)
     1009    printk("OSS32_WaveSetHwParams return %d after SNDRV_PCM_IOCTL_HW_PARAMS ioctl", ret);
     1010    if (ret == -77 && fTryAgain == FALSE)
    10121011    {
    10131012        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PREPARE, 0);
Note: See TracChangeset for help on using the changeset viewer.