At Sun, 06 Aug 2006 22:59:34 +0400, Krivenok Dmitry wrote: > > Hello All! > > Look at the following code: > > static struct snd_pcm_hardware snd_card_dummy_playback = > { > .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | > SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_MMAP_VALID), > .formats = USE_FORMATS, > .rates = USE_RATE, > .rate_min = USE_RATE_MIN, > .rate_max = USE_RATE_MAX, > .channels_min = USE_CHANNELS_MIN, > .channels_max = USE_CHANNELS_MAX, > .buffer_bytes_max = MAX_BUFFER_SIZE, > .period_bytes_min = 64, > .period_bytes_max = MAX_BUFFER_SIZE, // !!! > .periods_min = USE_PERIODS_MIN, > .periods_max = USE_PERIODS_MAX, > .fifo_size = 0, > }; > > Maybe it should be: > > static struct snd_pcm_hardware snd_card_dummy_playback = > { > .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | > SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_MMAP_VALID), > .formats = USE_FORMATS, > .rates = USE_RATE, > .rate_min = USE_RATE_MIN, > .rate_max = USE_RATE_MAX, > .channels_min = USE_CHANNELS_MIN, > .channels_max = USE_CHANNELS_MAX, > .buffer_bytes_max = MAX_BUFFER_SIZE, > .period_bytes_min = 64, > .period_bytes_max = MAX_PERIOD_SIZE, // !!! > .periods_min = USE_PERIODS_MIN, > .periods_max = USE_PERIODS_MAX, > .fifo_size = 0, > }; > > The second possible bug: > > static struct snd_kcontrol_new snd_dummy_controls[] = { > DUMMY_VOLUME("Master Volume", 0, MIXER_ADDR_MASTER), > DUMMY_CAPSRC("Master Capture Switch", 0, MIXER_ADDR_MASTER), > DUMMY_VOLUME("Synth Volume", 0, MIXER_ADDR_SYNTH), > DUMMY_CAPSRC("Synth Capture Switch", 0, MIXER_ADDR_MASTER), > DUMMY_VOLUME("Line Volume", 0, MIXER_ADDR_LINE), > DUMMY_CAPSRC("Line Capture Switch", 0, MIXER_ADDR_MASTER), > DUMMY_VOLUME("Mic Volume", 0, MIXER_ADDR_MIC), > DUMMY_CAPSRC("Mic Capture Switch", 0, MIXER_ADDR_MASTER), > DUMMY_VOLUME("CD Volume", 0, MIXER_ADDR_CD), > DUMMY_CAPSRC("CD Capture Switch", 0, MIXER_ADDR_MASTER) > }; > > I'm not sure, but I think it should be: > > static struct snd_kcontrol_new snd_dummy_controls[] = { > DUMMY_VOLUME ("Master Volume", 0, MIXER_ADDR_MASTER), > DUMMY_CAPSRC ("Master Capture Switch", 0, MIXER_ADDR_MASTER), > DUMMY_VOLUME ("Synth Volume", 0, MIXER_ADDR_SYNTH), > DUMMY_CAPSRC ("Synth Capture Switch", 0, MIXER_ADDR_SYNTH), > DUMMY_VOLUME ("Line Volume", 0, MIXER_ADDR_LINE), > DUMMY_CAPSRC ("Line Capture Switch", 0, MIXER_ADDR_LINE), > DUMMY_VOLUME ("Mic Volume", 0, MIXER_ADDR_MIC), > DUMMY_CAPSRC ("Mic Capture Switch", 0, MIXER_ADDR_MIC), > DUMMY_VOLUME ("CD Volume", 0, MIXER_ADDR_CD), > DUMMY_CAPSRC ("CD Capture Switch", 0, MIXER_ADDR_CD) > }; > > Am I right? Yes, both are obvious typos. Care to create a patch? Don't forget to provide a proper changelog and a signed-off-by line. Thanks, Takashi ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel