Hello,
SetMasterVolume will adjust the I2S volume at the same time. How to adjust the analog output volume individually? Thank you.
VS1005 GPIO Access
Re: VS1005 GPIO Access
Just to be sure... Are you really working on a 9 year old system?
The I2S hardware is configured to read from DAC path. Unfortunately the source to I2S is after DAC volume control and it changes I2S volume also.
The I2S hardware is configured to read from DAC path. Unfortunately the source to I2S is after DAC volume control and it changes I2S volume also.
Re: VS1005 GPIO Access
Hello,
We use 5 external GPIO to control VS1005 for Vol+ Vol- Play/Pause << and >> without MCU. Similar to the 1st post. The reply from Panu mentioned that "I2S output is affected when I2S_CF_MODE is 0". Is that meant if I2S_CF_MODE is not 0 then I2S output will not be affected?
May I know any modern methods to control VS1005 effectively and easily? Thank you.
We use 5 external GPIO to control VS1005 for Vol+ Vol- Play/Pause << and >> without MCU. Similar to the 1st post. The reply from Panu mentioned that "I2S output is affected when I2S_CF_MODE is 0". Is that meant if I2S_CF_MODE is not 0 then I2S output will not be affected?
May I know any modern methods to control VS1005 effectively and easily? Thank you.
Re: VS1005 GPIO Access
See https://www.vlsi.fi/fileadmin/software/ ... _Audio.pdf
The automatic I2S mode (I2S_CF_MODE=0, driver AUOI2SMA.DL3) uses the same signal as the DAC and is affected by the same volume control. When the automatic mode is not used, it would be possible to route the signal from SRC to I2S manually (I2S_CF_MODE=1, similar to what AUOSPDA.DL3 does with SPDIF output).
Currently there doesn't seem to be a driver for that specific case.
The automatic I2S mode (I2S_CF_MODE=0, driver AUOI2SMA.DL3) uses the same signal as the DAC and is affected by the same volume control. When the automatic mode is not used, it would be possible to route the signal from SRC to I2S manually (I2S_CF_MODE=1, similar to what AUOSPDA.DL3 does with SPDIF output).
Currently there doesn't seem to be a driver for that specific case.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
Re: VS1005 GPIO Access
Hello 123456,
Pasi already gave a link to the VSOS Audio document; the relevant part of that is Chapter I2S Audio Drivers / Driver AUOI2SMA.DL3. See the brown arrow close to the blue text I2S_CF to see which hardware path the driver utilizer. As you can see, with this driver main volume control (the amplifier symbol below the blue DAC_CTL text) is applied both to I2S and the DAC output.
It is possible to create a driver, using different hardware audio paths, where there would be separate volume controls for the DAC and I2S outputs. Implementing it would, however, take a bit of time.
Before going into writing a new audio driver, can you explain a little bit what your application is? Where does it get its input? Is it an "MP3 player", or does it read its input from an audio source, like the ADC, I2S, et cetera?
Kind regards,
- Henrik
Pasi already gave a link to the VSOS Audio document; the relevant part of that is Chapter I2S Audio Drivers / Driver AUOI2SMA.DL3. See the brown arrow close to the blue text I2S_CF to see which hardware path the driver utilizer. As you can see, with this driver main volume control (the amplifier symbol below the blue DAC_CTL text) is applied both to I2S and the DAC output.
It is possible to create a driver, using different hardware audio paths, where there would be separate volume controls for the DAC and I2S outputs. Implementing it would, however, take a bit of time.
Before going into writing a new audio driver, can you explain a little bit what your application is? Where does it get its input? Is it an "MP3 player", or does it read its input from an audio source, like the ADC, I2S, et cetera?
Kind regards,
- Henrik
Good signatures never die. They just fade away.
Re: VS1005 GPIO Access
Hello!
Just to let you know that I currently have a dual-volume DAC + I2S system in testing. If everything goes well, I may be able to release it tomorrow.
Kind regards,
- Henrik
Just to let you know that I currently have a dual-volume DAC + I2S system in testing. If everything goes well, I may be able to release it tomorrow.
Kind regards,
- Henrik
Good signatures never die. They just fade away.
Re: VS1005 GPIO Access
Hello!
The new I2S driver with some documentation is available at:
viewtopic.php?f=13&t=2926
If there are any questions or comments regarding the driver, let's have them there to keep threads clearer.
An additional comment: The programming example (SetMasterVolume()) that you have seemed to look at is from 2013 which is before we built operating system support for volume control. It pokes the hardware much too intimately, and it should not be used as a basis for new software. To see the correct way of changing volume, have a look at source code for programs like AuOutput.dl3 and PlayDirP.dl3. They are available in the latest Root Images and Libraries with Source Code and Documentation package, provided at the end of the Latest VSOS Kernel thread. The current version of the package is 3.65. The thread where you can find it is below:
viewtopic.php?f=13&t=680
Go straight to the last page for the software. When you look at the source code, have a close look at ioctl() calls, particularly those with parameters like IOCTL_AUDIO_GET_VOLUME and IOCTL_AUDIO_SET_VOLUME. That's where things happen. Also, the VS1005 VSOS Audio Subsystem document, available in the same package, has a chapter called VSOS Audio ioctl() Controls. That chapter has a particularly relevant section Volume Control.
Kind regards,
- Henrik
The new I2S driver with some documentation is available at:
viewtopic.php?f=13&t=2926
If there are any questions or comments regarding the driver, let's have them there to keep threads clearer.
An additional comment: The programming example (SetMasterVolume()) that you have seemed to look at is from 2013 which is before we built operating system support for volume control. It pokes the hardware much too intimately, and it should not be used as a basis for new software. To see the correct way of changing volume, have a look at source code for programs like AuOutput.dl3 and PlayDirP.dl3. They are available in the latest Root Images and Libraries with Source Code and Documentation package, provided at the end of the Latest VSOS Kernel thread. The current version of the package is 3.65. The thread where you can find it is below:
viewtopic.php?f=13&t=680
Go straight to the last page for the software. When you look at the source code, have a close look at ioctl() calls, particularly those with parameters like IOCTL_AUDIO_GET_VOLUME and IOCTL_AUDIO_SET_VOLUME. That's where things happen. Also, the VS1005 VSOS Audio Subsystem document, available in the same package, has a chapter called VSOS Audio ioctl() Controls. That chapter has a particularly relevant section Volume Control.
Kind regards,
- Henrik
Good signatures never die. They just fade away.