Search found 17 matches
- Thu Nov 21, 2019 7:57 pm
- Forum: ESP-IDF
- Topic: I2S: Why no 8 bits per channel
- Replies: 2
- Views: 4220
Re: I2S: Why no 8 bits per channel
Ah, interesting. I didn't know that. I need to experiment!
- Wed Nov 20, 2019 5:27 pm
- Forum: ESP-IDF
- Topic: I2S: Why no 8 bits per channel
- Replies: 2
- Views: 4220
I2S: Why no 8 bits per channel
I'm confused about I2s. Suppose I have the code: esp_err_t ret; static const int i2s_num = 0; // i2s port number static const i2s_config_t i2s_config = { .mode = I2S_MODE_MASTER | I2S_MODE_TX | I2S_MODE_DAC_BUILT_IN, .sample_rate = 8000, .bits_per_sample = 8, .channel_format = I2S_CHANNEL_FMT_ONLY_L...
- Fri Sep 27, 2019 10:22 pm
- Forum: ESP-IDF
- Topic: I2S: why no 8 bits per sample?
- Replies: 2
- Views: 4523
Re: I2S: why no 8 bits per sample?
Just a follow-up. Here is sets the bits per sample to be 8:
https://esp-idf-zh.readthedocs.io/zh_CN ... s/i2s.html
I still couldn't get my code to work properly, though.
https://esp-idf-zh.readthedocs.io/zh_CN ... s/i2s.html
I still couldn't get my code to work properly, though.
- Fri Sep 27, 2019 9:07 pm
- Forum: ESP-IDF
- Topic: I2S: why no 8 bits per sample?
- Replies: 2
- Views: 4523
Re: I2S: why no 8 bits per sample?
OK, I thought I solved things just now, but apparently not. I've got static const int i2s_num = 0; // i2s port number #define RATE 8000 static const i2s_config_t i2s_config = { .mode = I2S_MODE_MASTER | I2S_MODE_TX | I2S_MODE_DAC_BUILT_IN, .sample_rate = RATE, .bits_per_sample = I2S_BITS_PER_SAMPLE_...
- Fri Sep 27, 2019 3:14 pm
- Forum: ESP-IDF
- Topic: I2S: why no 8 bits per sample?
- Replies: 2
- Views: 4523
I2S: why no 8 bits per sample?
I'm curious as to why i2s_config_t doesn't allow a bits_per_sample of 8. Given that the DAC pins are only 8 bits, surely it would make sense?
It means that we have to either pad our samples or store/transmit twice as much data as we need.
It means that we have to either pad our samples or store/transmit twice as much data as we need.
- Wed Sep 25, 2019 8:38 am
- Forum: General Discussion
- Topic: tcp_server example not able to reconnect the server after disconnect
- Replies: 25
- Views: 36785
Re: tcp_server example not able to reconnect the server after disconnect
I think it's certainly OK to only service one connection at a time whilst keeping the others in a blocked state. Servicing multiple connections would require a much more elaborate solution, which would be too complex for the example.
- Tue Sep 24, 2019 2:31 pm
- Forum: General Discussion
- Topic: tcp_server example not able to reconnect the server after disconnect
- Replies: 25
- Views: 36785
Re: tcp_server example not able to reconnect the server after disconnect
OK, I've had a chance to try the proposed patch (after much fiddling around with updates). My conclusion: it fixes the big problem everyone has been having, but still contains a bug. The bug is this: if two clients try to connect at the same time, then the second one will block (which I think is OK,...
- Wed Sep 18, 2019 10:06 pm
- Forum: General Discussion
- Topic: tcp_server example not able to reconnect the server after disconnect
- Replies: 25
- Views: 36785
Re: tcp_server example not able to reconnect the server after disconnect
OK. Thanks. I'll give it a go when I have a spare ESP. All of mine are currently in-service.
- Tue Sep 17, 2019 8:01 am
- Forum: General Discussion
- Topic: tcp_server example not able to reconnect the server after disconnect
- Replies: 25
- Views: 36785
Re: tcp_server example not able to reconnect the server after disconnect
Please provide the link, as it's not on this thread.meowsqueak wrote: ↑Mon Sep 16, 2019 11:20 pmDid you try the PR I linked to? I didn't have any problems with it, but my use case may be different.
- Mon Sep 16, 2019 5:52 pm
- Forum: General Discussion
- Topic: tcp_server example not able to reconnect the server after disconnect
- Replies: 25
- Views: 36785
Re: tcp_server example not able to reconnect the server after disconnect
OK, I think I have gotten things to work better. Here's my revised code: int setup_listen_sock(int *ptr_listen_sock) { char addr_str[128]; int addr_family; int ip_protocol; int err = 0; #ifdef CONFIG_EXAMPLE_IPV4 struct sockaddr_in destAddr; destAddr.sin_addr.s_addr = htonl(INADDR_ANY); destAddr.sin...